/* Common styles shared across all pages */

:root {
  --bg-body: #020617;
  --bg-card: #0f172a;
  --accent: #38bdf8;
  --accent-2: #a855f7;
  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --border-soft: #1e293b;
  --glow: rgba(56, 189, 248, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-body);
  background-image: radial-gradient(circle at 50% 0%, #1e293b 0%, #020617 60%);
  color: var(--text-main);
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #7dd3fc;
}

/* --- NAVIGATION --- */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(2, 6, 23, 0.8);
  border-bottom: 1px solid rgba(148,163,184,0.1);
}

.top-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, rgba(248, 250, 252, 0.15) 0%, rgba(248, 250, 252, 0.05) 70%, transparent 100%);
  border-radius: 50%;
  transition: transform 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(248, 250, 252, 0.15);
}

.nav-logo img {
  display: block;
  width: 28px;
  height: 28px;
}

.nav-logo:hover {
  transform: scale(1.05);
  background: radial-gradient(circle, rgba(248, 250, 252, 0.2) 0%, rgba(248, 250, 252, 0.08) 70%, transparent 100%);
  box-shadow: 0 0 25px rgba(248, 250, 252, 0.2);
}

.nav-links {
  display: flex;
  gap: 20px;
  font-size: 13px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  color: var(--text-sub);
  font-weight: 500;
}

.nav-link:hover {
  color: var(--text-main);
}

/* Mobile hamburger menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 36px;
  height: 36px;
  position: relative;
  z-index: 1001;
  align-items: center;
  justify-content: center;
  order: -1; /* Always first in flex order */
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--text-main);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile overlay menu */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 6, 23, 0.97);
  backdrop-filter: blur(20px);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 768px) {
  .top-nav-inner {
    padding: 12px 16px;
  }

  .nav-logo {
    width: 36px;
    height: 36px;
  }

  .nav-logo img {
    width: 24px;
    height: 24px;
  }

  .mobile-menu-btn {
    display: flex;
  }

  /* Hide nav links by default on mobile */
  .nav-links {
    display: none;
  }

  /* Nav-cta remains visible on mobile but moves to the right */
  .nav-cta {
    margin-left: auto;
  }

  /* Full screen overlay menu */
  .nav-links.mobile-open {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    background: var(--bg-body);
    flex-direction: column;
    justify-content: flex-start !important;
    align-items: stretch;
    padding: 70px 30px 30px;
    gap: 0;
    z-index: 1000;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
  }

  @keyframes slideIn {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-links.mobile-open .nav-link {
    font-size: 24px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(148,163,184,0.1);
    font-weight: 600;
    transition: all 0.2s;
    display: block;
  }

  .nav-links.mobile-open .nav-link:hover {
    padding-left: 10px;
    color: var(--accent);
  }

  .nav-links.mobile-open .nav-link:last-child {
    border-bottom: 1px solid rgba(148,163,184,0.1);
  }

  /* Prevent scroll when menu is open */
  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
  }

  /* Make floating donate button slightly smaller on mobile */
  .floating-donate {
    width: 48px;
    height: 48px;
    font-size: 20px;
    bottom: 20px;
    right: 20px;
  }
}

/* Floating donate button - bottom right */
.floating-donate {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.15);
  border: 2px solid rgba(168, 85, 247, 0.4);
  color: var(--accent-2);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
  transition: all 0.3s;
  z-index: 999;
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.floating-donate:hover {
  background: rgba(168, 85, 247, 0.25);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.5);
  transform: translateY(-4px) scale(1.05);
  color: #c084fc;
}

.floating-donate:active {
  transform: translateY(-2px) scale(1.02);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 99px;
  background: rgba(56,189,248,0.1);
  border: 1px solid rgba(56,189,248,0.3);
  color: var(--accent);
  font-weight: 600;
}

.nav-cta:hover {
  background: rgba(56,189,248,0.2);
  box-shadow: 0 0 15px var(--glow);
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.2);
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

/* --- FOOTER --- */
footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-sub);
  font-size: 12px;
}

footer p {
  margin: 0 0 8px 0;
}

footer p:last-child {
  margin-bottom: 0;
}

footer a {
  color: var(--text-sub);
  text-decoration: underline;
}
