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

:root {
  --bg: #0B1020;
  --surface: #121A2C;
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-glow: rgba(79,70,229,0.15);
  --secondary: #06B6D4;
  --accent: #F59E0B;
  --text: #FFFFFF;
  --text-secondary: #8B95A5;
  --text-muted: #5A6478;
  --border: #1E2740;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --shadow: 0 10px 40px rgba(0,0,0,.4);
  --max-w: 1280px;
  --hero-w: 1100px;
}

/* Light theme (simplified) */
html.light {
  --bg: #F0F2F5;
  --surface: #FFFFFF;
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --text: #0F172A;
  --text-secondary: #64748B;
  --border: #E2E8F0;
  --shadow: 0 10px 30px rgba(0,0,0,.06);
}
html.light body { background: var(--bg); }
html.light #chat { background: var(--bg); }
html.light #partner-box { background: #E8E2DA; }
html.light #placeholder { background: var(--bg); }
html.light .hero-floating-stat { background: #fff; }
html.light .strength-bar { background: var(--border); }

html { scroll-behavior: smooth; }
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
html.light :focus-visible {
  outline-color: var(--primary);
}

body {
  font-family: 'Inter', 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-y: auto;
  transition: background 0.25s, color 0.25s;
}

.fullscreen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  background: var(--bg);
}

.hidden { display: none !important; }

/* ===== Navbar ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 80px;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, box-shadow 0.25s;
}
#navbar.scrolled {
  background: rgba(22,18,16,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
html.light #navbar.scrolled { background: rgba(245,240,234,0.85); }
.nav-inner {
  width: min(100% - 48px, var(--max-w));
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 22px;
}
.nav-links { display: flex; gap: 24px; margin-right: auto; }
.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.nav-cta:hover { background: var(--primary-hover); }

/* Nav actions (lang + theme + cta) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Language switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.lang-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.lang-btn:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.lang-btn.active {
  background: var(--primary);
  color: #fff;
}
html.light .lang-btn:hover { background: rgba(0,0,0,0.04); }

/* Theme toggle */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}
.theme-toggle:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.theme-toggle svg { width: 20px; height: 20px; display: block; }
html.light .theme-toggle:hover { background: rgba(0,0,0,0.06); }

/* ===== Landing ===== */
#landing {
  scroll-behavior: smooth;
  transition: opacity 0.22s ease, background 0.25s;
  background: linear-gradient(180deg, #080C18 0%, #0E1528 30%, #162040 60%, #1A2548 80%, #E8ECF0 100%);
  color: #fff;
}
html.light #landing { background: linear-gradient(180deg, #E8ECF0 0%, #F0F2F5 50%, #FFFFFF 100%); color: #0F172A; }

/* ===== Red Thread ===== */
.red-thread {
  position: fixed;
  top: 0; left: 50%;
  width: 2px;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  transform: translateX(-50%);
  opacity: 0.5;
}

/* ===== Hero ===== */
#hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 104px 24px 80px;
  position: relative;
  overflow: hidden;
}
.stars-bg {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 25% 55%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 45% 10%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 65% 35%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 80% 65%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1.5px 1.5px at 15% 75%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 50% 80%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1px 1px at 70% 8%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 90% 20%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 35% 40%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 5% 50%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1px 1px at 95% 45%, rgba(255,255,255,0.2), transparent);
  pointer-events: none;
}
.hero-gradient {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(225,29,72,0.04), transparent 60%);
  pointer-events: none;
}
.hero-inner {
  width: min(100%, 1100px);
  display: flex;
  align-items: center;
  gap: 64px;
  position: relative;
  z-index: 1;
}
.hero-text { flex: 1 1 55%; }
.hero-label {
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(225,29,72,0.5);
  margin-bottom: 16px;
}
.hero-text h1 {
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 52px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}
.highlight-bn {
  background: linear-gradient(135deg, #E11D48, #FB7185);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.highlight {
  background: linear-gradient(135deg, #E11D48, #FB7185);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
  max-width: 480px;
  margin-bottom: 28px;
}
html.light .hero-desc { color: rgba(15,23,42,0.5); }
.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.hero-btn {
  font-family: 'Noto Sans Bengali', sans-serif;
  background: linear-gradient(135deg, #E11D48, #BE123C);
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.hero-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(225,29,72,0.3); }
.hero-link {
  font-family: 'Noto Sans Bengali', sans-serif;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
  white-space: nowrap;
}
html.light .hero-link { color: rgba(15,23,42,0.4); }
.hero-link:hover { color: rgba(255,255,255,0.8); }
html.light .hero-link:hover { color: #0F172A; }
.hero-stats { min-height: 24px; }
.hero-status { font-size: 13px; color: rgba(255,255,255,0.4); }
.hero-status::before {
  content: ''; display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: #10B981; margin-right: 8px;
  vertical-align: middle; animation: pulse 2s ease-in-out infinite;
}
.hero-badges {
  display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.hero-badges span {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: rgba(255,255,255,0.4);
}
.hero-badges svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Hero Visual */
.hero-visual {
  flex: 1 1 45%;
  display: flex;
  justify-content: center;
  position: relative;
  min-height: 300px;
}
.hero-globe {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -55%);
  width: 300px;
  animation: float 8s ease-in-out infinite;
}
.hero-figures {
  position: absolute;
  bottom: 5%; left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 20px;
}
.hfig { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hfig-head {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid rgba(225,29,72,0.15);
  background: rgba(225,29,72,0.04);
}
.hfig-body {
  width: 6px; height: 22px; border-radius: 3px;
  background: rgba(225,29,72,0.08);
}
.hfig-connect {
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%);
  width: 40px;
  animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.hero-card {
  background: rgba(18,26,44,0.4);
  border: 1px solid rgba(225,29,72,0.08);
  border-radius: 20px;
  overflow: hidden;
  width: min(100%, 260px);
  backdrop-filter: blur(12px);
}
html.light .hero-card { background: rgba(255,255,255,0.5); border-color: rgba(0,0,0,0.06); }
.hero-card-top {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(225,29,72,0.06);
}
.hero-card-dots { display: flex; gap: 6px; }
.hero-card-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(225,29,72,0.15);
}
.hero-card-body {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-card-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(225,29,72,0.15), rgba(251,113,133,0.1));
  flex-shrink: 0;
}
.hero-card-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.hero-card-line {
  height: 8px; border-radius: 4px;
  background: rgba(225,29,72,0.06);
}
.hero-card-line.short { width: 30%; }
.hero-card-footer {
  display: flex; gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(225,29,72,0.06);
}
.hero-card-btn {
  flex: 1; height: 28px; border-radius: 8px;
  background: rgba(225,29,72,0.08);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  background: rgba(225,29,72,0.06);
  border: 1px solid rgba(225,29,72,0.06);
  color: rgba(255,255,255,0.5);
}
html.light .badge-pill { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.06); color: rgba(15,23,42,0.5); }

.landing-bg {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: -1;
}

.hero-floating-stat {
  position: absolute;
  bottom: -20px; right: -10px;
  background: rgba(18,26,44,0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
  animation: float 6s ease-in-out infinite;
  animation-delay: -2s;
}
html.light .hero-floating-stat { background: rgba(255,255,255,0.7); border-color: rgba(0,0,0,0.06); }
.stat-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px rgba(16,185,129,0.4);
  animation: pulse 2s ease-in-out infinite;
}
.stat-content { display: flex; flex-direction: column; }
.stat-number { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.stat-label { font-family: 'Noto Sans Bengali', sans-serif; font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 2px; }
html.light .stat-label { color: rgba(15,23,42,0.5); }

/* ===== Section Common ===== */
.section-inner {
  width: min(100% - 48px, 1100px);
  margin: 0 auto;
  padding: 100px 0;
}
.section-label {
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(225,29,72,0.5);
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 32px;
}

/* ===== Journey Section ===== */
#journey { position: relative; }
.journey-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.jstep {
  background: rgba(18,26,44,0.4);
  border: 1px solid rgba(225,29,72,0.06);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  min-width: 120px;
  flex: 1;
  max-width: 160px;
  transition: transform 0.25s, border-color 0.25s;
}
html.light .jstep { background: rgba(255,255,255,0.5); border-color: rgba(0,0,0,0.06); }
.jstep:hover { transform: translateY(-4px); border-color: rgba(225,29,72,0.12); }
.jstep-icon {
  width: 48px; height: 48px;
  margin: 0 auto 12px;
  color: rgba(225,29,72,0.3);
}
.jstep-happy { color: rgba(225,29,72,0.4); }
.jstep-text {
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
}
html.light .jstep-text { color: rgba(15,23,42,0.6); }
.jstep-arrow {
  width: 20px; flex-shrink: 0;
  animation: arrowBounce 2s ease-in-out infinite;
}
@keyframes arrowBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ===== Evolution Timeline ===== */
#evolution { position: relative; }
.evo-scroll {
  overflow-x: auto;
  padding: 20px 0;
  -webkit-overflow-scrolling: touch;
}
.evo-track {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: max-content;
  padding: 0 20px;
}
.evo-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 28px;
}
.evo-icon {
  width: 64px; height: 64px;
  color: rgba(255,255,255,0.3);
  transition: transform 0.3s, color 0.3s;
}
html.light .evo-icon { color: rgba(15,23,42,0.3); }
.evo-node:hover .evo-icon { transform: scale(1.08); color: rgba(225,29,72,0.4); }
.evo-label { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.evo-year {
  font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.08em;
}
html.light .evo-year { color: rgba(15,23,42,0.3); }
.evo-name {
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 14px; font-weight: 500;
  white-space: nowrap;
  color: rgba(255,255,255,0.6);
}
html.light .evo-name { color: rgba(15,23,42,0.6); }
.evo-current { color: rgba(225,29,72,0.6); }
.evo-node.active .evo-year { color: rgba(225,29,72,0.4); }
.evo-line {
  width: 60px; height: 1px;
  background: rgba(225,29,72,0.08);
  flex-shrink: 0;
}

/* ===== World Section ===== */
#world { position: relative; }
.world-section {
  display: flex;
  align-items: center;
  gap: 48px;
  margin-top: 20px;
}
.world-art {
  flex-shrink: 0;
  width: 260px;
  animation: float 10s ease-in-out infinite;
}
.world-list { display: flex; flex-direction: column; gap: 14px; }
.wcountry {
  font-family: 'Noto Sans Bengali', sans-serif;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  transition: color 0.15s;
}
html.light .wcountry { color: rgba(15,23,42,0.5); }
.wcountry:hover { color: rgba(255,255,255,0.8); }
html.light .wcountry:hover { color: #0F172A; }
.wdot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #E11D48; opacity: 0.4;
  transition: opacity 0.15s;
}
.wcountry:hover .wdot { opacity: 1; }

/* ===== Premium Chat ===== */
#chat-preview { position: relative; }
.premium-chat {
  max-width: 340px;
  background: rgba(18,26,44,0.5);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
html.light .premium-chat { background: rgba(255,255,255,0.6); border-color: rgba(0,0,0,0.06); }
.pchat-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pchat-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #E11D48, #FB7185);
  opacity: 0.35; flex-shrink: 0;
}
.pchat-name {
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 14px; font-weight: 600;
}
.pchat-status {
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 11px; color: #10B981;
}
.pchat-msgs {
  padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.pmsg {
  max-width: 80%;
  padding: 8px 14px;
  border-radius: 14px;
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  animation: msgIn 0.3s ease;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.pmsg.other {
  align-self: flex-start;
  background: rgba(225,29,72,0.06);
  color: rgba(255,255,255,0.8);
}
html.light .pmsg.other { color: #0F172A; }
.pmsg.me {
  align-self: flex-end;
  background: linear-gradient(135deg, #E11D48, #BE123C);
  color: #fff;
}
.pmsg-dots {
  display: flex; gap: 4px; padding: 4px 8px; align-self: flex-start;
}
.pmsg-dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,0.3);
  animation: pulse 1.5s ease-in-out infinite;
}
.pmsg-dots span:nth-child(2) { animation-delay: 0.2s; }
.pmsg-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ===== Features ===== */
#features {
  position: relative;
  background: rgba(18,26,44,0.2);
}
html.light #features { background: rgba(255,255,255,0.3); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.fcard {
  background: rgba(18,26,44,0.3);
  border: 1px solid rgba(225,29,72,0.05);
  border-radius: 16px;
  padding: 28px 24px;
  transition: transform 0.25s, border-color 0.25s;
}
html.light .fcard { background: rgba(255,255,255,0.4); }
.fcard:hover {
  transform: translateY(-3px);
  border-color: rgba(225,29,72,0.1);
}
.fcard-icon {
  width: 48px; height: 48px;
  margin-bottom: 16px;
  color: rgba(225,29,72,0.4);
}
.fcard-icon svg { width: 100%; height: 100%; }

.fcard-illust {
  width: 48px; height: 48px;
  margin-bottom: 16px;
  color: rgba(225,29,72,0.4);
}
.fcard h3, .fcard-bn {
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.fcard p {
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.5);
}
html.light .fcard p { color: rgba(15,23,42,0.5); }

/* ===== Feeling Section ===== */
#feeling {
  position: relative;
  overflow: hidden;
}
.feeling-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(225,29,72,0.03), transparent 70%);
  pointer-events: none;
}
.feeling-inner { text-align: center; position: relative; z-index: 1; }
.feeling-icon {
  width: 48px; margin: 0 auto 20px;
  color: rgba(225,29,72,0.2);
}
.feeling-title {
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 40px;
}
.feeling-figures {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-bottom: 16px;
}
.ffig { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ffig-head {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid rgba(225,29,72,0.1);
  background: rgba(225,29,72,0.03);
}
.ffig-body {
  width: 8px; height: 30px; border-radius: 4px;
  background: rgba(225,29,72,0.06);
}
.ffig-heart {
  width: 40px;
  animation: heartBeat 2s ease-in-out infinite;
}
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.1); }
  30% { transform: scale(1); }
  45% { transform: scale(1.05); }
  60% { transform: scale(1); }
}

/* ===== Safety ===== */
#safety { position: relative; }
.safety-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.safety-pill {
  font-family: 'Noto Sans Bengali', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: rgba(18,26,44,0.3);
  border: 1px solid rgba(225,29,72,0.05);
  border-radius: 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  transition: border-color 0.2s, background 0.2s;
}
html.light .safety-pill { background: rgba(255,255,255,0.4); color: rgba(15,23,42,0.6); }
.safety-pill:hover { border-color: rgba(225,29,72,0.1); background: rgba(225,29,72,0.03); }
.safety-pill svg { width: 18px; height: 18px; color: #10B981; flex-shrink: 0; }

/* ===== CTA ===== */
#cta-section {
  padding: 80px 24px 120px;
  position: relative;
  text-align: center;
  overflow: hidden;
}
.cta-glow {
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(225,29,72,0.04), transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: glowPulse 6s ease-in-out infinite;
}
.cta-inner { padding: 0 !important; position: relative; z-index: 1; }
.cta-red-end {
  width: 60px; margin: 0 auto 20px;
  opacity: 0.3;
}
.cta-heading {
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}
.cta-desc {
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 16px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 32px;
}
html.light .cta-desc { color: rgba(15,23,42,0.5); }
.cta-btn { font-size: 18px; padding: 16px 44px; }
.cta-stats { margin-top: 16px; min-height: 20px; }
.cta-online {
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}
.cta-online::before {
  content: ''; display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: #10B981; margin-right: 8px;
  vertical-align: middle; animation: pulse 2s ease-in-out infinite;
}

/* ===== Footer ===== */
#footer {
  border-top: 1px solid rgba(225,29,72,0.06);
  padding: 48px 24px 32px;
}
.footer-inner {
  width: min(100% - 48px, 1100px);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 48px;
}
.footer-brand-col { flex: 1; max-width: 300px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-logo-text { font-weight: 600; font-size: 15px; }
.footer-desc {
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  line-height: 1.6;
}
html.light .footer-desc { color: rgba(15,23,42,0.4); }
.footer-links-col h4 {
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.3);
  margin-bottom: 14px;
}
html.light .footer-links-col h4 { color: rgba(15,23,42,0.3); }
.footer-links-col a {
  font-family: 'Noto Sans Bengali', sans-serif;
  display: block;
  text-decoration: none;
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  padding: 4px 0;
  transition: color 0.15s;
}
html.light .footer-links-col a { color: rgba(15,23,42,0.4); }
.footer-links-col a:hover { color: rgba(255,255,255,0.7); }
html.light .footer-links-col a:hover { color: #0F172A; }
.footer-links-col { min-width: 140px; }
.badge-placeholder {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(18,26,44,0.3);
  border: 1px dashed rgba(225,29,72,0.08);
  border-radius: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  margin-bottom: 8px;
  cursor: default;
}
html.light .badge-placeholder { background: rgba(255,255,255,0.3); color: rgba(15,23,42,0.3); }
.badge-placeholder svg { width: 16px; height: 16px; opacity: 0.5; }
.footer-bottom {
  width: min(100% - 48px, 1100px);
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(225,29,72,0.05);
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  text-align: center;
}
html.light .footer-bottom { color: rgba(15,23,42,0.3); }

/* ===== Connecting ===== */
#connecting { gap: 20px; z-index: 200; }
.lds-ring { display: inline-block; position: relative; width: 32px; height: 32px; }
.lds-ring div {
  box-sizing: border-box; display: block; position: absolute;
  width: 26px; height: 26px; margin: 3px;
  border: 3px solid var(--border); border-radius: 50%;
  animation: lds-ring 1.2s cubic-bezier(0.5,0,0.5,1) infinite;
  border-color: var(--border) transparent transparent transparent;
}
.lds-ring div:nth-child(1) { animation-delay: -0.45s; }
.lds-ring div:nth-child(2) { animation-delay: -0.3s; }
.lds-ring div:nth-child(3) { animation-delay: -0.15s; }
@keyframes lds-ring { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.connecting-logo { width: 96px; height: auto; opacity: 0.4; }
#connecting p { font-size: 13px; color: var(--text-secondary); animation: pulse 1.5s ease-in-out infinite; }

/* ===== Modal Overlay ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(22,18,16,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 36px 32px 32px;
  width: min(100%, 400px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  animation: modalIn 0.22s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-logo { margin-bottom: 4px; }
.modal h2 { font-size: 22px; font-weight: 600; }
.modal-sub { font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 4px; }
.modal .field { width: 100%; text-align: left; }
.modal .field label { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; display: block; }
.modal .field input, .modal .field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}
.modal .field input:focus, .modal .field select:focus { border-color: var(--primary); }
.modal .field select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239C948A' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.modal .check {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
  align-self: flex-start; margin-top: 2px;
}
.modal .check input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.err { color: var(--danger); font-size: 12px; text-align: center; }
.modal-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  width: 100%;
  margin-top: 6px;
}
.modal-btn:hover { background: var(--primary-hover); }
.modal-btn:disabled { opacity: 0.4; cursor: default; }
.modal-btn.secondary { background: var(--border); color: var(--text); }
.modal-btn.secondary:hover { background: rgba(255,255,255,0.15); }
.settings-group { width: 100%; text-align: left; }
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; font-size: 14px;
}
.settings-desc { font-size: 11px; color: var(--text-secondary); margin-top: -6px; }
.shortcuts-hint { font-size: 11px; color: var(--text-secondary); }
.shortcuts-hint kbd {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 3px; padding: 1px 5px; font-size: 10px;
  font-family: inherit;
}
.toggle { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--border); border-radius: 22px;
  transition: 0.2s;
}
.slider::before {
  content: '';
  position: absolute; left: 3px; bottom: 3px;
  width: 16px; height: 16px; background: #fff; border-radius: 50%;
  transition: 0.2s;
}
.toggle input:checked + .slider { background: var(--primary); }
.toggle input:checked + .slider::before { transform: translateX(18px); }

.perm-icons { display: flex; gap: 24px; margin: 8px 0; }
.perm-icons svg { color: var(--text-secondary); }

/* Preview modal */
.preview-box {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}
.preview-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
#preview-meta {
  display: flex;
  gap: 12px;
  font-size: 15px;
  color: var(--text);
}
#preview-meta span + span::before { content: '·'; margin-right: 12px; color: var(--text-secondary); }

/* ===== Chat ===== */
#chat {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  padding: 0;
}

#status-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  background: linear-gradient(rgba(22,18,16,0.75), transparent);
  z-index: 15;
  font-size: 12px;
  color: var(--text-secondary);
}
.mic-meter {
  width: 24px; height: 8px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
  flex-shrink: 0;
  opacity: 0.3;
  transition: opacity 0.2s;
}
.mic-meter.active { opacity: 0.8; }
.mic-meter::after {
  content: '';
  display: block;
  width: calc(var(--level, 0) * 100%);
  height: 100%;
  border-radius: 4px;
  background: var(--success);
  transition: width 0.1s ease;
}
#quality-indicator { font-size: 10px; font-weight: 600; min-width: 50px; }
#call-timer { font-size: 11px; font-variant-numeric: tabular-nums; min-width: 35px; }
#status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-yellow { background: var(--warning); box-shadow: 0 0 5px rgba(245,158,11,0.4); animation: pulse 1s ease-in-out infinite; }
.dot-green { background: var(--success); box-shadow: 0 0 5px rgba(16,185,129,0.4); animation: pulse 2s ease-in-out infinite; }
.dot-red { background: var(--danger); box-shadow: 0 0 5px rgba(239,68,68,0.4); }
.dot-gray { background: var(--text-secondary); }
#btn-cancel-find {
  margin-left: auto;
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--text-secondary);
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
#btn-next.urgent {
  animation: urgentPulse 1.5s ease-in-out infinite;
  color: var(--success);
}
@keyframes urgentPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}

#partner-box { position: absolute; inset: 0; background: #111; }
#partner-box video { width: 100%; height: 100%; object-fit: cover; display: block; }

#enc-badge {
  position: absolute;
  bottom: 14px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 10px;
  background: rgba(22,18,16,0.7);
  padding: 4px 10px;
  border-radius: 16px;
  white-space: nowrap;
  z-index: 5;
}
#enc-badge svg { width: 10px; height: 10px; }

/* Searching placeholder */
#placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: var(--bg);
  gap: 16px;
}
.search-pulse {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: searchPulse 2s ease-out infinite;
  opacity: 0;
}
@keyframes searchPulse {
  0% { transform: scale(0.3); opacity: 0.6; }
  100% { transform: scale(2); opacity: 0; }
}
#status-text { color: var(--text); font-size: 15px; font-weight: 500; }
.status-hint { color: var(--text-secondary); font-size: 12px; }

/* Match overlay */
#match-overlay {
  position: absolute; inset: 0;
  z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  animation: matchFadeIn 0.3s ease;
}
@keyframes matchFadeIn { from { opacity: 0; } to { opacity: 1; } }
.match-inner { text-align: center; }
.match-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(34,197,94,0.15);
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  animation: matchPulse 0.6s ease-in-out;
}
.match-icon svg { width: 30px; height: 30px; }
@keyframes matchPulse {
  0% { transform: scale(0); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.match-label { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.match-name { font-size: 15px; color: var(--text-secondary); }

/* Self video (touch target for flip) */
#self-box {
  position: absolute; bottom: 84px; right: 12px;
  width: min(28vw, 140px); aspect-ratio: 3/4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  border: 2px solid rgba(255,255,255,0.08);
  z-index: 5;
  cursor: pointer;
}
#self-box video { width:100%; height:100%; object-fit:cover; display:block; }
#self-label {
  position: absolute; bottom: 4px; left: 4px;
  background: rgba(22,18,16,0.75);
  padding: 1px 7px; border-radius: 4px;
  font-size: 9px; color: var(--text-secondary);
}

/* Controls */
#controls {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: center; gap: 2px;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(transparent, rgba(22,18,16,0.75) 50%);
  z-index: 10;
}
.ctrl {
  background: transparent;
  border: none; color: #ccc; cursor: pointer;
  padding: 6px 0; border-radius: var(--radius-sm);
  font-size: 10px;
  flex: 1; max-width: 52px;
  display: flex; flex-direction: column;
  align-items: center; gap: 2px;
  transition: background 0.15s;
}
.ctrl:active { background: rgba(255,255,255,0.08); }
.ctrl svg { width: 22px; height: 22px; }
.ctrl .off { display: none; }
.ctrl.muted .on { display: none; }
.ctrl.muted .off { display: block; }
.ctrl.muted { color: var(--danger); }
.ctrl.danger { color: var(--danger); }
.ctrl-label { font-size: 9px; opacity: 0; transition: opacity 0.15s; }
.ctrl:hover .ctrl-label { opacity: 0.7; }

#chat-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--warning); color: #000;
  font-size: 9px; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; pointer-events: none;
}

/* Panel */
#panel {
  position: fixed; top: 0; right: 0;
  width: min(90vw, 340px); height: 100dvh;
  background: var(--surface);
  z-index: 20;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  border-left: 1px solid var(--border);
}
#panel.open { transform: translateX(0); }
#panel-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: 15px; flex-shrink: 0;
}
#close-panel { background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 4px; }
#close-panel svg { width: 22px; height: 22px; display: block; }
#messages {
  flex: 1; overflow-y: auto;
  padding: 10px 14px;
  display: flex; flex-direction: column; gap: 5px;
}
.msg { max-width: 80%; padding: 8px 13px; border-radius: 12px; font-size: 14px; line-height: 1.4; word-wrap: break-word; }
.msg .msg-text { display: block; }
.msg .msg-time { display: block; font-size: 10px; opacity: 0.5; margin-top: 3px; }
.msg.me .msg-time { text-align: right; }
.msg.me { align-self: flex-end; background: var(--primary); color: #fff; }
.msg.other { align-self: flex-start; background: var(--bg); color: var(--text); }
.msg.sys { align-self: center; background: transparent; color: var(--text-secondary); font-size: 12px; text-align: center; }

#chat-input-area {
  display: flex; gap: 8px;
  padding: 10px 14px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border); flex-shrink: 0;
}
#chat-input-area input {
  flex: 1; background: var(--bg);
  border: 1px solid var(--border); color: var(--text);
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 14px; outline: none; font-family: inherit;
}
#chat-input-area input:focus { border-color: var(--primary); }
#chat-input-area input:disabled { opacity: 0.3; }
#chat-input-area button {
  background: var(--primary); border: none; color: #fff;
  padding: 10px; border-radius: var(--radius-sm); cursor: pointer; flex-shrink: 0;
  transition: background 0.15s;
}
#chat-input-area button:active { opacity: 0.7; }
#chat-input-area button:disabled { opacity: 0.3; cursor: default; }
#chat-input-area button svg { width: 20px; height: 20px; display: block; }

/* Report Dialog */
#report-overlay {
  position: fixed; inset: 0;
  background: rgba(22,18,16,0.8);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#report-dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  width: min(88vw, 320px);
  position: relative;
}
#report-dialog h3 { font-size: 17px; font-weight: 600; margin-bottom: 14px; }
.report-x {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; color: var(--text-secondary);
  font-size: 22px; cursor: pointer;
}
#report-options { display: flex; flex-direction: column; gap: 8px; }
.report-opt {
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); padding: 10px 14px;
  border-radius: var(--radius-sm); font-size: 14px; cursor: pointer; text-align: left;
  transition: background 0.15s; font-family: inherit;
}
.report-opt:hover { background: var(--surface); }
#report-status { margin-top: 10px; }

/* ===== Desktop ===== */
@media (min-width: 768px) {
  .ctrl { max-width: none; padding: 8px 14px; flex: none; min-width: 56px; }
  .ctrl:hover { background: rgba(255,255,255,0.06); }
  .ctrl-label { font-size: 10px; }
  #self-box { width: 160px; bottom: 100px; right: 16px; }
  #controls {
    background: rgba(22,18,16,0.75);
    border-radius: var(--radius-sm);
    width: auto;
    left: 50%; right: auto;
    transform: translateX(-50%);
    bottom: 24px;
    gap: 6px;
    padding: 10px 20px;
    backdrop-filter: blur(8px);
  }
}

/* ===== Mobile ===== */
@media (max-width: 767px) {
  .hero-inner { flex-direction: column; gap: 40px; text-align: center; }
  .hero-text h1 { font-size: 34px; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; flex-wrap: wrap; }
  .hero-badges { justify-content: center; }
  .hero-visual { width: 100%; min-height: 200px; }
  .hero-floating-stat { position: relative; bottom: auto; right: auto; margin: 16px auto 0; width: fit-content; }
  .nav-links { display: none; }
  .feature-grid { grid-template-columns: 1fr; gap: 16px; }
  .section-title { font-size: 28px; margin-bottom: 24px; }
  .safety-showcase { flex-direction: column; gap: 24px; align-items: flex-start; }
  .safety-shield { width: 60px; }
  .cta-heading { font-size: 30px; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-links-col { min-width: auto; }
  .footer-bottom { text-align: center; }
  .ctrl { max-width: 48px; }
  .ctrl-label { display: none; }
  #self-box { width: 30vw; bottom: 72px; right: 8px; }
}

/* ===== Animations ===== */
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

/* Screen transitions */
.screen-fade {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s 0.25s;
}
.screen-fade.visible {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s 0s;
}
.screen-fade.hidden {
  display: none !important;
}
.screen-fade.fade-out {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}
.screen-fade.fade-in {
  opacity: 1;
  transform: scale(1);
}

/* Animation keyframes */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  .hero-floating-stat, .screen-fade,
  #navbar, #landing, #footer,
  .ctrl, .modal-btn, .hero-btn, .nav-cta, #connecting, #chat, .stars-bg {
    animation: none !important;
    transition: none !important;
  }
  .stars-bg { background: none !important; }
}

/* Button press feedback */
.ctrl:active, .modal-btn:active, .hero-btn:active, .nav-cta:active,
.report-opt:active, #btn-cancel-find:active, #send-btn:active {
  transform: scale(0.96);
}
.ctrl, .modal-btn, .hero-btn, .nav-cta, .report-opt,
#btn-cancel-find, #send-btn, #close-panel, .report-x {
  transition: transform 0.1s, background 0.15s, opacity 0.15s;
}

/* Navbar/landing/footer transition */
#navbar, #footer {
  transition: opacity 0.22s ease, transform 0.22s ease;
}
#navbar.hidden, #footer.hidden {
  display: flex !important;
  opacity: 0;
  pointer-events: none;
}
#navbar.hidden { transform: translateY(-100%); }
#landing.hidden {
  display: block !important;
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
}
/* Override for screen-fade transitions on landing */
#landing.visible {
  opacity: 1;
}
#landing.fade-out {
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
}

/* ===== Toast Notifications ===== */
#toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(90vw, 400px);
}
.toast {
  pointer-events: auto;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  animation: toastIn 0.3s ease, toastOut 0.3s ease forwards;
  animation-duration: 0.3s, 0.3s;
  animation-delay: 0s, 3.5s;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.info {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.toast.success {
  background: rgba(16,185,129,0.15);
  border: 1px solid rgba(16,185,129,0.25);
  color: #10B981;
}
.toast.error {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.25);
  color: #EF4444;
}
.toast-icon { width: 18px; height: 18px; flex-shrink: 0; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-12px) scale(0.95); }
}

/* ===== Improved Search Animation ===== */
.search-waves {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.search-wave {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid rgba(79,70,229,0.15);
  animation: searchWave 2.5s ease-out infinite;
}
.search-wave:nth-child(2) { animation-delay: 0.8s; }
.search-wave:nth-child(3) { animation-delay: 1.6s; }
@keyframes searchWave {
  0% { transform: scale(0.3); opacity: 0.6; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ===== Reconnecting Banner ===== */
#reconnect-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(245,158,11,0.12);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(245,158,11,0.2);
  padding: 8px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--warning);
  font-weight: 500;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}
#reconnect-banner.show { transform: translateY(0); }
