@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Nunito:wght@300;400;600;700&display=swap');

:root {
  /* Color palette */
  --color-background: #0e0518;
  --color-surface: #1a0a2e;
  --color-surface-variant: #2d1a4a;
  --color-primary: #e91e8c;
  --color-primary-hover: #ff3fa5;
  --color-secondary: #ff6b9d;
  --color-accent: #c77dff;
  --color-on-background: #f5e6ff;
  --color-on-surface: #e8d5f8;
  --color-muted: #9a7db8;

  /* Fonts */
  --font-headline: 'Playfair Display', Georgia, serif;
  --font-body: 'Nunito', 'Segoe UI', sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 32px;
  --radius-full: 9999px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-background);
  color: var(--color-on-background);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background mesh gradient */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(199, 125, 255, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(233, 30, 140, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 107, 157, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-headline);
  line-height: 1.2;
  color: var(--color-on-background);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); font-weight: 600; }
p  { color: var(--color-on-surface); }

a {
  color: var(--color-secondary);
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.85rem 2.2rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  box-shadow: 0 4px 24px rgba(233, 30, 140, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 36px rgba(233, 30, 140, 0.55);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background: rgba(233, 30, 140, 0.12);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255,255,255,0.07);
  color: var(--color-on-background);
  border: 1px solid rgba(255,255,255,0.12);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.12);
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 5, 24, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(199, 125, 255, 0.12);
}

.navbar-brand {
  font-family: var(--font-headline);
  font-size: 1.6rem;
  font-weight: 900;
  font-style: italic;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.user-avatar-nav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-primary);
}

.user-name-nav {
  font-weight: 600;
  color: var(--color-on-background);
  font-size: 0.95rem;
}

/* Hero Section */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 30, 140, 0.2) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: rgba(233, 30, 140, 0.15);
  border: 1px solid rgba(233, 30, 140, 0.35);
  border-radius: var(--radius-full);
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: var(--space-lg);
}

.hero-title {
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, #fff 30%, var(--color-secondary) 70%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-muted);
  margin-bottom: var(--space-xl);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* Feature cards */
.features {
  padding: var(--space-xl) var(--space-lg);
  max-width: 1100px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid rgba(199, 125, 255, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(233, 30, 140, 0.35);
  box-shadow: 0 8px 32px rgba(233, 30, 140, 0.15);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  display: block;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--color-on-background);
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.6;
}

/* Section headings */
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
  display: block;
}

.section-title {
  margin-bottom: var(--space-md);
}

/* Dashboard layout */
.dashboard-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-lg);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Profile card */
.profile-card {
  background: var(--color-surface);
  border: 1px solid rgba(199, 125, 255, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
}

.profile-avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-primary);
  box-shadow: 0 0 24px rgba(233, 30, 140, 0.35);
  margin: 0 auto var(--space-md);
  display: block;
  background: var(--color-surface-variant);
}

.profile-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(46, 213, 115, 0.15);
  border: 1px solid rgba(46, 213, 115, 0.35);
  color: #2ed573;
  border-radius: var(--radius-full);
  padding: 0.2rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: var(--space-sm);
}

/* Content cards */
.content-card {
  background: var(--color-surface);
  border: 1px solid rgba(199, 125, 255, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.content-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-body);
}

/* Claims */
.claim-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(199, 125, 255, 0.1);
  font-size: 0.9rem;
}

.claim-item:last-child {
  border-bottom: none;
}

.claim-item strong {
  color: var(--color-muted);
  min-width: 140px;
  flex-shrink: 0;
  font-weight: 600;
}

.claim-item span {
  color: var(--color-on-background);
}

/* Match cards (decorative) */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md);
}

.match-card {
  background: var(--color-surface-variant);
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3/4;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.match-card:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 24px rgba(233, 30, 140, 0.25);
}

.match-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--space-sm);
  background: linear-gradient(135deg, var(--color-surface-variant), rgba(233,30,140,0.1));
}

.match-placeholder::before {
  content: attr(data-initials);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  font-size: 2.5rem;
  font-family: var(--font-headline);
  font-weight: 700;
  color: rgba(255,255,255,0.15);
}

.match-name {
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  color: #fff;
  position: relative;
  z-index: 1;
}

/* Error page */
.error-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  text-align: center;
}

.error-card {
  background: var(--color-surface);
  border: 1px solid rgba(199, 125, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  max-width: 480px;
  width: 100%;
}

.error-icon {
  font-size: 4rem;
  margin-bottom: var(--space-md);
  display: block;
}

.error-message-text {
  color: var(--color-muted);
  margin-bottom: var(--space-lg);
  font-size: 0.95rem;
}

/* Divider */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(199, 125, 255, 0.3), transparent);
  margin: var(--space-xl) 0;
}

/* Footer */
.footer {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  border-top: 1px solid rgba(199, 125, 255, 0.1);
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 24px rgba(233, 30, 140, 0.4); }
  50%       { box-shadow: 0 4px 40px rgba(233, 30, 140, 0.7); }
}

.animate-in {
  animation: fadeInUp 0.6s ease both;
}

.animate-in-1 { animation-delay: 0.1s; }
.animate-in-2 { animation-delay: 0.2s; }
.animate-in-3 { animation-delay: 0.3s; }
.animate-in-4 { animation-delay: 0.4s; }
.animate-in-5 { animation-delay: 0.5s; }

.btn-primary {
  animation: pulse-glow 3s ease-in-out infinite;
}

.btn-primary:hover {
  animation: none;
}

/* Responsive — tablet */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .matches-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Responsive — mobile */
@media (max-width: 600px) {
  :root {
    --space-xl: 2.5rem;
    --space-lg: 1.25rem;
  }

  /* Navbar */
  .navbar {
    padding: 0.75rem var(--space-md);
    gap: var(--space-sm);
  }

  .navbar-brand {
    font-size: 1.3rem;
  }

  /* Hide user name in nav on small screens — avatar + sign-out is enough */
  .user-name-nav {
    display: none;
  }

  .navbar-actions {
    gap: var(--space-sm);
  }

  /* Hero */
  .hero {
    min-height: 75vh;
    padding: var(--space-lg) var(--space-md);
  }

  .hero-glow {
    width: 280px;
    height: 280px;
  }

  .hero-badge {
    font-size: 0.72rem;
  }

  /* Full-width CTA buttons in hero */
  .hero-content .btn {
    width: 100%;
    justify-content: center;
  }

  /* Features */
  .features {
    padding: var(--space-lg) var(--space-md);
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  /* How It Works inline section */
  .steps-row {
    flex-direction: column;
    gap: var(--space-lg);
    align-items: center;
  }

  /* Dashboard */
  .dashboard-wrapper {
    padding: var(--space-md);
  }

  .matches-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Claim items: stack label above value on very narrow screens */
  .claim-item {
    flex-direction: column;
    gap: 2px;
  }

  .claim-item strong {
    min-width: unset;
  }

  /* Error card */
  .error-card {
    padding: var(--space-lg);
  }

  /* Footer */
  .footer {
    padding: var(--space-lg) var(--space-md);
    font-size: 0.8rem;
  }

  /* Divider spacing */
  .divider {
    margin: var(--space-lg) 0;
  }

  /* Ensure all buttons meet 44px touch target minimum */
  .btn {
    min-height: 44px;
  }
}
