/* THE 3 AM HOTLINE · style.css — night-sky phone-call theme */
:root {
  --bg0: #070b18;
  --bg1: #0d1330;
  --card: #141b3d;
  --card2: #1a2350;
  --ink: #f4f1ff;
  --muted: #a9b0d8;
  --pink: #ff7eb3;
  --pink2: #ff4f9a;
  --gold: #ffd98a;
  --teal: #7ef0d4;
  --line: rgba(255, 255, 255, 0.1);
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 800px at 50% -10%, #1b2452 0%, var(--bg1) 45%, var(--bg0) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.stars {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.7;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, #fff, transparent),
    radial-gradient(1px 1px at 68% 8%, #fff, transparent),
    radial-gradient(2px 2px at 84% 34%, #ffe9f4, transparent),
    radial-gradient(1px 1px at 32% 64%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 55% 48%, #fff, transparent),
    radial-gradient(1px 1px at 8% 78%, #fff, transparent),
    radial-gradient(2px 2px at 92% 72%, #fff, transparent),
    radial-gradient(1px 1px at 44% 12%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 76% 88%, #fff, transparent),
    radial-gradient(1px 1px at 22% 42%, #cfe6ff, transparent);
}
#app { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 28px 18px 60px; }
.screen { animation: fadein 0.45s ease; }
.screen-center { text-align: center; padding-top: 18vh; }
@keyframes fadein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.kicker {
  text-align: center; text-transform: uppercase; letter-spacing: 0.28em;
  font-size: 11px; color: var(--pink); margin: 6px 0 10px;
}
.title {
  text-align: center; font-size: clamp(44px, 11vw, 68px); line-height: 1.02;
  margin: 0 0 8px; letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fff 20%, var(--pink) 75%, var(--pink2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 42px rgba(255, 126, 179, 0.25);
}
.h2 { font-size: 30px; margin: 8px 0; text-align: center; }
.h3 { font-size: 18px; margin: 26px 0 10px; text-align: center; color: var(--gold); }
.sub { color: var(--muted); text-align: center; font-size: 15px; line-height: 1.55; margin: 8px 0 16px; }

.phone-art { position: relative; width: 150px; height: 150px; margin: 26px auto; }
.phone-art.small { width: 110px; height: 110px; margin: 0 auto 18px; }
.phone-icon { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; }
.phone-art.small .phone-icon { font-size: 46px; }
.phone-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(255, 126, 179, 0.55);
  animation: ring 2.2s ease-out infinite;
}
.phone-ring.r2 { animation-delay: 1.1s; }
@keyframes ring {
  0% { transform: scale(0.55); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: scale(1.25); opacity: 0; }
}

.mila-says {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--pink);
  border-radius: var(--radius); padding: 18px 18px; font-size: 16.5px; line-height: 1.65;
  margin: 18px 0; font-style: normal;
}
.mila-says::before { content: "Mila 💗"; display: block; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--pink); margin-bottom: 8px; font-style: normal; }

.btn {
  display: block; width: 100%; border: none; border-radius: 999px;
  padding: 16px 22px; font-size: 17px; font-weight: 700; cursor: pointer;
  margin: 14px 0; transition: transform 0.12s ease, box-shadow 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn-call, .btn-primary {
  background: linear-gradient(135deg, var(--pink2), var(--pink));
  color: #fff; box-shadow: 0 8px 30px rgba(255, 79, 154, 0.35);
  font-size: 19px; padding: 18px 22px;
}
.btn-call:hover, .btn-primary:hover { box-shadow: 0 8px 36px rgba(255, 79, 154, 0.55); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); font-weight: 600; font-size: 15px; }
.btn-ghost:hover { color: var(--ink); border-color: var(--pink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.honesty {
  background: rgba(255, 217, 138, 0.08); border: 1px solid rgba(255, 217, 138, 0.35);
  border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.6; color: var(--gold);
}
.privacy-note { color: var(--muted); font-size: 13px; line-height: 1.6; text-align: center; }
.foot { margin-top: 34px; text-align: center; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.foot .fine, .fine { color: rgba(169, 176, 216, 0.75); font-size: 12px; }
.foot-call { margin-top: 22px; }

/* state picker */
.state-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.state-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 12px; text-align: center; cursor: pointer; color: var(--ink);
  transition: transform 0.12s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}
.state-card:hover { transform: translateY(-2px); border-color: var(--pink); box-shadow: 0 6px 24px rgba(255, 126, 179, 0.18); }
.state-card .emoji { font-size: 34px; display: block; margin-bottom: 8px; }
.state-card .sname { font-weight: 700; font-size: 15px; display: block; }
.state-card .stag { color: var(--muted); font-size: 12.5px; display: block; margin-top: 4px; line-height: 1.45; }

/* ringing */
.ring-status { font-size: 26px; font-weight: 700; }

/* call screen */
.call-header {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 14px;
}
.call-id { display: flex; align-items: center; gap: 10px; }
.call-dot { width: 12px; height: 12px; border-radius: 50%; background: #59e39a; box-shadow: 0 0 10px #59e39a; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: 0.45; } }
.call-id strong { display: block; font-size: 15px; }
.call-timer { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.call-controls { display: flex; gap: 8px; }
.icon-btn {
  background: var(--card2); border: 1px solid var(--line); border-radius: 50%;
  width: 44px; height: 44px; font-size: 20px; cursor: pointer; color: var(--ink);
}
.icon-btn:hover { border-color: var(--pink); }
.beat-progress { text-align: center; color: var(--muted); font-size: 13px; letter-spacing: 0.08em; margin: 4px 0 14px; }

.bubble {
  background: linear-gradient(160deg, var(--card2), var(--card));
  border: 1px solid var(--line); border-radius: var(--radius);
  border-top-left-radius: 6px; padding: 18px; margin: 0 0 6px;
  position: relative;
}
.bubble::before { content: "Mila 💗 · voice note"; display: block; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pink); margin-bottom: 10px; }
.bubble-text { font-size: 17px; line-height: 1.7; margin: 0; min-height: 3.2em; }
.bubble-text.lead { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; }
.bubble-text.after { background: rgba(126, 240, 212, 0.07); border: 1px solid rgba(126, 240, 212, 0.3); border-radius: var(--radius); padding: 14px 16px; margin: 14px 0; color: var(--teal); }
.typing { display: inline-block; width: 8px; height: 1.1em; background: var(--pink); vertical-align: text-bottom; animation: blink 0.8s infinite; }

/* breathing pacer */
.pacer-wrap { text-align: center; margin: 10px 0; }
#pacer-canvas { max-width: 100%; height: auto; }
.pacer-cue { font-size: 24px; font-weight: 700; color: var(--gold); min-height: 1.6em; margin: 6px 0; }

/* grounding checklist */
.ground-list { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 10px; }
.ground-list li {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 15px 16px; font-size: 16px; cursor: pointer; display: flex; gap: 12px; align-items: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.ground-list li:hover { border-color: var(--pink); }
.ground-list li .box {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px;
  border: 2px solid var(--muted); display: grid; place-items: center; font-size: 16px;
}
.ground-list li.done { border-color: var(--teal); background: rgba(126, 240, 212, 0.06); }
.ground-list li.done .box { border-color: var(--teal); background: var(--teal); color: #06281f; }
.ground-list li.done .gtext { text-decoration: line-through; color: var(--muted); }

/* finale */
.share-block { margin-top: 8px; }
#share-canvas { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); display: block; }
.share-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share-actions .btn { margin: 12px 0 0; font-size: 15px; padding: 14px 10px; }
.copied-note { text-align: center; color: var(--teal); font-size: 14px; min-height: 1.4em; }
.email-block {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px; margin-top: 22px;
}
.email-block .h3 { margin-top: 0; }

@media (max-width: 420px) {
  .state-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .share-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .phone-ring, .call-dot, .typing { animation: none; }
  .screen { animation: none; }
}
