/* ============================================================
   How to Pronounce Names — Design System
   Outfit (headings) + Inter (body) | Dark mode | Teal/Amber
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=Inter:wght@400;500;600&family=Noto+Sans+Devanagari:wght@400;600&display=swap');

/* ── Custom Properties ── */
:root {
  --bg:           #0A0E17; /* Deep professional midnight slate */
  --surface:      #111726; /* Flat Slate-900 panel background */
  --surface-2:    #1B2336; /* Slate-800 secondary surfaces */
  --card:         #111726;
  --card-hover:   #171F33;
  --border:       rgba(255,255,255,0.06);
  --border-glow:  rgba(59,130,246,0.25);

  --saffron:      #3B82F6; /* Cobalt Blue Brand Accent */
  --saffron-dim:  rgba(59,130,246,0.1);
  --teal:         #64748B; /* Slate Gray Secondary */
  --teal-dim:     rgba(100,116,139,0.1);
  
  --female:       #F43F5E; /* Modern Rose Pink */
  --female-dim:   rgba(244,63,94,0.08);
  --male:         #3B82F6; /* Cobalt Blue */
  --male-dim:     rgba(59,130,246,0.08);
  
  --birthday:     #D97706; /* Flat Amber */
  --birthday-dim: rgba(217,119,6,0.08);
  
  --like:         #10B981; /* Emerald Green */
  --dislike:      #EF4444; /* Rose Red */

  --text:         #F9FAFB; /* Off-white */
  --text-muted:   #94A3B8; /* Slate-400 */
  --text-dim:     #64748B; /* Slate-500 */

  --radius-sm:    4px;
  --radius-md:    6px;
  --radius-lg:    8px;
  --radius-xl:    8px;
  --radius-full:  9999px;

  --shadow:       0 4px 16px -2px rgba(0,0,0,0.5);
  --shadow-glow:  none;

  --transition:   0.15s ease-in-out;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { max-width: 100%; }

/* ── Typography ── */
h1,h2,h3,h4 { font-family: 'Outfit', sans-serif; font-weight: 700; line-height: 1.2; }
.devanagari  { font-family: 'Noto Sans Devanagari', sans-serif; }

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

/* ============================================================
   Header / Nav
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 800; font-size: 1.25rem;
  color: var(--text);
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  padding: 80px 0 60px;
  background: var(--bg);
}
.hero-content { position: relative; text-align: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: var(--radius-md);
  padding: 6px 14px; font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800; margin-bottom: 16px;
}
.hero h1 span {
  color: var(--saffron);
}it-text-fill-color: transparent;
}
.hero-sub {
  font-size: 1.1rem; color: var(--text-muted);
  max-width: 500px; margin: 0 auto 40px;
}

/* Search bar */
.search-wrap { position: relative; max-width: 580px; margin: 0 auto; }
.search-input {
  width: 100%;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 56px 16px 24px;
  font-size: 1.05rem; color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input::placeholder { color: var(--text-dim); }
.search-input:focus {
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px var(--saffron-dim), var(--shadow);
}
.search-icon {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); pointer-events: none; font-size: 1.1rem;
}
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow); z-index: 50;
  display: none;
}
.search-results.visible { display: block; }
.search-result-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  font-size: 0.95rem; font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--card-hover); }
.search-result-item .voice-badges { display: flex; gap: 6px; }
.badge {
  font-size: 0.7rem; font-weight: 600; padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.badge-f { background: var(--female-dim); color: var(--female); }
.badge-m { background: var(--male-dim);   color: var(--male); }
.search-no-result { padding: 16px 20px; color: var(--text-muted); font-size: 0.9rem; }

/* Hero stats */
.hero-stats {
  display: flex; justify-content: center; gap: 40px;
  margin-top: 40px;
}
.stat { text-align: center; }
.stat-num {
  font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 700;
  color: var(--text);
}
.stat-lbl { font-size: 0.8rem; color: var(--text-dim); margin-top: 2px; }

/* ============================================================
   A–Z Letter Nav
   ============================================================ */
.alpha-section { padding: 40px 0 32px; }
.alpha-section h2 {
  font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px;
}
.alpha-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.alpha-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem; font-weight: 600; color: var(--text-muted);
  transition: all var(--transition);
}
.alpha-btn:hover, .alpha-btn.active {
  background: var(--saffron-dim); border-color: var(--saffron);
  color: var(--saffron);
}

/* ============================================================
   Name Cards Grid
   ============================================================ */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-family: 'Outfit', sans-serif; font-size: 1.3rem; font-weight: 700;
}
.view-all {
  font-size: 0.85rem; color: var(--saffron);
  display: flex; align-items: center; gap: 6px;
  transition: gap var(--transition);
}
.view-all:hover { gap: 10px; }

.names-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.name-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 18px 20px;
  cursor: pointer; display: flex; flex-direction: column; gap: 10px;
  transition: all var(--transition);
}
.name-card:hover {
  background: var(--card-hover); border-color: var(--border-glow);
}
.name-card-title {
  font-family: 'Outfit', sans-serif; font-size: 1.1rem; font-weight: 700;
}
.name-card-badges { display: flex; gap: 6px; }
.name-card-play {
  margin-left: auto; width: 32px; height: 32px;
  background: var(--saffron-dim); border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--saffron); font-size: 0.75rem;
  transition: all var(--transition);
}
.name-card:hover .name-card-play {
  background: var(--saffron); color: white;
}

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; padding: 40px 0;
}
.page-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.9rem; color: var(--text-muted);
  transition: all var(--transition);
}
.page-btn:hover, .page-btn.active {
  background: var(--saffron); border-color: var(--saffron);
  color: white; font-weight: 600;
}
.page-btn.disabled { opacity: 0.3; pointer-events: none; }

/* ============================================================
   Name Detail Page
   ============================================================ */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--text-dim); padding: 24px 0 8px;
}
.breadcrumb a { color: var(--text-muted); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--saffron); }
.breadcrumb-sep { color: var(--text-dim); }

.name-hero { padding: 32px 0 48px; }
.name-hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}

/* Audio cards */
.audio-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  margin-bottom: 32px;
}
@media (max-width: 600px) { .audio-grid { grid-template-columns: 1fr; } }

.audio-card {
  border-radius: var(--radius-md); padding: 28px;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.audio-card.female {
  background: var(--surface);
  border-color: var(--border);
}
.audio-card.male {
  background: var(--surface);
  border-color: var(--border);
}
.audio-card.rating-card {
  background: var(--surface);
  border-color: var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
}
.audio-card:hover { border-color: var(--border-glow); }

.audio-card-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
}
.voice-icon {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.audio-card.female .voice-icon { background: var(--female-dim); color: var(--female); }
.audio-card.male   .voice-icon { background: var(--male-dim);   color: var(--male); }

.voice-label {
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.05rem;
}
.audio-card.female .voice-label { color: var(--female); }
.audio-card.male   .voice-label { color: var(--male); }

/* Waveform */
.waveform {
  display: flex; align-items: center; gap: 3px;
  height: 32px; margin-bottom: 20px;
}
.waveform span {
  display: inline-block; width: 3px; height: 6px;
  border-radius: 3px; transition: height 0.15s ease;
}
.audio-card.female .waveform span { background: var(--female); }
.audio-card.male   .waveform span { background: var(--male); }
.waveform.playing span { animation: wave-bar 0.8s ease-in-out infinite alternate; }
.waveform.playing span:nth-child(1)  { animation-delay: 0.00s; }
.waveform.playing span:nth-child(2)  { animation-delay: 0.06s; }
.waveform.playing span:nth-child(3)  { animation-delay: 0.12s; }
.waveform.playing span:nth-child(4)  { animation-delay: 0.18s; }
.waveform.playing span:nth-child(5)  { animation-delay: 0.24s; }
.waveform.playing span:nth-child(6)  { animation-delay: 0.18s; }
.waveform.playing span:nth-child(7)  { animation-delay: 0.12s; }
.waveform.playing span:nth-child(8)  { animation-delay: 0.06s; }
.waveform.playing span:nth-child(9)  { animation-delay: 0.00s; }
.waveform.playing span:nth-child(10) { animation-delay: 0.06s; }
@keyframes wave-bar {
  0%   { height: 4px; }
  100% { height: 26px; }
}

/* Play button */
.play-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: var(--radius-full);
  font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 0.95rem;
  transition: all var(--transition);
}
.audio-card.female .play-btn {
  background: var(--female); color: white;
}
.audio-card.male .play-btn {
  background: var(--male); color: white;
}
.play-btn:hover { transform: scale(1.04); box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.play-btn.playing { opacity: 0.85; }

/* Reviews */
.reviews-section { margin-top: 40px; }
.reviews-title {
  font-family: 'Outfit', sans-serif; font-size: 1.1rem; font-weight: 700;
  margin-bottom: 16px; color: var(--text-muted);
}
.review-bar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.vote-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--radius-full);
  font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 0.95rem;
  border: 2px solid transparent;
  transition: all var(--transition);
}
.vote-btn.like {
  background: rgba(34,197,94,0.1); color: var(--like);
  border-color: rgba(34,197,94,0.25);
}
.vote-btn.dislike {
  background: rgba(239,68,68,0.1); color: var(--dislike);
  border-color: rgba(239,68,68,0.25);
}
.vote-btn.like:hover    { background: var(--like);    color: white; border-color: var(--like); }
.vote-btn.dislike:hover { background: var(--dislike); color: white; border-color: var(--dislike); }
.vote-btn.voted { opacity: 0.65; pointer-events: none; }
.vote-count { font-size: 1rem; font-weight: 700; }

/* ============================================================
   Browse page — letter tabs
   ============================================================ */
.browse-header { padding: 32px 0 24px; }
.browse-title { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.browse-subtitle { color: var(--text-muted); }

.letter-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 24px 0;
}
.letter-tab {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif; font-weight: 600;
  color: var(--text-muted); transition: all var(--transition);
}
.letter-tab:hover {
  background: var(--saffron-dim); border-color: rgba(14,165,233,0.4);
  color: var(--saffron);
}
.letter-tab.active {
  background: var(--saffron); border-color: var(--saffron);
  color: white; transform: translateY(-2px);
}
.browse-count {
  font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px;
}

/* ============================================================
   Loading / Empty states
   ============================================================ */
.loading-wrap { padding: 80px 0; text-align: center; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--saffron);
  border-radius: 50%; animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { padding: 60px 0; text-align: center; color: var(--text-dim); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  margin-top: 80px; padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center; color: var(--text-dim); font-size: 0.85rem;
}
.site-footer a { color: var(--saffron); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .hero { padding: 64px 0 48px; }
  .hero-stats { gap: 24px; }
  .names-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .nav-links { display: none; }
}

/* ── Birthday Card Specifics ── */
.audio-card.birthday {
  background: var(--surface);
  border-color: var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  gap: 20px;
}
.audio-card.birthday .voice-icon {
  background: var(--birthday-dim);
  color: var(--birthday);
  font-size: 1.3rem;
}
.audio-card.birthday .voice-label {
  color: var(--birthday);
}
.audio-card.birthday .play-btn {
  background: var(--birthday);
}

/* ── Name Metadata Cards ── */
.metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.metadata-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.metadata-card:hover {
  border-color: var(--border-glow);
}
.metadata-card-header {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.metadata-card-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
}
.metadata-card-value.devanagari {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 2.2rem;
  font-weight: 600;
}
.metadata-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.meaning-card {
  grid-column: span 2;
}
@media (max-width: 768px) {
  .meaning-card {
    grid-column: span 1;
  }
}

/* ── Script Item styles ── */
.script-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color var(--transition), background var(--transition);
}
.script-item:hover {
  border-color: var(--border-glow);
  background: rgba(255,255,255,0.02);
}
.script-lang {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.script-val {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.script-val.devanagari {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 1.6rem;
}

