@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@700&display=swap');

:root {
  color-scheme: dark;
  --bg: #0b090c;
  --panel: #151116;
  --soft: #201920;
  --text: #fff8f4;
  --muted: #a99fa5;
  --line: rgba(255, 255, 255, .09);
  --accent: #ff5d73;
  --accent-2: #f6a94a;
  --nav-h: 72px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--text); font-family: 'DM Sans', system-ui, sans-serif; }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.shell { max-width: 1280px; min-height: 100vh; margin: auto; padding: 0 28px 96px 124px; }
.desktop-nav { position: fixed; z-index: 20; top: 0; bottom: 0; left: max(0px, calc(50vw - 640px)); width: 92px; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 14px; border-right: 1px solid var(--line); background: rgba(11, 9, 12, .88); backdrop-filter: blur(18px); }
.brand-mark { width: 48px; height: 48px; margin-bottom: 18px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); font-family: 'Playfair Display', serif; font-size: 24px; box-shadow: 0 10px 30px rgba(255, 93, 115, .25); }
.nav-btn { width: 56px; height: 52px; display: grid; place-items: center; border: 0; border-radius: 17px; background: transparent; color: var(--muted); cursor: pointer; transition: .2s ease; }
.nav-btn:hover, .nav-btn.active { color: white; background: var(--soft); transform: translateY(-1px); }
.nav-btn svg { width: 22px; height: 22px; }
.nav-spacer { flex: 1; }
.topbar { min-height: 94px; display: flex; align-items: center; gap: 24px; }
.wordmark { min-width: 190px; font: 700 28px/1 'Playfair Display', serif; letter-spacing: -.6px; }
.wordmark span { color: var(--accent); }
.search { position: relative; flex: 1; max-width: 520px; }
.search svg { position: absolute; left: 17px; top: 50%; width: 19px; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; height: 48px; padding: 0 18px 0 48px; border: 1px solid var(--line); border-radius: 16px; outline: 0; background: var(--panel); color: white; }
.search input:focus { border-color: rgba(255, 93, 115, .65); box-shadow: 0 0 0 4px rgba(255, 93, 115, .08); }
.pill-button { height: 44px; padding: 0 19px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); cursor: pointer; }
.pill-button svg { width: 19px; height: 19px; }
.pill-button.primary { border: 0; background: var(--accent); font-weight: 700; }
.hero { position: relative; min-height: 330px; overflow: hidden; display: flex; align-items: end; padding: 44px; border: 1px solid var(--line); border-radius: 30px; background: radial-gradient(circle at 80% 20%, rgba(246, 169, 74, .38), transparent 24%), radial-gradient(circle at 70% 90%, rgba(255, 93, 115, .35), transparent 30%), linear-gradient(120deg, #251018 0%, #171116 55%, #111416 100%); }
.hero::after { content: 'बात'; position: absolute; right: 5%; top: -28%; color: rgba(255,255,255,.035); font: 700 250px/1 serif; transform: rotate(-8deg); }
.hero-copy { position: relative; z-index: 1; max-width: 620px; }
.eyebrow { color: #ffc274; font-size: 12px; font-weight: 700; letter-spacing: 2.2px; text-transform: uppercase; }
.hero h1 { max-width: 560px; margin: 10px 0 14px; font: 700 clamp(40px, 6vw, 72px)/.98 'Playfair Display', serif; letter-spacing: -2px; }
.hero p { max-width: 530px; margin: 0 0 24px; color: #d6ccd1; font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions button { height: 48px; padding: 0 22px; border: 0; border-radius: 15px; cursor: pointer; font-weight: 700; }
.hero-actions .start { background: linear-gradient(135deg, var(--accent), #f93d62); box-shadow: 0 12px 30px rgba(255,93,115,.24); }
.hero-actions .ghost { border: 1px solid var(--line); background: rgba(255,255,255,.07); backdrop-filter: blur(8px); }
.section-head { display: flex; align-items: end; justify-content: space-between; margin: 34px 0 18px; }
.section-head h2 { margin: 0; font: 700 27px/1.15 'Playfair Display', serif; }
.section-head p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.text-btn { border: 0; background: none; color: #ffc274; cursor: pointer; }
.chips { display: flex; gap: 9px; margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.chip { flex: 0 0 auto; padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted); cursor: pointer; }
.chip.active { color: #1b0c10; border-color: #ffc274; background: #ffc274; font-weight: 700; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.character-card { position: relative; min-height: 420px; overflow: hidden; display: flex; align-items: end; padding: 22px; border: 1px solid var(--line); border-radius: 24px; background: var(--card-bg); cursor: pointer; isolation: isolate; transition: transform .25s ease, border-color .25s ease; }
.character-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,.2); }
.character-card::before { content: ''; position: absolute; inset: 0; z-index: -2; background-image: var(--photo), radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--portrait) 80%, white 20%) 0%, color-mix(in srgb, var(--portrait) 30%, #0b090c 70%) 55%, #0b090c 100%); background-position: center 22%, center; background-size: cover, cover; background-repeat: no-repeat; filter: saturate(.9); transition: transform .45s ease; }
.character-card:hover::before { transform: scale(1.035); }
.character-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(transparent 15%, rgba(5,5,5,.4) 40%, rgba(5,5,5,.98) 100%); }
.card-info { width: 100%; display: flex; flex-direction: column; }
.presence { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 9px; color: #d5ffd9; font-size: 11px; }
.presence::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #52d273; box-shadow: 0 0 0 3px rgba(82,210,115,.18); }
.card-info h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.4px; }
.card-info .tagline { margin: 6px 0 4px; color: #ffc274; font-style: italic; font-size: 13px; font-weight: 500; line-height: 1.4; opacity: 0.95; }
.card-info .bio { margin: 4px 0 12px; color: #c6bbc1; font-size: 12.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 36px; }
.card-action { width: 100%; margin-top: auto; }
.chat-btn { width: 100%; height: 42px; border: none; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; font-weight: 700; font-size: 13px; cursor: pointer; transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 15px rgba(255, 93, 115, 0.25); display: flex; align-items: center; justify-content: center; gap: 6px; }
.character-card:hover .chat-btn { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255, 93, 115, 0.45); }
.chat-btn:active { transform: translateY(1px); }
.character-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.character-meta span { padding: 5px 8px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; background: rgba(10,8,10,.42); color: #f2e7ed; backdrop-filter: blur(8px); font-size: 10px; }
.heart { position: absolute; top: 15px; right: 15px; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; background: rgba(10,8,10,.34); backdrop-filter: blur(9px); cursor: pointer; }
.heart.saved { color: var(--accent); background: rgba(255,93,115,.18); }
.heart svg { width: 18px; }
.empty { grid-column: 1/-1; padding: 54px 20px; border: 1px dashed var(--line); border-radius: 22px; color: var(--muted); text-align: center; }
.bottom-nav { display: none; }
.view { animation: enter .32s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(7px); } }

.chat-layout { height: calc(100vh - 38px); display: grid; grid-template-rows: auto 1fr auto; max-width: 920px; margin: auto; padding: 18px 0; }
.chat-head { display: flex; align-items: center; gap: 14px; padding: 10px 0 18px; border-bottom: 1px solid var(--line); }
.back { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); cursor: pointer; }
.avatar { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 17px; background-image: var(--photo), radial-gradient(circle at 40% 30%, color-mix(in srgb, var(--portrait) 90%, white 10%), color-mix(in srgb, var(--portrait) 40%, #0b090c 60%) 100%); background-position: center 20%, center; background-size: cover, cover; background-repeat: no-repeat; color: rgba(255,255,255,.9); font-size: 19px; font-weight: 800; }
.chat-title h2 { margin: 0; font-size: 17px; }
.chat-title span { color: #64db7e; font-size: 12px; }
.messages { overflow-y: auto; padding: 24px 4px; scrollbar-width: thin; }
.message { width: fit-content; max-width: min(72%, 560px); margin: 0 0 13px; padding: 13px 16px; border-radius: 18px 18px 18px 5px; background: var(--panel); color: #eee6e9; line-height: 1.48; animation: enter .25s ease; }
.message.user { margin-left: auto; border-radius: 18px 18px 5px; background: linear-gradient(135deg, #e94861, #d93858); color: white; }
.message small { display: block; margin-top: 5px; color: rgba(255,255,255,.42); font-size: 9px; text-align: right; }
.suggestions { display: flex; gap: 8px; padding: 0 0 10px; overflow-x: auto; }
.suggestion { flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: #c9bec4; cursor: pointer; font-size: 12px; }
.composer { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.composer input { flex: 1; min-width: 0; padding: 0 7px; border: 0; outline: 0; background: none; }
.send { width: 44px; height: 44px; border: 0; border-radius: 14px; background: var(--accent); cursor: pointer; font-size: 18px; }
.typing { color: var(--muted); font-size: 12px; }
.auth-overlay { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(5,4,5,.75); backdrop-filter: blur(12px); }
.auth-card { width: min(440px, 100%); padding: 30px; border: 1px solid var(--line); border-radius: 26px; background: #171217; box-shadow: 0 30px 80px rgba(0,0,0,.48); }
.auth-card h2 { margin: 0 0 7px; font: 700 32px 'Playfair Display', serif; }
.auth-card > p { margin: 0 0 24px; color: var(--muted); }
.auth-card label { display: block; margin: 14px 0 7px; color: #d8ced3; font-size: 12px; }
.auth-card input { width: 100%; height: 48px; padding: 0 15px; border: 1px solid var(--line); border-radius: 14px; outline: 0; background: #0f0c0f; }
.auth-actions { display: flex; gap: 10px; margin-top: 22px; }
.auth-actions button { flex: 1; height: 46px; border: 0; border-radius: 14px; background: var(--soft); cursor: pointer; }
.auth-actions .primary { background: var(--accent); font-weight: 700; }
.profile-card { max-width: 680px; margin: 46px auto; padding: 34px; border: 1px solid var(--line); border-radius: 28px; background: var(--panel); text-align: center; }
.profile-icon { width: 96px; height: 96px; margin: auto; display: grid; place-items: center; border-radius: 30px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); font: 700 36px 'Playfair Display', serif; }
.profile-card h1 { font: 700 36px 'Playfair Display', serif; }
.profile-card p { color: var(--muted); }
.astro-talks { margin-top: 34px; }
.astro-marquee {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 10px 0;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 16px;
  animation: scroll-left 600s linear infinite;
}
.marquee-track:hover {
  animation-play-state: paused;
}
.marquee-track button {
  flex-shrink: 0;
  padding: 10px 24px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255,93,115,.08), rgba(246,169,74,.03));
  text-align: center;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}
.marquee-track button:hover {
  transform: translateY(-2px);
  border-color: rgba(255,194,116,.35);
}
.marquee-track span {
  display: inline-block;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.guidance-note { margin: 11px 2px 0; color: #887e84; font-size: 11px; }

/* Historical Figure Bio Card */
.historical-intro {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,93,115,.06), rgba(246,169,74,.04));
  position: relative;
  overflow: hidden;
}
.historical-intro::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 20px 20px 0 0;
}
.historical-intro-image {
  flex-shrink: 0;
  width: 90px;
  height: 110px;
  border-radius: 14px;
  background-image: var(--photo);
  background-size: cover;
  background-position: center top;
}
.historical-intro-body { flex: 1; min-width: 0; }
.historical-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.historical-tags span {
  padding: 3px 10px;
  border: 1px solid rgba(246,169,74,.4);
  border-radius: 999px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
}
.historical-intro-body h3 {
  margin: 0 0 8px;
  font: 700 18px/1.2 'Playfair Display', serif;
  color: var(--text);
}
.historical-intro-body p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.historical-divider {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 1px;
  opacity: .8;
  text-align: center;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 28px 0; }
.stat { padding: 18px 8px; border-radius: 16px; background: var(--soft); }
.stat b { display: block; font-size: 21px; }
.stat span { color: var(--muted); font-size: 11px; }

@media (max-width: 900px) {
  .shell { padding-left: 104px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { flex-wrap: wrap; gap: 12px; padding: 18px 0; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
}

@media (max-width: 680px) {
  .shell { padding: 0 15px calc(var(--nav-h) + 26px); }
  .desktop-nav { display: none; }
  .topbar { min-height: auto; padding: 17px 2px; flex-wrap: nowrap; }
  .wordmark { min-width: 0; flex: 1; font-size: 24px; }
  .topbar .pill-button { padding: 0 13px; }
  .topbar .search { position: absolute; top: 70px; left: 15px; right: 15px; z-index: 8; display: none; }
  .topbar.searching .search { display: block; }
  .hero { min-height: 410px; padding: 28px 22px; border-radius: 24px; }
  .hero h1 { font-size: 46px; }
  .hero p { font-size: 15px; }
  .section-head { margin-top: 28px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .character-card { min-height: 270px; padding: 14px; border-radius: 20px; }
  .card-info h3 { font-size: 17px; }
  .card-info p { font-size: 11px; }
  .astro-grid { grid-template-columns: 1fr; }
  .astro-grid button { min-height: 92px; }
  .bottom-nav { position: fixed; z-index: 30; bottom: 0; left: 0; right: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); display: flex; justify-content: space-around; padding: 8px 14px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(16,12,16,.91); backdrop-filter: blur(18px); }
  .bottom-nav .nav-btn { width: 56px; height: 54px; }
  .chat-layout { height: 100dvh; padding: 8px 0 calc(var(--nav-h) + 12px); }
  .message { max-width: 84%; }
  .stats { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Footer Styles */
.site-footer {
  width: 100%;
  margin-top: 60px;
  padding: 48px 0 32px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent 0%, rgba(21, 17, 22, 0.4) 100%);
}

.footer-container {
  max-width: 1280px;
  margin: auto;
  padding: 0 28px 0 124px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-brand {
  flex: 1;
  min-width: 280px;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.link-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-group h4 {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-2);
}

.footer-link {
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s ease;
  width: fit-content;
}

.footer-link:hover {
  color: white;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.footer-bottom p {
  margin: 0;
}

/* Info Dialog Card */
.info-card {
  width: min(580px, 100%);
  background: #191419;
  border: 1px solid var(--line);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
}

.info-card-header h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
}

.info-card-content h3 {
  margin: 24px 0 10px;
  font-size: 18px;
  color: var(--text);
}

.info-card-content h3:first-child {
  margin-top: 0;
}

.info-card-content p {
  margin: 0 0 14px;
}

.info-card-content ul {
  padding-left: 20px;
  margin: 0 0 18px;
}

.info-card-content li {
  margin-bottom: 8px;
}

/* Mobile responsive adjustments */
@media (max-width: 900px) {
  .site-footer {
    padding: 32px 0 24px;
  }
  .footer-container {
    padding-left: 104px;
    padding-right: 28px;
  }
  .footer-content {
    flex-direction: column;
    gap: 24px;
  }
  .footer-brand {
    max-width: none;
  }
  .footer-links {
    gap: 32px;
    width: 100%;
    justify-content: space-between;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 680px) {
  .footer-container {
    padding: 0 15px;
  }
}
