/* Sidebar Navigation - Meadow Math */
/* Habbo Hotel 2006 Inspired - Deep blue sidebar with golden accents */

/* ========== SIDEBAR CONTAINER ========== */

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--gradient-sidebar);
  padding: var(--space-5);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
  z-index: var(--z-sticky);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* ========== LOGO - Habbo 2006 3D Text Style ========== */

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
  padding: var(--space-4) var(--space-5);
  background: transparent;
  border-radius: var(--radius-xl);
  text-decoration: none;
  transition: all var(--duration-normal) var(--ease-out);
  border: none;
  box-shadow: none;
}

.sidebar-logo:hover {
  transform: scale(1.05);
}

.sidebar-logo:hover .sidebar-logo-text {
  text-shadow:
    1px 1px 0 #ccc,
    2px 2px 0 #c9c9c9,
    3px 3px 0 #bbb,
    4px 4px 0 #b9b9b9,
    5px 5px 0 #aaa,
    6px 6px 1px rgba(0,0,0,.1),
    0 0 5px rgba(0,0,0,.1),
    1px 1px 3px rgba(0,0,0,.3),
    3px 3px 5px rgba(0,0,0,.2),
    5px 5px 10px rgba(0,0,0,.25),
    8px 8px 10px rgba(0,0,0,.2),
    0 0 20px rgba(255, 215, 0, 0.5);
}

.sidebar-logo:active {
  transform: scale(0.98);
}

.sidebar-logo-text {
  font-family: var(--font-secondary);
  font-size: 24px;
  font-weight: var(--weight-extrabold);
  color: #FFFFFF;
  letter-spacing: 1px;
  white-space: nowrap;
  text-transform: uppercase;
  text-shadow:
    1px 1px 0 #ccc,
    2px 2px 0 #c9c9c9,
    3px 3px 0 #bbb,
    4px 4px 0 #b9b9b9,
    5px 5px 0 #aaa,
    6px 6px 1px rgba(0,0,0,.1),
    0 0 5px rgba(0,0,0,.1),
    1px 1px 3px rgba(0,0,0,.3),
    3px 3px 5px rgba(0,0,0,.2),
    5px 5px 10px rgba(0,0,0,.25),
    8px 8px 10px rgba(0,0,0,.2);
}

/* ========== NAVIGATION LIST ========== */

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-family: var(--font-secondary);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: #ffffff;
  text-decoration: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  user-select: none;
  min-height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
  text-shadow: 1px 1px 2px rgba(22, 101, 52, 0.5);
}

.nav-item:hover {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.18));
  color: #ffffff;
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.2), 0 6px 12px rgba(0, 0, 0, 0.15), 0 0 20px rgba(74, 222, 128, 0.3);
}

.nav-item:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.nav-item.active {
  background: linear-gradient(to bottom, #fef08a, #facc15);
  color: #166534;
  box-shadow: 0 3px 0 #ca8a04, 0 4px 12px rgba(250, 204, 21, 0.4);
  border-color: #fef9c3;
  text-shadow: none;
}

.nav-item.active:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 5px 0 #ca8a04, 0 6px 15px rgba(250, 204, 21, 0.5);
}

.nav-item.active:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 1px 0 #ca8a04;
}

.nav-item-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.nav-item-text {
  flex: 1;
  white-space: nowrap;
}

/* ========== MOBILE HAMBURGER MENU ========== */

.hamburger {
  display: none;
  position: fixed;
  top: var(--space-4);
  left: var(--space-4);
  width: 56px;
  height: 56px;
  background: linear-gradient(to bottom, #4ade80, #22c55e);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 0 #16a34a, 0 6px 15px rgba(0, 0, 0, 0.3);
  z-index: var(--z-modal);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.hamburger:hover {
  transform: translateY(-3px) scale(1.05);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 6px 0 #16a34a, 0 8px 20px rgba(0, 0, 0, 0.35), 0 0 20px rgba(74, 222, 128, 0.4);
}

.hamburger:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 1px 0 #16a34a;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background: #ffffff;
  border-radius: var(--radius-full);
  transition: all var(--duration-normal) var(--ease-out);
}

/* Hamburger animation when open */
.hamburger.open .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.open .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ========== BACKDROP OVERLAY ========== */

.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: calc(var(--z-sticky) - 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-medium) var(--ease-out);
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* ========== MOBILE RESPONSIVE ========== */

@media (max-width: 767px) {
  .hamburger {
    display: flex;
  }
  
  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--duration-medium) var(--ease-out);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .sidebar-backdrop {
    display: block;
  }
  
  body.sidebar-open {
    overflow: hidden;
  }
}

/* ========== TABLET RESPONSIVE ========== */

@media (min-width: 768px) and (max-width: 1023px) {
  .sidebar {
    width: 220px;
  }
}

/* ========== SCROLLBAR STYLING ========== */

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* ========== LANGUAGE SWITCHER - Flag Buttons ========== */

.language-switcher {
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.language-label {
  font-family: var(--font-secondary);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-3);
  display: block;
  text-align: center;
}

.language-buttons {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}

.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 44px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 24px;
  padding: 0;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.lang-btn:hover {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.18));
  transform: translateY(-3px) scale(1.05);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.2), 0 6px 12px rgba(0, 0, 0, 0.15), 0 0 15px rgba(74, 222, 128, 0.3);
}

.lang-btn:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.lang-btn.active {
  background: linear-gradient(to bottom, #fef08a, #facc15);
  border-color: #fef9c3;
  box-shadow: 0 3px 0 #ca8a04, 0 4px 12px rgba(250, 204, 21, 0.4);
}
