/* ================================
   EXPANSA — HANGAR (CLEAN ATLAS)
================================ */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    background: #000;
    font-family: ui-monospace, monospace;
    color: #9ae6b4;
    font-size: 12px;
}


/* ================================
   HANGAR STATIC BACKGROUND
================================ */
body::before {
    content: "";
    position: fixed;
    inset: 0;              /* IMPORTANT */
    width: 100%;
    height: 100%;

    background-image: url("/assets/ui/hangar.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;

    z-index: 0;
    pointer-events: none;
}




/* ROOT */
#hangar-root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 14px;
    gap: 12px;
    position: relative;
    z-index: 1;
}

/* ================================
   TOP OVERLAY (LOGO + TITLE + BACK)
================================ */
#hangar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 260px;              /* reserved header air */
    pointer-events: none;
    z-index: 50;
}

#hangar-logo {
    position: absolute;
    top: 24px;
    left: 32px;
    height: 200px;
    opacity: 0.95;
    pointer-events: none;
}

#hangar-title {
    position: absolute;
    top: 60px;
    left: 260px;                /* logo width + spacing */
}

#hangar-title h1 {
    margin: 0;
    font-size: 20px;
    letter-spacing: 0.12em;
}

#hangar-title p {
    margin: 2px 0 0;
    font-size: 11px;
    opacity: 0.8;
}

#btn-back-game {
    position: absolute;
    top: 32px;
    right: 32px;
    pointer-events: auto;
}

/* ================================
   BUTTONS (HUD STYLE)
================================ */
.panel-btn {
    padding: 4px 9px;
    background: rgba(0,0,0,0.45);
    border: 1px solid #1a3;
    color: #9ae6b4;
    font-size: 11px;
    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    user-select: none;
}

.panel-btn:hover {
    filter: brightness(1.25);
}

.panel-btn.selected {
    background: rgba(0,0,0,0.85);
    border-color: #3d6;
    color: #3d6;
}

/* ================================
   MAIN LAYOUT
================================ */
.hangar-main {
    flex: none;
    display: grid;
    grid-template-columns: 0.6fr 1.8fr 0.6fr;
    gap: 12px;
    margin-top: 260px;
}


.hangar-column {
    background: rgba(6,18,12,0.85);
    border: 1px solid #1a3;
    backdrop-filter: blur(3px);
    padding: 10px;

    display: flex;
    flex-direction: column;
    gap: 8px;
    align-self: flex-start;

    position: relative;
    z-index: 10;
}

.hangar-column h2 {
    margin: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6fbf8e;
}

.button-column {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* ================================
   PREVIEW PANEL
================================ */
.preview-column {
    background: rgba(6,18,12,0.85);
    border: 1px solid #1a3;
    backdrop-filter: blur(3px);
    padding: 10px;

    display: flex;
    flex-direction: column;
    align-items: center;
}

#preview-wrapper {
    background: rgba(0,0,0,0.45);
    border: 1px solid #1a3;
    width: 100%;
    height: auto;

    display: flex;
    align-items: center;
    justify-content: center;
}

#preview-canvas {
    width: 420px;
    height: 420px;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

/* ================================
   FOOTER
================================ */
.hangar-footer {
    background: transparent;
    border: none;
    backdrop-filter: none;

    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;

    color: #6fbf8e;
    font-size: 11px;
    position: relative;
    z-index: 10;
}

.footer-buttons {
    display: flex;
    gap: 6px;
}

/* =========================
   HANGAR — PLAYER AVATAR
========================= */

#hangar-avatar-box {
  position: absolute;     /* SCROLLS WITH PAGE */
  top: 30px;
  right: 410px;

  width: 220px;           /* BIGGER */
  height: 220px;

  z-index: 5;
}

#hangar-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;           /* NO BORDER */
}

/* =========================
   HANGAR — CAPTAIN INFO
========================= */

#hangar-captain-box {
  position: absolute;     /* SCROLLS WITH PAGE */
  top: 270px;             /* BELOW AVATAR */
  right: 510px;

  text-align: right;
  color: #9ae6b4;
  font-family: ui-monospace, monospace;
  z-index: 5;
}

#hangar-captain-name {
  font-size: 16px;
  font-weight: bold;
}

#hangar-captain-level {
  font-size: 13px;
  opacity: 0.75;
}

@media (max-width: 768px) {

  .hangar-main {
    margin-top: 260px;   /* was effectively ~160 */
    align-items: center;
  }

  .hangar-column {
    width: 92%;
  }

  /* LOGO */
  #hangar-logo {
    left: 14px;
    top: 16px;
    height: 140px;
  }

  /* TITLE */
  #hangar-title {
    left: 160px;
    top: 42px;
  }

  #hangar-title h1 {
    font-size: 16px;
  }

  #hangar-title p {
    font-size: 10px;
  }

  /* AVATAR */
  #hangar-avatar-box {
    right: 16px;
    top: 70px;
    width: 120px;
    height: 120px;
  }

  /* CAPTAIN — UNDER AVATAR */
  #hangar-captain-box {
    right: 16px;
    top: 200px;
    text-align: right;
  }

  #hangar-captain-name {
    font-size: 13px;
  }

  #hangar-captain-level {
    font-size: 11px;
  }
}


/* ================================
   PREVIEW — FLOATING (NO PANEL)
================================ */

.preview-column {
    background: transparent;
    border: none;
    backdrop-filter: none;
    padding: 0;
}

#preview-wrapper {
    background: transparent;
    border: none;
}

/* REMOVE PREVIEW TITLE ONLY */
.preview-column h2 {
    display: none;
}

#ship-info {
    margin-top: 10px;
    padding: 8px 10px;

    background: rgba(6,18,12,0.75);
    border: 1px solid #1a3;

    font-size: 11px;
    color: #9ae6b4;
}

#ship-info-name {
    font-weight: bold;
    margin-bottom: 4px;
    color: #3d6;
}

#ship-info-desc {
    opacity: 0.85;
    line-height: 1.4;
}

@media (max-width: 768px) {
  body::before {
    background-size: cover;
    background-position: center;
  }
}
