/* ========================================
   SIDEBAR GAME UI NAVIGATION
   ======================================== */

body.sidebar-active {
  overflow: hidden;
}

/* Sidebar container — fixed left edge */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 180px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 1rem 0;
}

/* Individual tab bar — ALL same size, always showing label */
.sidebar__tab {
  position: relative;
  display: flex;
  align-items: center;
  height: 50px;
  width: 180px;
  background: var(--dark-card);
  border: 2px solid transparent;
  border-left: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), background 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out), box-shadow 0.35s var(--ease-out);
  padding-left: 20px;
  transform: translateX(0) translateY(0);
  z-index: 1;
}

/* Left edge indicator */
.sidebar__tab-indicator {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

/* Label — always visible */
.sidebar__tab-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gray);
  white-space: nowrap;
  transition: color 0.3s var(--ease-out);
}

/* Hide the icon — we don't need it anymore since label is always visible */
.sidebar__tab-icon {
  display: none;
}

/* Hover — subtle highlight, text brightens, tiny nudge outward */
.sidebar__tab:hover {
  background: var(--dark-card-hover);
  border-color: var(--dark-border-light);
  transform: translateX(4px);
}

.sidebar__tab:hover .sidebar__tab-label {
  color: var(--white);
}

.sidebar__tab:hover .sidebar__tab-indicator {
  opacity: 0.4;
}

/* Active — tab protrudes outward and lifts, like a chosen menu item in a game */
.sidebar__tab--active,
.sidebar__tab--active:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
  transform: translateX(18px) translateY(-2px) scale(1.04);
  z-index: 10;
  box-shadow:
    /* hard right-edge drop shadow — sells the "pushed out" feel */
    10px 8px 28px rgba(0, 0, 0, 0.55),
    /* gold glow halo */
    0 0 24px rgba(212, 175, 55, 0.28),
    /* inner gold rim light */
    inset 0 0 18px rgba(212, 175, 55, 0.05);
}

.sidebar__tab--active .sidebar__tab-indicator {
  opacity: 1;
}

.sidebar__tab--active .sidebar__tab-label {
  color: var(--gold);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* Main content area — right of sidebar */
.main {
  margin-left: 180px;
  min-height: 100vh;
  position: relative;
}

/* Content panels — each fills exactly one screen, no scroll */
.panel {
  display: none;
  height: 100vh;
  overflow-y: auto;
  padding: var(--space-3xl) var(--space-2xl);
  animation: panelIn 0.4s var(--ease-out);
}

.panel--active {
  display: block;
}

/* Hide scrollbar but keep scroll functional for panels with lots of content */
.panel::-webkit-scrollbar {
  width: 0;
  display: none;
}

.panel {
  scrollbar-width: none;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo at top of sidebar */
.sidebar__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  margin-bottom: 1.5rem;
}

.sidebar__logo img {
  width: 140px;
  height: auto;
}

/* ========================================
   MOBILE — tabs go to bottom
   ======================================== */
@media (max-width: 768px) {
  .sidebar {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    flex-direction: row;
    justify-content: space-around;
    padding: 0;
    background: var(--dark);
    border-top: 1px solid var(--dark-border);
    gap: 0;
  }

  .sidebar__logo {
    display: none;
  }

  .sidebar__tab {
    width: auto;
    flex: 1;
    height: 60px;
    border-radius: 0;
    border: none;
    border-top: 2px solid transparent;
    justify-content: center;
    padding-left: 0;
  }

  .sidebar__tab--active,
  .sidebar__tab--active:hover {
    border-color: transparent;
    border-top-color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
    /* push UP and out of the bottom bar on mobile */
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.25);
  }

  .sidebar__tab-label {
    font-size: 0.5rem;
    letter-spacing: 1px;
  }

  .sidebar__tab-indicator {
    width: 100%;
    height: 2px;
    top: 0;
    bottom: auto;
  }

  .main {
    margin-left: 0;
    margin-bottom: 60px;
  }
}
