@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

/* ── Dark Theme (default) ── */
body {
  --bg: #F8FAFC;
  --bg-nav: rgba(13, 86, 169, 0.04);
  --bg-nav-scrolled: rgba(248, 250, 252, 0.88);
  --bg-nav-scrolled-bar: rgba(255, 255, 255, 0.75);
  --bg-icon: rgba(13, 86, 169, 0.05);
  --bg-hover: rgba(13, 86, 169, 0.06);
  --bg-active: rgba(13, 86, 169, 0.1);
  --bg-search: rgba(255, 255, 255, 0.97);
  --bg-search-inner: rgba(5, 41, 94, 0.03);
  --bg-mobile: rgba(255, 255, 255, 0.98);
  --bg-overlay: rgba(5, 41, 94, 0.2);
  --text: #05295E;
  --text-dim: rgba(5, 41, 94, 0.6);
  --text-muted: #8A94A6;
  --text-faint: rgba(5, 41, 94, 0.35);
  --border: rgba(13, 86, 169, 0.1);
  --border-scrolled: rgba(13, 86, 169, 0.15);
  --border-login: rgba(13, 86, 169, 0.2);
  --border-search-inner: rgba(13, 86, 169, 0.08);
  --border-mobile: rgba(13, 86, 169, 0.12);
  --shadow-start: rgba(13, 86, 169, 0.35);
  --shadow-icon: rgba(13, 86, 169, 0.25);
  --shadow-login: rgba(13, 86, 169, 0.1);
  --shadow-search: rgba(5, 41, 94, 0.12);
  --shadow-scrolled: rgba(13, 86, 169, 0.08);
  --btn-text: #FFFFFF;
  --login-hover-bg: #0D56A9;
  --login-hover-text: #FFFFFF;
  --login-hover-border: #0D56A9;
  --shimmer: rgba(13, 86, 169, 0.04);
  --close-hover-bg: rgba(255, 77, 106, 0.1);
  --close-hover-text: #FF4D6A;
  --gold-1: #B89857;
  --gold-2: #E2D292;
  --gold-3: #71542E;

  background: var(--bg);
  min-height: 200vh;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.5s ease;
}

/* ── Light Theme ── */
body.light {
  --bg: #F8FAFC;
  --bg-nav: rgba(13, 86, 169, 0.05);
  --bg-nav-scrolled: rgba(248, 250, 252, 0.9);
  --bg-nav-scrolled-bar: rgba(255, 255, 255, 0.8);
  --bg-icon: rgba(13, 86, 169, 0.05);
  --bg-hover: rgba(13, 86, 169, 0.06);
  --bg-active: rgba(13, 86, 169, 0.1);
  --bg-search: rgba(255, 255, 255, 0.97);
  --bg-search-inner: rgba(5, 41, 94, 0.03);
  --bg-mobile: rgba(255, 255, 255, 0.98);
  --bg-overlay: rgba(5, 41, 94, 0.15);
  --text: #05295E;
  --text-dim: rgba(5, 41, 94, 0.6);
  --text-muted: #8A94A6;
  --text-faint: rgba(5, 41, 94, 0.35);
  --border: rgba(13, 86, 169, 0.1);
  --border-scrolled: rgba(13, 86, 169, 0.15);
  --border-login: rgba(13, 86, 169, 0.15);
  --border-search-inner: rgba(13, 86, 169, 0.08);
  --border-mobile: rgba(13, 86, 169, 0.12);
  --shadow-start: rgba(13, 86, 169, 0.3);
  --shadow-icon: rgba(13, 86, 169, 0.2);
  --shadow-login: rgba(13, 86, 169, 0.08);
  --shadow-search: rgba(5, 41, 94, 0.1);
  --shadow-scrolled: rgba(13, 86, 169, 0.06);
  --btn-text: #FFFFFF;
  --login-hover-bg: #05295E;
  --login-hover-text: #FFFFFF;
  --login-hover-border: #05295E;
  --shimmer: rgba(13, 86, 169, 0.04);
  --close-hover-bg: rgba(255, 77, 106, 0.08);
  --close-hover-text: #FF4D6A;
}

/* ── Logo Image ── */
.logo img {
  height: 65px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}

.logo:hover img {
  transform: scale(1.03);
}

/* ── Header ── */
header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  padding: 18px 60px;
  transition: padding 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
  padding: 10px 60px;
  background: var(--bg-nav-scrolled);
  backdrop-filter: blur(30px);
}

/* ── Navbar ── */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 35px;
  border-radius: 60px;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.navbar::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--shimmer), rgba(184, 152, 87, 0.06), var(--shimmer), transparent);
  transition: left 1s ease;
  pointer-events: none;
}

.navbar:hover::before {
  left: 100%;
}

.navbar::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(13, 86, 169, 0.4), rgba(184, 152, 87, 0.5), rgba(13, 86, 169, 0.4), transparent);
  pointer-events: none;
}

header.scrolled .navbar {
  background: var(--bg-nav-scrolled-bar);
  border-color: var(--border-scrolled);
  box-shadow: 0 8px 32px var(--shadow-scrolled),
              inset 0 1px 0 rgba(13, 86, 169, 0.08);
}

/* ── Logo ── */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  cursor: pointer;
  transition: transform 0.3s ease, color 0.5s ease;
}

.logo:hover {
  transform: scale(1.03);
}

.logo-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  animation: logoRotate 6s linear infinite;
  box-shadow: 0 0 18px rgba(184, 152, 87, 0.5),
              0 0 40px rgba(184, 152, 87, 0.15);
  position: relative;
}

.logo-circle::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid rgba(184, 152, 87, 0.35);
  animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.5); opacity: 0; }
}

/* ── Nav Links ── */
.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-links li {
  opacity: 0;
  transform: translateY(-10px);
  animation: linkSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.nav-links li:nth-child(1) { animation-delay: 0.1s; }
.nav-links li:nth-child(2) { animation-delay: 0.15s; }
.nav-links li:nth-child(3) { animation-delay: 0.2s; }
.nav-links li:nth-child(4) { animation-delay: 0.25s; }
.nav-links li:nth-child(5) { animation-delay: 0.3s; }
.nav-links li:nth-child(6) { animation-delay: 0.35s; }

@keyframes linkSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 30px;
  position: relative;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-3), var(--gold-2));
  transform: translateX(-50%);
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.nav-links a:hover::after {
  width: 24px;
}

.nav-links a.active {
  color: var(--text);
  background: var(--bg-active);
}

.nav-links a.active::after {
  width: 24px;
}

/* ── Nav Right ── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: var(--bg-icon);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.icon:hover {
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  color: #FFFFFF;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px var(--shadow-icon);
}

.icon:active {
  transform: translateY(0) scale(0.95);
}

.badge {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FF4D6A;
  box-shadow: 0 0 8px rgba(255, 77, 106, 0.6);
  animation: badgePing 2s ease-in-out infinite;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@keyframes badgePing {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.login {
  padding: 10px 22px;
  border-radius: 40px;
  background: transparent;
  border: 1px solid var(--border-login);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.login:hover {
  background: var(--login-hover-bg);
  color: var(--login-hover-text);
  border-color: var(--login-hover-border);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow-login);
}

.login:active {
  transform: translateY(0) scale(0.97);
}

.start {
  padding: 11px 24px;
  border: none;
  border-radius: 40px;
  background: linear-gradient(135deg, var(--gold-3), var(--gold-1), var(--gold-2));
  background-size: 200% 200%;
  animation: goldShift 4s ease-in-out infinite;
  color: var(--btn-text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

@keyframes goldShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.start::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: left 0.6s ease;
}

.start:hover::before {
  left: 100%;
}

.start:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 30px var(--shadow-start),
              0 0 15px rgba(184, 152, 87, 0.2);
}

.start:active {
  transform: translateY(0) scale(0.97);
}

/* ── Hamburger ── */
.menu {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.menu span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.menu.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ── Search Panel ── */
.search-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  width: 520px;
  max-width: 90vw;
  padding: 8px;
  margin-top: 12px;
  background: var(--bg-search);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--border-scrolled);
  border-radius: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 20px 60px var(--shadow-search);
}

.search-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.search-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 6px 18px;
  background: var(--bg-search-inner);
  border-radius: 14px;
  border: 1px solid var(--border-search-inner);
  transition: background 0.5s ease, border-color 0.5s ease;
}

.search-inner i {
  color: var(--text-muted);
  font-size: 18px;
  flex-shrink: 0;
  transition: color 0.5s ease;
}

.search-inner input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  padding: 10px 0;
  transition: color 0.5s ease;
}

.search-inner input::placeholder {
  color: var(--text-faint);
  transition: color 0.5s ease;
}

.search-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--bg-icon);
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.search-close:hover {
  background: var(--close-hover-bg);
  color: var(--close-hover-text);
}

/* ── Mobile Close Button ── */
.mobile-close {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-icon);
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: all 0.3s ease;
  z-index: 999;
}

.mobile-close:hover {
  background: var(--close-hover-bg);
  color: var(--close-hover-text);
  border-color: var(--close-hover-text);
  transform: rotate(90deg) scale(1.1);
}

.mobile-close:active {
  transform: rotate(90deg) scale(0.95);
}

/* ── Mobile Overlay ── */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  z-index: 997;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ── Mobile Menu ── */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background: var(--bg-mobile);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-left: 1px solid var(--border-mobile);
  padding: 100px 36px 40px;
  z-index: 998;
  transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.5s ease,
              border-color 0.5s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-menu ul li {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active ul li {
  opacity: 1;
  transform: translateX(0);
}

.mobile-menu.active ul li:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active ul li:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active ul li:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active ul li:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.active ul li:nth-child(5) { transition-delay: 0.3s; }
.mobile-menu.active ul li:nth-child(6) { transition-delay: 0.35s; }

.mobile-menu a {
  display: block;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  padding: 14px 20px;
  border-radius: 14px;
  transition: all 0.3s ease, color 0.5s ease, background 0.5s ease;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--text);
  background: var(--bg-hover);
  padding-left: 28px;
}

.mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease 0.4s;
}

.mobile-menu.active .mobile-actions {
  opacity: 1;
  transform: translateY(0);
}

.mobile-actions .login {
  width: 100%;
  padding: 14px;
  font-size: 15px;
}

.mobile-actions .start {
  width: 100%;
  padding: 15px;
  font-size: 15px;
}

/* ── Theme Toggle Button Spin ── */
.theme-btn {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .nav-links,
  .nav-right {
    display: none;
  }

  .menu {
    display: flex;
  }

  header {
    padding: 16px 20px;
  }

  header.scrolled {
    padding: 10px 20px;
  }

  .navbar {
    padding: 12px 20px;
  }

    .mobile-actions{
    margin-bottom: 400px;
  }
}

@media (max-width: 480px) {
  .logo h2 {
    font-size: 17px;
  }

  .mobile-menu {
    padding: 90px 24px 30px;
  }

  .mobile-menu a {
    font-size: 16px;
    padding: 12px 16px;
  }
  .mobile-actions{
    margin-bottom: 400px;
  }
}