/* iLovu couple games — UI for the pass-the-phone game engine (couple-games.js).
   Depends on the CSS custom properties declared in site.css (--coral, --rose,
   --ink, --gradient, --match-green). Loaded only on pages that host a game. */

.cg {
  background: var(--gradient);
  border-radius: 22px;
  padding: 22px 20px 24px;
  margin: 10px 0 30px;
  box-shadow: 0 24px 60px -30px rgba(196, 69, 105, 0.6);
  color: #fff;
}

/* ---- Header: game name, progress, score ---- */

.cg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.cg-head .cg-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}
.cg-head .cg-count {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}
.cg-bar {
  height: 5px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
  margin-bottom: 20px;
}
.cg-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 100px;
  background: #fff;
  transition: width 0.3s ease;
}

/* ---- Turn badge ---- */

.cg-turn {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 100px;
  padding: 6px 15px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}

/* ---- The prompt ---- */

.cg-prompt {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(21px, 5vw, 28px);
  line-height: 1.25;
  margin-bottom: 20px;
}
.cg-sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 18px;
}

/* ---- Option buttons ---- */

.cg-opts {
  display: grid;
  gap: 11px;
}
@media (min-width: 560px) {
  .cg-opts.two { grid-template-columns: 1fr 1fr; }
}
.cg-opt {
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 3px solid transparent;
  border-radius: 16px;
  padding: 18px 16px;
  cursor: pointer;
  text-align: center;
  line-height: 1.35;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 10px 26px -18px rgba(43, 27, 30, 0.7);
}
.cg-opt:hover { transform: translateY(-2px); }
.cg-opt:active { transform: translateY(0); }
.cg-opt:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* Reveal states — these are rendered as divs, not buttons. */
div.cg-opt { cursor: default; }
div.cg-opt:hover { transform: none; }
.cg-opt.picked-both { border-color: var(--match-green); }
.cg-opt.picked-a, .cg-opt.picked-b { border-color: var(--ink); }
.cg-opt.dim { opacity: 0.45; }
.cg-who {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rose);
  margin-top: 7px;
  min-height: 15px;
}

/* ---- Verdict after a reveal ---- */

.cg-verdict {
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
}
.cg-verdict b { font-weight: 800; }

/* ---- Buttons ---- */

.cg-btn {
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--rose);
  background: #fff;
  border: none;
  border-radius: 100px;
  padding: 14px 28px;
  cursor: pointer;
  margin-top: 18px;
  box-shadow: 0 12px 28px -16px rgba(43, 27, 30, 0.6);
}
.cg-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.cg-btn.ghost {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: none;
  margin-left: 8px;
}
.cg-btn.block { display: block; width: 100%; margin-left: 0; }

/* ---- Setup screen ---- */

.cg-names {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}
@media (min-width: 560px) {
  .cg-names { grid-template-columns: 1fr 1fr; }
}
.cg-names label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 6px;
}
.cg-names input {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  padding: 13px 15px;
  border: none;
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
}
.cg-lens {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.cg-len {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid transparent;
  border-radius: 100px;
  padding: 9px 18px;
  cursor: pointer;
}
.cg-len[aria-pressed="true"] { background: #fff; color: var(--rose); }

/* ---- Handoff screen ---- */

.cg-handoff {
  text-align: center;
  padding: 16px 0 4px;
}
.cg-handoff .cg-emoji { font-size: 44px; line-height: 1; }
.cg-handoff .cg-prompt { margin: 14px 0 6px; }

/* ---- Final score ---- */

.cg-final { text-align: center; padding: 6px 0 2px; }
.cg-final .cg-big {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(46px, 14vw, 78px);
  line-height: 1;
  margin-bottom: 4px;
}
.cg-final .cg-biglabel {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 16px;
}
.cg-final .cg-blurb {
  font-size: 16px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 4px;
}

/* ---- Game switcher (hub page) ---- */

.cg-tabs {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 8px 0 4px;
}
.cg-tab {
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--rose);
  background: #fff;
  border: 2px solid transparent;
  border-radius: 100px;
  padding: 10px 18px;
  cursor: pointer;
  box-shadow: 0 8px 24px -18px rgba(196, 69, 105, 0.45);
}
.cg-tab[aria-selected="true"] {
  background: var(--gradient);
  color: #fff;
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  .cg-opt, .cg-bar i { transition: none; }
  .cg-opt:hover { transform: none; }
}
