/* ============================================
   MEMPALACE — Main Stylesheet
   Mobile-first, dark-space design
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --bg-primary: #080C18;
  --bg-secondary: #0D1226;
  --bg-card: #111827;
  --bg-card-hover: #1A2235;
  --border: rgba(123, 47, 255, 0.2);
  --border-glow: rgba(0, 245, 255, 0.3);

  --purple: #7B2FFF;
  --purple-light: #9B59FF;
  --purple-dark: #5A1FCC;
  --cyan: #00F5FF;
  --cyan-dim: rgba(0, 245, 255, 0.15);
  --gold: #FFD700;
  --gold-dim: rgba(255, 215, 0, 0.15);

  --text-primary: #F0F4FF;
  --text-secondary: #8899BB;
  --text-muted: #556080;

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --shadow-purple: 0 0 40px rgba(123, 47, 255, 0.25);
  --shadow-cyan: 0 0 40px rgba(0, 245, 255, 0.15);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 7vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
p { color: var(--text-secondary); line-height: 1.75; }

.gradient-text {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple-light) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-purple {
  background: linear-gradient(135deg, var(--purple-light), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) { .container { padding: 0 2rem; } }
@media (min-width: 1200px) { .container { padding: 0 2.5rem; } }

section { padding: 5rem 0; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
}

.nav.scrolled {
  background: rgba(8, 12, 24, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.logo-icon {
  width: 38px; height: 38px;
  position: relative;
  flex-shrink: 0;
}

.logo-mark {
  width: 100%; height: 100%;
}

.logo-text-mp {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-text-rest { color: var(--text-primary); }

/* Nav Links */
.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) { .nav-links { display: flex; } }

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--cyan); }
.nav-links a.active::after { transform: scaleX(1); }

/* Nav Actions */
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  cursor: pointer;
  background: none; border: none;
}
@media (min-width: 768px) { .hamburger { display: none; } }

.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed; top: 65px; left: 0; right: 0;
  background: rgba(8, 12, 24, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem;
  z-index: 999;
  flex-direction: column;
  gap: 1rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 1rem; font-weight: 500;
  color: var(--text-secondary); padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}
.mobile-menu a:hover, .mobile-menu a.active { color: var(--cyan); }
.mobile-menu .btn { width: 100%; text-align: center; margin-top: 0.5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  color: #fff;
  box-shadow: 0 4px 20px rgba(123, 47, 255, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(123, 47, 255, 0.5);
}

.btn-cyan {
  background: linear-gradient(135deg, var(--cyan), #00C8FF);
  color: #000;
  box-shadow: 0 4px 20px rgba(0, 245, 255, 0.3);
}
.btn-cyan:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 245, 255, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--purple);
  color: var(--purple-light);
  background: rgba(123, 47, 255, 0.08);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--text-primary); }

.btn-lg { padding: 1rem 2.25rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.82rem; }

.btn-icon {
  width: 38px; height: 38px;
  padding: 0;
  border-radius: 50%;
  font-size: 1rem;
}

/* ---------- Hero Section ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-bg {
  position: absolute; inset: 0;
  pointer-events: none;
}

.hero-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(123, 47, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123, 47, 255, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.5;
}
.hero-orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(123, 47, 255, 0.3), transparent 70%);
  top: -200px; right: -200px;
}
.hero-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0, 245, 255, 0.2), transparent 70%);
  bottom: -100px; left: -100px;
}
.hero-orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.1), transparent 70%);
  top: 40%; left: 40%;
}

.hero-content {
  position: relative; z-index: 1;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(123, 47, 255, 0.12);
  border: 1px solid rgba(123, 47, 255, 0.3);
  border-radius: 100px;
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--purple-light);
  margin-bottom: 2rem;
  animation: fadeInDown 0.6s ease;
}

.hero-badge .dot {
  width: 6px; height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.7s ease 0.1s both;
}

.hero p.lead {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 2.5rem;
  animation: fadeInUp 0.7s ease 0.2s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 4rem;
  animation: fadeInUp 0.7s ease 0.3s both;
}

/* Stats Row */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: fadeInUp 0.7s ease 0.4s both;
}

@media (min-width: 640px) {
  .hero-stats { grid-template-columns: repeat(4, 1fr); }
}

.stat-item {
  background: var(--bg-card);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: background var(--transition);
}
.stat-item:hover { background: var(--bg-card-hover); }

.stat-value {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Section Titles ---------- */
.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-bottom: 1rem;
}

.section-title { margin-bottom: 1rem; }
.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto;
}

.text-center { text-align: center; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(123, 47, 255, 0.04), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), var(--shadow-purple);
}
.card:hover::before { opacity: 1; }

/* ---------- Feature Grid ---------- */
.features { background: var(--bg-secondary); }

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 3.5rem;
}

@media (min-width: 640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card { height: 100%; }

.feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  position: relative;
}

.feature-icon.purple { background: rgba(123, 47, 255, 0.15); }
.feature-icon.cyan { background: rgba(0, 245, 255, 0.12); }
.feature-icon.gold { background: rgba(255, 215, 0, 0.12); }
.feature-icon.green { background: rgba(0, 220, 130, 0.12); }
.feature-icon.rose { background: rgba(255, 80, 120, 0.12); }
.feature-icon.blue { background: rgba(60, 130, 255, 0.12); }

.feature-card h3 { margin-bottom: 0.75rem; font-size: 1.1rem; }
.feature-card p { font-size: 0.9rem; }

/* ---------- How It Works ---------- */
.how-it-works { background: var(--bg-primary); }

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 3.5rem;
}
@media (min-width: 768px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }

.step-card {
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
}

.step-number {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.3rem; font-weight: 800;
  color: #fff;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 30px rgba(123, 47, 255, 0.5);
}

.step-card h3 { margin-bottom: 0.75rem; }
.step-card p { font-size: 0.9rem; }

.step-connector {
  display: none;
  position: absolute; top: 50%; right: -1rem;
  width: 2rem; height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
}
@media (min-width: 768px) { .step-connector { display: block; } }

/* ---------- Benchmarks ---------- */
.benchmarks { background: var(--bg-secondary); }

.bench-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-top: 3rem;
}

.bench-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.9rem;
}

.bench-table th {
  background: rgba(123, 47, 255, 0.1);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.bench-table td {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
}
.bench-table tbody tr:last-child td { border-bottom: none; }
.bench-table tbody tr:hover td { background: rgba(123, 47, 255, 0.04); }

.bench-table .highlight-row td {
  color: var(--text-primary);
  font-weight: 600;
}
.bench-table .highlight-row td:first-child {
  color: var(--cyan);
}

.score-bar-wrap {
  display: flex; align-items: center; gap: 0.75rem;
}
.score-bar {
  height: 6px; border-radius: 3px;
  background: rgba(123, 47, 255, 0.2);
  flex: 1; min-width: 80px;
}
.score-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  transition: width 1s ease;
}
.score-fill.gold { background: linear-gradient(90deg, var(--gold), #FFA500); }

/* ---------- CTA Section ---------- */
.cta-section {
  background: linear-gradient(135deg, rgba(123, 47, 255, 0.12), rgba(0, 245, 255, 0.06));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  position: relative; overflow: hidden;
}

.cta-section .hero-orb-1 { opacity: 0.3; top: -100px; right: 0; }
.cta-section .hero-orb-2 { opacity: 0.2; bottom: -100px; left: 0; }

.cta-section h2 { margin-bottom: 1rem; }
.cta-section p {
  max-width: 500px; margin: 0 auto 2.5rem;
  font-size: 1.05rem;
}
.cta-actions {
  display: flex; flex-wrap: wrap;
  gap: 1rem; justify-content: center;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer-brand .nav-logo { margin-bottom: 1rem; }
.footer-brand p { font-size: 0.88rem; max-width: 260px; margin-bottom: 1.5rem; }

.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-muted); font-size: 1rem;
  transition: var(--transition);
}
.footer-social a:hover {
  border-color: var(--purple); color: var(--purple-light);
  background: rgba(123, 47, 255, 0.1);
}

.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col ul li a {
  font-size: 0.9rem; color: var(--text-secondary);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--cyan); }

.footer-badge {
  display: flex;
  justify-content: center;
  padding-bottom: 2rem;
}
.footer-badge img {
  display: block;
  border-radius: 8px;
  opacity: 0.9;
  transition: opacity 0.2s;
}
.footer-badge a:hover img { opacity: 1; }

.footer-bottom {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.footer-bottom p { font-size: 0.82rem; color: var(--text-muted); }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a { font-size: 0.82rem; color: var(--text-muted); transition: color var(--transition); }
.footer-bottom-links a:hover { color: var(--text-secondary); }

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
  padding: 8rem 0 4rem;
  position: relative; overflow: hidden;
  text-align: center;
}
.page-hero h1 { margin-bottom: 1rem; }
.page-hero p { font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* ---------- Login Page ---------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 4rem;
  position: relative;
  overflow: hidden;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative; z-index: 1;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), var(--shadow-purple);
}

@media (min-width: 640px) { .auth-card { padding: 3rem; } }

.auth-logo {
  display: flex; align-items: center; justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
  font-family: var(--font-heading);
  font-weight: 800; font-size: 1.4rem;
}

.auth-tabs {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 2rem;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  padding: 0.6rem;
  border: none; background: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.88rem; font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.auth-tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }
.auth-panel { display: none; }
.auth-panel.active { display: block; }

/* Form Elements */
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }

.form-label {
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-secondary);
}

.form-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: var(--transition);
  width: 100%;
  outline: none;
}
.form-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(123, 47, 255, 0.15);
}
.form-input::placeholder { color: var(--text-muted); }

.form-hint { font-size: 0.78rem; color: var(--text-muted); }
.form-error { font-size: 0.78rem; color: #FF6B6B; display: none; }
.form-error.show { display: block; }
.form-success { font-size: 0.78rem; color: var(--cyan); display: none; }
.form-success.show { display: block; }

.form-divider {
  display: flex; align-items: center; gap: 1rem;
  margin: 1rem 0;
}
.form-divider::before, .form-divider::after {
  content: '';
  flex: 1; height: 1px; background: var(--border);
}
.form-divider span { font-size: 0.8rem; color: var(--text-muted); }

/* Wallet Buttons */
.wallet-options { display: flex; flex-direction: column; gap: 0.75rem; }

.wallet-btn {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.9rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem; font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}
.wallet-btn:hover {
  border-color: var(--purple);
  background: rgba(123, 47, 255, 0.08);
  transform: translateY(-1px);
}

.wallet-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.wallet-icon.metamask { background: linear-gradient(135deg, #F6851B, #E2761B); }
.wallet-icon.phantom { background: linear-gradient(135deg, #AB9FF2, #7C67F2); }

.wallet-btn-text { flex: 1; text-align: left; }
.wallet-btn-text small { display: block; font-size: 0.75rem; color: var(--text-muted); font-weight: 400; }

.wallet-arrow { color: var(--text-muted); }

.wallet-status {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.85rem; font-weight: 500;
  display: none;
  align-items: center; gap: 0.5rem;
}
.wallet-status.success {
  display: flex;
  background: rgba(0, 220, 130, 0.1);
  border: 1px solid rgba(0, 220, 130, 0.3);
  color: #00DC82;
}
.wallet-status.error {
  display: flex;
  background: rgba(255, 80, 80, 0.1);
  border: 1px solid rgba(255, 80, 80, 0.3);
  color: #FF6B6B;
}

/* Password toggle */
.input-wrap { position: relative; }
.input-wrap .form-input { padding-right: 2.8rem; }
.toggle-pass {
  position: absolute; right: 0.85rem; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1rem;
  transition: color var(--transition);
}
.toggle-pass:hover { color: var(--text-primary); }

/* ---------- Dashboard ---------- */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 65px;
}

.sidebar {
  width: 260px; flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  position: fixed; top: 65px; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
}
@media (min-width: 1024px) { .sidebar { display: flex; } }

.sidebar-section-label {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 1rem 0.5rem 0.5rem;
}

.sidebar-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
  border: none; background: none; width: 100%; text-align: left;
  text-decoration: none;
}
.sidebar-link:hover { color: var(--text-primary); background: rgba(123, 47, 255, 0.08); }
.sidebar-link.active { color: var(--cyan); background: rgba(0, 245, 255, 0.08); }
.sidebar-link span.icon { font-size: 1.1rem; width: 20px; text-align: center; }

.dashboard-content {
  flex: 1;
  padding: 2rem 1.5rem;
  overflow-x: hidden;
}
@media (min-width: 1024px) { .dashboard-content { margin-left: 260px; } }

.dash-header {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1rem;
  margin-bottom: 2rem;
}
.dash-header h2 { font-size: 1.5rem; }

.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
@media (min-width: 640px) { .dash-stats-grid { grid-template-columns: repeat(4, 1fr); } }

.dash-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.dash-stat-val {
  font-family: var(--font-heading);
  font-size: 1.8rem; font-weight: 800;
  line-height: 1; margin-bottom: 0.3rem;
}
.dash-stat-label { font-size: 0.78rem; color: var(--text-muted); }

.dash-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) { .dash-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .dash-grid { grid-template-columns: 3fr 2fr; } }

/* Search Box */
.search-box {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  margin-bottom: 1rem;
}
.search-box:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(123, 47, 255, 0.15);
}
.search-input {
  flex: 1; padding: 0.9rem 1.25rem;
  background: none; border: none; outline: none;
  font-family: var(--font-body); font-size: 0.95rem;
  color: var(--text-primary);
}
.search-input::placeholder { color: var(--text-muted); }
.search-btn {
  padding: 0.9rem 1.25rem;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  border: none; cursor: pointer;
  color: #fff; font-size: 1rem;
  transition: var(--transition);
}
.search-btn:hover { background: var(--purple-light); }

/* Memory Results */
.memory-result {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: var(--transition);
}
.memory-result:hover { border-color: var(--border-glow); }
.memory-result-meta {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.memory-tag {
  font-size: 0.72rem; font-weight: 700;
  padding: 0.2rem 0.6rem; border-radius: 100px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.tag-decision { background: rgba(123, 47, 255, 0.15); color: var(--purple-light); }
.tag-preference { background: rgba(0, 245, 255, 0.12); color: var(--cyan); }
.tag-milestone { background: rgba(255, 215, 0, 0.12); color: var(--gold); }
.tag-problem { background: rgba(255, 80, 80, 0.12); color: #FF8080; }
.tag-project { background: rgba(0, 220, 130, 0.12); color: #00DC82; }

.memory-result-text { font-size: 0.9rem; color: var(--text-primary); line-height: 1.5; }
.memory-result-date { font-size: 0.75rem; color: var(--text-muted); }

/* ---------- About Page ---------- */
.about-mission {
  background: var(--bg-secondary);
}

.vision-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 3rem;
}
@media (min-width: 768px) { .vision-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .vision-grid { grid-template-columns: repeat(3, 1fr); } }

.vision-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.vision-card h3 { margin-bottom: 0.75rem; }

/* Timeline */
.timeline { margin-top: 3rem; }
.timeline-item {
  display: flex; gap: 1.5rem;
  padding-bottom: 2.5rem;
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute; top: 36px; left: 15px;
  width: 2px; bottom: 0;
  background: linear-gradient(180deg, var(--purple), transparent);
}
.timeline-item:last-child::before { display: none; }

.timeline-dot {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; z-index: 1;
  box-shadow: 0 0 20px rgba(123, 47, 255, 0.4);
}

.timeline-content h4 { margin-bottom: 0.4rem; }
.timeline-content p { font-size: 0.9rem; }

/* ---------- How-To Page ---------- */
.how-to-nav {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.how-to-nav h3 { font-size: 1rem; margin-bottom: 1rem; }
.how-to-nav ol { list-style: decimal; padding-left: 1.25rem; }
.how-to-nav li { margin-bottom: 0.5rem; }
.how-to-nav li a { color: var(--purple-light); font-size: 0.9rem; transition: color var(--transition); }
.how-to-nav li a:hover { color: var(--cyan); }

.how-to-section { margin-bottom: 3rem; }
.how-to-section h2 { margin-bottom: 1.25rem; }
.how-to-section p { margin-bottom: 1rem; }
.how-to-section ul { list-style: none; }
.how-to-section ul li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.how-to-section ul li::before {
  content: '—';
  position: absolute; left: 0;
  color: var(--cyan);
}

/* Code Blocks */
.code-block {
  background: #0A0E1A;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.25rem 0;
  position: relative; overflow-x: auto;
}
.code-block pre {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--cyan);
  white-space: pre;
}
.copy-btn {
  position: absolute; top: 0.75rem; right: 0.75rem;
  background: rgba(123, 47, 255, 0.2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem; color: var(--text-muted);
  cursor: pointer; transition: var(--transition);
}
.copy-btn:hover { color: var(--cyan); border-color: var(--cyan); }

/* ---------- Cookies Page ---------- */
.legal-content {
  max-width: 760px; margin: 0 auto;
  padding: 2rem 0 5rem;
}
.legal-content h2 { font-size: 1.4rem; margin: 2.5rem 0 0.75rem; color: var(--text-primary); }
.legal-content h3 { font-size: 1.1rem; margin: 2rem 0 0.6rem; color: var(--text-primary); }
.legal-content p { margin-bottom: 1rem; font-size: 0.95rem; }
.legal-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.legal-content ul li { color: var(--text-secondary); margin-bottom: 0.4rem; font-size: 0.95rem; }
.legal-content a { color: var(--purple-light); }
.legal-content a:hover { color: var(--cyan); }

/* Cookie Banner */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(13, 18, 38, 0.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 1.25rem;
  z-index: 9000;
  display: none;
}
.cookie-banner.show { display: block; }
.cookie-inner {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: 1rem;
  max-width: 1200px; margin: 0 auto;
}
.cookie-inner p { font-size: 0.85rem; flex: 1; min-width: 200px; }
.cookie-inner p a { color: var(--purple-light); }
.cookie-actions { display: flex; gap: 0.75rem; flex-shrink: 0; }

/* ---------- Alert / Toast ---------- */
.toast {
  position: fixed; top: 85px; right: 1rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 500;
  z-index: 9999;
  display: flex; align-items: center; gap: 0.5rem;
  transform: translateX(calc(100% + 1rem));
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 340px;
}
.toast.show { transform: translateX(0); }
.toast.success {
  background: rgba(0, 220, 130, 0.15);
  border: 1px solid rgba(0, 220, 130, 0.4);
  color: #00DC82;
}
.toast.error {
  background: rgba(255, 80, 80, 0.15);
  border: 1px solid rgba(255, 80, 80, 0.4);
  color: #FF8080;
}
.toast.info {
  background: rgba(0, 245, 255, 0.1);
  border: 1px solid rgba(0, 245, 255, 0.3);
  color: var(--cyan);
}

/* ---------- Animations ---------- */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Spinner ---------- */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.btn .spinner { display: none; }
.btn.loading .spinner { display: inline-block; }
.btn.loading .btn-label { display: none; }

/* ---------- Misc Utilities ---------- */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.text-cyan { color: var(--cyan); }
.text-purple { color: var(--purple-light); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }
.font-mono { font-family: var(--font-mono); }

.w-full { width: 100%; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--purple-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple); }

/* Selection */
::selection { background: rgba(123, 47, 255, 0.3); color: var(--text-primary); }

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

/* Responsive utilities */
.hidden-mobile { display: none; }
@media (min-width: 768px) { .hidden-mobile { display: block; } }
.hidden-desktop { display: block; }
@media (min-width: 768px) { .hidden-desktop { display: none; } }
