/* Navbar Styles */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--surface-nav);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-sub);
  transition: box-shadow 0.3s;
}

.navbar.scrolled {
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.12);
}

/* Brand */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.nav-brand:hover {
  opacity: 0.8;
}

.nav-brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

/* Nav Links Container */
.nav-center {
  display: flex;
  align-items: center;
  gap: 40px;
  flex: 1;
  justify-content: center;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--color-primary);
}

/* Right Section */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-nav-login {
  padding: 9px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  background: transparent;
  border: 1.5px solid var(--border-sub);
  border-radius: 8px;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
  cursor: pointer;
}

.btn-nav-login:hover {
  border-color: var(--text);
  color: var(--text);
}

.nav-play-badge {
  display: none;
}

/* User Avatar in Navbar */
.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--surface);
}

.nav-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.nav-user-name {
  font-size: 0.88rem;
  font-weight: 500;
}

.nav-dashboard-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-primary);
  transition: color 0.2s;
}

.nav-dashboard-link:hover {
  color: var(--color-primary-dark);
}

/* Theme Toggle */
.site-theme-btn,
.site-settings-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--theme-pill-bg);
  border: 1px solid var(--theme-pill-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
  color: var(--text);
}

.site-theme-btn:hover,
.site-settings-btn:hover {
  background: var(--surface);
}

.site-settings-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.icon-moon,
.icon-sun {
  width: 20px;
  height: 20px;
  display: none;
  color: var(--text);
}

.icon-moon {
  display: block;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: block;
}

/* Mobile Burger Menu */
.nav-burger {
  display: none;
  width: 28px;
  height: 20px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 1001;
}

.nav-burger span {
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-burger.open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.nav-burger.open span:nth-child(2) {
  opacity: 0;
}

.nav-burger.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Responsive */
@media (max-width: 700px) {
  .nav-burger {
    display: flex;
  }

  .nav-center {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    background: var(--surface-mob);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-sub);
    display: none;
    width: 100%;
  }

  .nav-center.nav-open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .btn-nav-login span {
    display: none;
  }

  .btn-nav-login {
    padding: 8px 12px;
  }

  .nav-brand {
    gap: 8px;
  }

  .nav-brand img {
    width: 32px;
    height: 32px;
  }
}
