﻿:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f7fafb;
  background: #020805;
  --bg: #020805;
  --panel: rgba(10, 22, 15, 0.95);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text-muted: rgba(255, 255, 255, 0.65);
  --text-soft: rgba(255, 255, 255, 0.45);
  --green: #10b981;
  --cyan: #06b6d4;
  --purple: #8b5cf6;
  --amber: #f59e0b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 15%, rgba(16, 185, 129, 0.1), transparent 25%),
              radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.08), transparent 18%),
              radial-gradient(circle at 50% 90%, rgba(139, 92, 246, 0.08), transparent 22%),
              var(--bg);
  color: #f8fafc;
  overflow-x: hidden;
}

button,
a {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.page-shell {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 32px;
}

.stars-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.star {
  position: absolute;
  border-radius: 999px;
  opacity: 0.2;
  animation: star-twinkle 5s infinite ease-in-out;
}

@keyframes star-twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.85); }
  50% { opacity: 0.9; transform: scale(1.2); }
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 17, 12, 0.8);
  backdrop-filter: blur(24px);
  padding: 16px 20px;
  border-radius: 24px;
  margin-bottom: 24px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  width: 40px;
  height: 40px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 14px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
  color: #8b5cf6;
  background: rgba(255, 255, 255, 0.06);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.button {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  padding: 12px 20px;
  color: #fff;
  background: linear-gradient(90deg, #eab308 0%, #8b5cf6 45%, #14b8a6 100%);
  box-shadow: 0 16px 40px rgba(20, 184, 125, 0.18);
}

.button-secondary {
  padding: 12px 20px;
  color: #d9f99d;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.button-tertiary {
  padding: 10px 16px;
  color: #e9d5ff;
  background: rgba(139, 92, 246, 0.15);
}

.button-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
  font-size: 1.1rem;
}

.button.wide {
  width: 100%;
}

.link-button {
  border: none;
  background: transparent;
  color: #6ee7b7;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.hero {
  position: relative;
  min-height: 520px;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid rgba(16, 185, 129, 0.18);
  box-shadow: 0 32px 90px rgba(16, 185, 129, 0.14);
}

.hero-background {
  position: absolute;
  inset: 0;
  background-image: url('../images/galaxy-hero-bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.95;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 8, 5, 0.28) 0%, rgba(2, 8, 5, 0.9) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  min-height: 520px;
  padding: 50px 28px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  background: rgba(16, 185, 129, 0.12);
  color: #a7f3d0;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
}

.hero-heading {
  margin: 20px 0 10px;
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  background: linear-gradient(90deg, #fbbf24 0%, #a78bfa 40%, #38bdf8 100%);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}

.hero-copy {
  margin: 18px auto 0;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.8;
  font-size: 1rem;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 720px;
  margin: 28px auto 0;
}

.hero-actions .button {
  min-height: 56px;
  font-size: 1rem;
}

.hero-footer {
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(16px);
  z-index: 50;
}

.modal-panel {
  position: relative;
  width: min(680px, 100%);
  background: rgba(8, 17, 13, 0.96);
  border: 1px solid rgba(16, 185, 129, 0.14);
  border-radius: 28px;
  padding: 28px;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(16, 185, 129, 0.14);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: #f8fafc;
  font-size: 1.25rem;
  cursor: pointer;
}

.modal-intro,
.connect-copy,
.dashboard-header {
  display: grid;
  gap: 10px;
  text-align: center;
}

.modal-logo {
  margin: 0 auto;
  width: 62px;
  height: 62px;
  border-radius: 24px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.08);
  display: grid;
  place-items: center;
}

.modal-logo img {
  width: 34px;
  height: 34px;
}

.modal-intro h3,
.dashboard-header h3 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: -0.04em;
}

.modal-intro p,
.connect-copy p,
.dashboard-header p,
.hero-copy {
  margin: 0;
  color: rgba(255,255,255,0.72);
  line-height: 1.7;
}

.wallet-list,
.whitelist-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.wallet-provider-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 18px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  cursor: pointer;
  text-align: left;
}

.wallet-provider-btn:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.26);
}

.wallet-provider-btn > div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wallet-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(139, 92, 246, 0.14);
  color: #c4b5fd;
  font-weight: 700;
}

.wallet-mark.amber { background: rgba(245, 158, 11, 0.14); color: #fcd34d; }
.wallet-mark.cyan { background: rgba(6, 182, 212, 0.14); color: #7dd3fc; }
.wallet-mark.green { background: rgba(16, 185, 129, 0.12); color: #6ee7b7; }

.wallet-title {
  display: block;
  font-weight: 700;
}

.wallet-description {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.88rem;
}

.wallet-label {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.82rem;
  white-space: nowrap;
}

.link-button.small {
  display: block;
  margin: 10px auto 0;
  color: #c4b5fd;
  font-size: 0.92rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  background: rgba(16, 185, 129, 0.14);
  color: #bef264;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.status-pill.live {
  background: rgba(16, 185, 129, 0.15);
}

.whitelist-form label,
.swap-card label,
.referral-card label {
  display: grid;
  gap: 8px;
  font-size: 0.78rem;
  color: #d1d5db;
}

.whitelist-form input,
.swap-card input,
.referral-input-row input {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  background: rgba(255,255,255,0.05);
  color: #f8fafc;
  padding: 14px 16px;
  font-size: 0.95rem;
}

.whitelist-form small {
  color: rgba(255,255,255,0.48);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: rgba(255,255,255,0.75);
  margin-top: 6px;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  margin-top: 4px;
}

.swap-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
}

.swap-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.64);
}

.swap-group {
  display: grid;
  gap: 14px;
}

.swap-group > label {
  display: grid;
  gap: 8px;
  color: rgba(255,255,255,0.72);
}

.swap-group input {
  width: 100%;
}

.swap-group div {
  padding: 14px 16px;
  background: rgba(255,255,255,0.05);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  font-weight: 700;
}

.swap-action {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(16, 185, 129, 0.26);
  background: rgba(16, 185, 129, 0.12);
  color: #a7f3d0;
  font-size: 1.1rem;
  cursor: pointer;
}

.referral-card,
.quests-card {
  padding: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
}

.referral-card > label,
.quests-card > span {
  display: block;
  font-size: 0.75rem;
  color: #a5b4fc;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.referral-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.referral-input-row input {
  min-width: 0;
  font-family: monospace, ui-monospace, monospace;
}

.quests-card {
  display: grid;
  gap: 12px;
}

.quest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}

.quest-item > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quest-icon {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  font-size: 0.85rem;
}

.quest-icon.secondary {
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
}

.quest-item strong,
.quest-item span {
  font-size: 0.9rem;
}

.quest-item small,
.quest-item .quest-description {
  display: block;
  color: rgba(255,255,255,0.56);
  font-size: 0.78rem;
}

.logout {
  display: block;
  margin: 0 auto;
  color: rgba(255,255,255,0.6);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 18px;
}

.dashboard-grid > div {
  text-align: center;
}

.dashboard-grid span {
  display: block;
  font-size: 0.72rem;
  color: rgba(14, 165, 233, 0.75);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-grid strong {
  display: block;
  margin-top: 10px;
  font-size: 1.6rem;
  color: #fff;
}

.dashboard-grid small {
  font-size: 0.8rem;
  color: #a5f3fc;
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, #10b981, #8b5cf6);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

.footer-pill {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  pointer-events: none;
}

.mobile-menu.open {
  pointer-events: auto;
}

.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
}

.mobile-menu-panel {
  position: relative;
  width: min(320px, 100%);
  background: rgba(4, 11, 7, 0.96);
  border-left: 1px solid rgba(255,255,255,0.08);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.mobile-menu.open .mobile-menu-panel {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-branding {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f8fafc;
  font-weight: 700;
}

.mobile-branding img {
  width: 34px;
  height: 34px;
}

.mobile-links {
  display: grid;
  gap: 12px;
}

.mobile-nav-link {
  display: block;
  padding: 14px 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  color: #edf2f7;
  text-decoration: none;
}

.mobile-nav-link:hover {
  background: rgba(16, 185, 129, 0.16);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  padding: 14px 22px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.93);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  z-index: 70;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.toast.visible {
  opacity: 1;
}

#mobile-menu-toggle { display: none; }

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .desktop-nav {
    display: none;
  }

  #mobile-menu-toggle { display: inline-flex; }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 42px 20px;
  }

  .modal-panel {
    padding: 22px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100%, calc(100% - 24px));
    padding: 18px 0 28px;
  }

  .hero {
    min-height: auto;
    border-radius: 20px;
  }

  .hero-heading {
    font-size: clamp(2rem, 9vw, 3.2rem);
    line-height: 1.02;
  }

  .hero-content { padding: 28px 16px; }

  .hero-actions { grid-template-columns: 1fr; gap: 12px; }

  .modal-panel {
    border-radius: 18px;
    padding: 18px;
  }
}
