* {
  box-sizing: border-box;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont;
}

/* =========================
   BODY (MOBILE SAFE)
========================= */
body {
  margin: 0;
  background: #f4f6f8;
  color: #1f2933;
  overscroll-behavior: none;
}

/* =========================
   APP LAYOUT (KEYBOARD SAFE)
========================= */
.app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* =========================
   HEADER
========================= */
.header {
  height: 64px;
  padding: 0 24px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* BRAND */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo {
  font-size: 18px;
  font-weight: 600;
  color: #2563eb;
}

.dot {
  font-size: 18px;
  color: #9ca3af;
}

.tagline {
  font-size: 14px;
  color: #6b7280;
}

.status {
  font-size: 12px;
  color: #16a34a;
  font-weight: 500;
}

/* =========================
   MAIN (DESKTOP GRID)
========================= */
.main {
  flex: 1;
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 20px;
  padding: 20px;
  overflow: hidden;
}

/* =========================
   VIDEO
========================= */
.video-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.video-wrapper {
  position: relative;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* SELF VIDEO */
.self-video {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 240px;
  height: 150px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.self-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.self-video span {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 12px;
  color: #fff;
  background: rgba(0,0,0,0.6);
  padding: 3px 8px;
  border-radius: 6px;
}

/* =========================
   CONTROLS
========================= */
.controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  cursor: pointer;
  font-size: 14px;
}

.primary {
  background: #2563eb;
  color: #ffffff;
  border: none;
}

/* =========================
   CHAT
========================= */
.chat-section {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.chat-header {
  padding: 14px 16px;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
}

.messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  font-size: 14px;
}

.message { margin-bottom: 6px; }
.me { color: #2563eb; }
.other { color: #16a34a; }

.system {
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  margin: 10px 0;
}

.typing {
  padding: 0 14px;
  font-size: 12px;
  color: #6b7280;
  display: none;
}

/* CHAT INPUT */
.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.chat-input input {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
}

/* =========================
   TIMER
========================= */
.timer {
  text-align: center;
  font-size: 12px;
  color: #4b5563;
  margin: 6px 0;
}

.hidden {
  display: none;
}

/* =========================
   FOOTER
========================= */
.footer {
  height: 44px;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
}

/* =========================
   SEARCHING
========================= */
.searching {
  font-size: 13px;
  color: #6b7280;
}

.dots::after {
  content: "";
  animation: dots 1.4s infinite;
}

@keyframes dots {
  0% { content: ""; }
  33% { content: "."; }
  66% { content: ".."; }
  100% { content: "..."; }
}

/* =========================
   LANDING PAGE (RESTORED)
========================= */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing-header {
  height: 72px;
  padding: 0 24px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
}

/* HERO */
.hero {
  flex: 1;
  padding: 80px 24px 60px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  font-size: 44px;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-text {
  font-size: 16px;
  color: #4b5563;
  max-width: 520px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

/* FEATURES */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto 80px;
  padding: 0 24px;
}

.feature {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 24px;
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.feature p {
  font-size: 14px;
  color: #4b5563;
}

/* =========================
   MOBILE RESPONSIVE (FINAL)
========================= */
@media (max-width: 900px) {

  /* Stack video + chat */
  .main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 12px;
  }

  .chat-section {
    flex: 1;
    min-height: 0;
  }

  .self-video {
    width: 110px;
    height: 80px;
    bottom: 10px;
    right: 10px;
  }

  .self-video span {
    font-size: 10px;
    padding: 2px 6px;
  }

  .tagline {
    display: none;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 34px;
  }
}
/* =========================
   PRIVACY MODAL VISIBILITY FIX
========================= */
.modal-backdrop {
  display: flex;           /* 👈 force visible when not hidden */
}

.modal-backdrop.hidden {
  display: none;
}
/* =========================
   MODAL ROOT FIX (FINAL)
========================= */
#privacyModal {
  position: fixed;
  inset: 0;
  z-index: 99999;
}

/* =========================
   PRIVACY MODAL – FINAL FIX
========================= */

#privacyModal {
  position: fixed;
  inset: 0;
  z-index: 999999;
}

#privacyModal.modal-backdrop {
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
}

#privacyModal.hidden {
  display: none;
}

/* Modal card */
#privacyModal .modal {
  background: #ffffff;
  border-radius: 16px;
  padding: 28px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 40px 120px rgba(0,0,0,0.45);
}

/* Text */
#privacyModal h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

#privacyModal .modal-sub {
  font-size: 14px;
  color: #4b5563;
  margin-bottom: 14px;
}

#privacyModal ul {
  padding-left: 18px;
  margin: 0 0 20px;
}

#privacyModal li {
  font-size: 14px;
  margin-bottom: 6px;
}


/* =========================
   COOKIE NOTICE (POLISHED)
========================= */

.cookie {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 520px;
  width: calc(100% - 32px);

  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 16px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  font-size: 13px;
  color: #374151;

  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  z-index: 100000;
}

.cookie span {
  line-height: 1.4;
}

.cookie button {
  white-space: nowrap;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 8px;
}

/* Mobile tweak */
@media (max-width: 480px) {
  .cookie {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .cookie button {
    width: 100%;
  }
}
