/* =====================================================
   COUPLE CARD — STYLESHEET
   Palette: nero profondo, rosso passionale, oro
   ===================================================== */

/* ─── Reset ──────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ─── Variabili ──────────────────────────────────────── */
:root {
  --bg: #0d0d0d;
  --surface: #1a1a1a;
  --surface2: #242424;
  --red: #c0392b;
  --red-glow: rgba(192, 57, 43, 0.35);
  --gold: #f0b429;
  --text: #f0ece4;
  --muted: #8a8070;
  --done: #27ae60;
  --skip: #636363;
  --radius: 18px;
  --font: 'Poppins', sans-serif;
}

/* ─── Body ───────────────────────────────────────────── */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 108px; /* navbar (76px) + subnav (32px) */
  padding-bottom: 40px;
}

/* ─── Navbar principale (stile globale) ─────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #c0392b 0%, #8e1a0e 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  padding: 0;
}
.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  font-family: 'Poppins', sans-serif;
}
.nav-home {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}
.nav-home:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}
.nav-icons {
  display: flex;
  gap: 15px;
}
.nav-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 28px;
}
.nav-icon:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px) scale(1.1);
}
.nav-icon.active {
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

/* ─── Subnav (breadcrumb sottile) ────────────────────── */
.subnav {
  position: fixed;
  top: 76px;
  left: 0;
  right: 0;
  z-index: 999;
  background: #111;
  border-bottom: 1px solid #2a2a2a;
  height: 32px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
.subnav-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
}
.subnav-version {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: #444;
  font-weight: 600;
  letter-spacing: 0.04em;
  pointer-events: none;
  white-space: nowrap;
}
.subnav-home {
  color: var(--gold);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.subnav-home:hover {
  opacity: 0.75;
}
.subnav-level {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.my-role-badge {
  margin-left: auto;
  color: #ff9d00;
  font-size: 0.75rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  body {
    padding-top: 91px;
  }
  .navbar-container {
    padding: 13px 10px;
  }
  .nav-home {
    padding: 8px 18px;
    font-size: 15px;
  }
  .nav-icon {
    width: 30px;
    height: 30px;
    font-size: 20px;
  }
  .nav-icons {
    gap: 4px;
  }
  .subnav {
    top: 65px;
  }
}

/* ─── Container base ─────────────────────────────────── */
.cc-container {
  width: 100%;
  max-width: 480px;
  padding: 5px 16px calc(56px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* ─── Logo / Header ──────────────────────────────────── */
.cc-header {
  text-align: center;
  padding: 5px 20px 10px;
}
.cc-header .logo-emoji {
  font-size: 3.2rem;
  display: block;
  margin-bottom: 8px;
}
.cc-header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #e74c3c, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cc-header p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 6px;
  line-height: 1.5;
}

/* ─── Card surface ───────────────────────────────────── */
.cc-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 20px;
  width: 100%;
  border: 1px solid #2a2a2a;
}

/* ─── Level picker (index) ───────────────────────────── */
.level-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-bottom: 14px;
}
.level-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.level-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 8px;
  border-radius: 14px;
  border: 2px solid transparent;
  background: var(--surface2);
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text);
  font-family: var(--font);
}
.level-btn .lvl-emoji {
  font-size: 2rem;
}
.level-btn .lvl-name {
  font-size: 0.82rem;
  font-weight: 700;
}
.level-btn .lvl-desc {
  font-size: 0.68rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.3;
}
.level-btn:hover {
  border-color: var(--red);
  background: #2a1a1a;
  transform: translateY(-2px);
}
.level-btn.selected {
  border-color: var(--red);
  background: #2a1212;
  box-shadow: 0 0 18px var(--red-glow);
}
.level-btn.selected .lvl-name {
  color: #e74c3c;
}
.level-btn--locked {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.level-btn--locked:hover {
  transform: none;
  border-color: #2e2e2e;
  background: var(--surface);
}
.lvl-lock-badge {
  position: absolute;
  top: 6px;
  right: 7px;
  font-size: 0.85rem;
  line-height: 1;
}

/* ─── Names form ─────────────────────────────────────── */
.names-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}
.name-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.name-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.03em;
}
.name-input {
  background: var(--surface2);
  border: 1px solid #333;
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.name-input:focus {
  border-color: var(--red);
}
.name-input::placeholder {
  color: #555;
}

/* ─── CTA button ─────────────────────────────────────── */
.cc-btn {
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  border: none;
  margin-top: 10px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.04em;
}
.cc-btn-primary {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: #fff;
  box-shadow: 0 6px 14px rgba(39, 174, 96, 0.35);
}
.cc-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(39, 174, 96, 0.55);
}
.cc-btn-primary:active {
  transform: translateY(0);
}
.cc-btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.cc-btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid #444;
}
.cc-btn-secondary:hover {
  color: var(--text);
  border-color: #666;
}

.cc-btn-ghost {
  background: linear-gradient(135deg, #c0392b, #922b21);
  color: #b5b5b5;
  border: 1px solid #333;
}
.cc-btn-ghost:hover {
  color: var(--text);
  border-color: #555;
}

/* ─── Share box ──────────────────────────────────────── */
.share-box {
  background: var(--surface2);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.share-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid #333;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.82rem;
  padding: 8px 12px;
  font-family: monospace;
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-copy {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
  transition: opacity 0.15s;
}
.share-copy:hover {
  opacity: 0.85;
}
.share-copy.copied {
  background: var(--done);
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.share-app-btn {
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  transition: opacity 0.15s;
}
.share-app-btn:hover {
  opacity: 0.85;
}
.btn-whatsapp {
  background: #25d366;
}
.btn-telegram {
  background: #2aabee;
}
.btn-native {
  background: #444;
}

/* ─── Waiting screen ─────────────────────────────────── */
.waiting-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 30px 20px;
  text-align: center;
}
.waiting-pulse {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--red-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 var(--red-glow);
  }
  50% {
    transform: scale(1.07);
    box-shadow: 0 0 0 14px transparent;
  }
}
.waiting-box h2 {
  font-size: 1.25rem;
  font-weight: 700;
}
.waiting-box p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ─── Join screen ────────────────────────────────────── */
.join-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px 16px;
  text-align: center;
  width: 100%;
}
.join-box .join-emoji {
  font-size: 3rem;
}

/* ─── HUD (durante il gioco) ─────────────────────────── */
.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 10px 20px;
  margin-bottom: 4px;
}
.hud-round {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hud-scores {
  display: flex;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 700;
}
.hud-score-a {
  color: #e74c3c;
}
.hud-score-b {
  color: var(--gold);
}
.hud-vs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.85rem;
}
.hud-vs #labelA {
  color: #e74c3c;
}
.hud-vs-sep {
  color: #888;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}
.hud-vs #labelB {
  color: var(--gold);
}

/* ─── Intensity HUD ──────────────────────────────────── */
.intensity-hud {
  width: 90%;
  margin: 0 auto 10px;
}
.intensity-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  margin-bottom: 5px;
}
.intensity-bar {
  display: flex;
  gap: 3px;
  height: 9px;
}
.intensity-sector {
  flex: 1;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  transition:
    background-color 0.5s ease,
    box-shadow 0.5s ease;
}
.intensity-sector[data-zone='green'].active {
  background: #27ae60;
  box-shadow: 0 0 5px rgba(39, 174, 96, 0.55);
}
.intensity-sector[data-zone='orange'].active {
  background: #e67e22;
  box-shadow: 0 0 5px rgba(230, 126, 34, 0.55);
}
.intensity-sector[data-zone='red'].active {
  background: #e74c3c;
  box-shadow: 0 0 5px rgba(231, 76, 60, 0.55);
}
.intensity-sector.is-boundary[data-zone='green'].active {
  background: linear-gradient(to right, #27ae60, #e67e22);
}
.intensity-sector.is-boundary[data-zone='orange'].active {
  background: linear-gradient(to right, #e67e22, #e74c3c);
}

/* ─── Game card ──────────────────────────────────────── */
.game-card {
  width: 100%;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid #2e2e2e;
  padding: 30px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-height: 180px;
  justify-content: center;
}
.card-emoji {
  font-size: 2.6rem;
}

/* ─── Choosing phase cards ───────────────────────────── */
.game-card.choosing-container {
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.choosing-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 20px 12px;
  text-align: center;
  transition:
    opacity 0.35s,
    background 0.25s;
}
.choosing-card .card-emoji {
  font-size: 1.8rem;
}
.choosing-card .card-text {
  font-size: 0.82rem;
  line-height: 1.4;
}
.choosing-card .cc-btn {
  font-size: 0.72rem;
  padding: 8px 10px;
  width: 100%;
}
.choosing-card.dimmed {
  opacity: 0.2;
  pointer-events: none;
}
.choosing-card.chosen {
  background: rgba(192, 57, 43, 0.08);
}
.choosing-divider {
  width: 1px;
  flex-shrink: 0;
  background: #2e2e2e;
}
.card-text {
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}

/* ─── Stato idle ─────────────────────────────────────── */
.idle-my-turn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.idle-my-turn h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
}
.idle-their-turn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 10px 0;
}
.idle-their-turn h2 {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
}
.dots-anim {
  text-align: center;
  width: 100%;
}
.dots-anim span {
  display: inline-block;
  animation: dot-bounce 1.2s infinite;
  font-size: 1.5rem;
  color: var(--red);
}
.dots-anim span:nth-child(2) {
  animation-delay: 0.2s;
}
.dots-anim span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes dot-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-8px);
  }
}
.their-turn-sub {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--muted);
  opacity: 0.75;
  text-align: center;
  margin-top: 8px;
  animation: their-sub-fade 1s ease forwards;
}
@keyframes their-sub-fade {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 0.75;
    transform: translateY(0);
  }
}

.level-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background: #2a1212;
  color: var(--red);
  border: 1px solid #3d1515;
  border-radius: 20px;
  padding: 4px 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── Draw button ────────────────────────────────────── */
.draw-btn {
  width: 100%;
  padding: 18px;
  border-radius: 16px;
  border: none;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #c0392b, #922b21);
  color: #fff;
  box-shadow: 0 4px 22px rgba(192, 57, 43, 0.5);
  transition: all 0.2s;
  letter-spacing: 0.03em;
}
.draw-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(192, 57, 43, 0.65);
}
.draw-btn:active {
  transform: translateY(0);
}

/* ─── Timer ──────────────────────────────────────────── */
.timer-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.timer-svg {
  width: 90px;
  height: 90px;
  transform: rotate(-90deg);
}
.timer-ring-bg {
  fill: none;
  stroke: #2a2a2a;
  stroke-width: 6;
}
.timer-ring-fill {
  fill: none;
  stroke: var(--red);
  stroke-width: 6;
  stroke-linecap: round;
  transition:
    stroke-dashoffset 0.2s linear,
    stroke 0.3s;
}
.timer-text {
  position: absolute;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}

/* ─── Action buttons ─────────────────────────────────── */
.action-row {
  display: flex;
  gap: 12px;
  width: 100%;
}
.action-btn {
  flex: 1;
  padding: 15px;
  border-radius: 14px;
  border: 2px solid transparent;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.03em;
}
.btn-done {
  background: #1a2e1e;
  color: #27ae60;
  border-color: #27ae60;
}
.btn-done:hover:not(:disabled) {
  background: #27ae60;
  color: #fff;
  transform: translateY(-2px);
}
.btn-done.pressed {
  background: #27ae60;
  color: #fff;
}

.btn-skip {
  background: #1e1e1e;
  color: var(--muted);
  border-color: #333;
}
.btn-skip:hover:not(:disabled) {
  background: #2a2a2a;
  color: var(--text);
}
.btn-skip.pressed {
  background: #333;
  color: var(--text);
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ─── Partner status ─────────────────────────────────── */
.partner-status {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 0;
  border-radius: 8px;
}
.partner-waiting {
  color: var(--muted);
}
.partner-done {
  color: var(--done);
}
.partner-skip {
  color: var(--skip);
}

/* ─── Result screen (inter-round) ────────────────────── */
.result-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  text-align: center;
}
.result-item {
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
}
.result-done {
  background: #1a2e1e;
  color: var(--done);
}
.result-skip {
  background: #1e1e1e;
  color: var(--muted);
}

/* ─── Finished screen ────────────────────────────────── */
.finished-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 30px 20px;
  text-align: center;
}
.finished-box .big-emoji {
  font-size: 4rem;
}
.finished-box h2 {
  font-size: 1.4rem;
  font-weight: 800;
}
.score-board {
  display: flex;
  gap: 20px;
  justify-content: center;
}
.score-pill {
  background: var(--surface2);
  border-radius: 14px;
  padding: 14px 24px;
  text-align: center;
}
.score-pill .who {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.score-pill .pts {
  font-size: 2rem;
  font-weight: 800;
  margin-top: 4px;
}
.score-pill.a .pts {
  color: #e74c3c;
}
.score-pill.b .pts {
  color: var(--gold);
}
.final-msg {
  font-size: 1.05rem;
  font-weight: 700;
  background: linear-gradient(90deg, #e74c3c, #f39c12, #e74c3c);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: final-msg-shine 2.5s linear infinite;
  margin-top: 8px;
}
@keyframes final-msg-shine {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* ─── Error screen ───────────────────────────────────── */
#screen-error {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}
#errorMsg {
  color: #e74c3c;
  font-weight: 700;
  font-size: 1rem;
}

/* ─── Utility ────────────────────────────────────────── */
.hidden {
  display: none !important;
}
.text-center {
  text-align: center;
}
.text-muted {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ─── Age gate ───────────────────────────────────────── */
.age-gate {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.age-gate-box {
  background: var(--surface);
  border-radius: 20px;
  padding: 36px 28px;
  max-width: 360px;
  text-align: center;
  border: 1px solid #2e2e2e;
}
.age-gate-box .ag-icon {
  font-size: 2.8rem;
  margin-bottom: 14px;
  display: block;
}
.age-gate-box h2 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.age-gate-box p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 22px;
}
.age-gate-btns {
  display: flex;
  gap: 12px;
}
.ag-yes {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}
.ag-no {
  flex: 1;
  padding: 12px;
  border: 1px solid #444;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

/* ─── Action type grid (performer) ──────────────────── */
.action-type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.action-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 14px 6px;
  border-radius: 12px;
  border: 2px solid #2a2a2a;
  background: var(--surface2);
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text);
  font-family: var(--font);
  transition: all 0.15s;
}
.action-type-btn small {
  font-size: 0.68rem;
  color: var(--muted);
}
.action-type-btn:hover {
  border-color: var(--red);
  background: #2a1212;
}
.action-type-btn.hinted {
  border-color: var(--red);
  background: #2a1212;
  box-shadow:
    0 0 0 3px var(--red-glow),
    0 0 18px var(--red-glow);
  animation: hint-pulse 1.6s ease-in-out infinite;
}
.action-type-btn.hinted small {
  color: #e74c3c;
}
@keyframes hint-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 3px var(--red-glow),
      0 0 12px var(--red-glow);
  }
  50% {
    box-shadow:
      0 0 0 5px var(--red-glow),
      0 0 28px var(--red-glow);
  }
}

/* ─── Action UI box ──────────────────────────────────── */
.action-ui-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ─── Capture buttons ────────────────────────────────── */
.action-capture-btn {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: 2px dashed #444;
  background: var(--surface2);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s;
}
.action-capture-btn:hover {
  border-color: var(--red);
}

/* ─── Text input ─────────────────────────────────────── */
.text-action-input {
  width: 100%;
  padding: 14px;
  background: var(--surface2);
  border: 1px solid #333;
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  resize: vertical;
  min-height: 110px;
  outline: none;
  line-height: 1.5;
}
.text-action-input:focus {
  border-color: var(--red);
}

/* ─── Recording UI ───────────────────────────────────── */
.recording-ui {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 22px;
  background: #1a0000;
  border-radius: 14px;
  border: 1px solid #3d0000;
}
.recording-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--red);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  animation: blink 1s infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
.record-timer {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.action-stop-btn {
  padding: 10px 28px;
  border-radius: 10px;
  border: 2px solid var(--red);
  background: transparent;
  color: var(--red);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
}
.action-stop-btn:hover {
  background: var(--red);
  color: #fff;
}

/* ─── Media preview ──────────────────────────────────── */
.media-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  width: 100%;
}
.media-preview img {
  width: 100%;
  border-radius: 12px;
  max-height: 260px;
  object-fit: cover;
}
.media-preview audio {
  width: 100%;
}
.media-preview video {
  width: 100%;
  border-radius: 10px;
  max-height: 220px;
}

/* ─── Submitted box ──────────────────────────────────── */
.submitted-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px;
  background: #1a2e1e;
  border-radius: 14px;
  text-align: center;
  border: 1px solid #27ae60;
}
.submitted-check {
  font-size: 2.8rem;
}
.submitted-box p {
  color: #27ae60;
  font-weight: 600;
  font-size: 0.95rem;
}

/* ─── Confirmer area ─────────────────────────────────── */
.confirmer-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ─── Received content ───────────────────────────────── */
.received-content {
  width: 100%;
}
.received-text {
  background: var(--surface2);
  border-radius: 12px;
  padding: 18px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  border-left: 3px solid var(--red);
}
.received-photo {
  width: 100%;
  border-radius: 12px;
  max-height: 360px;
  object-fit: cover;
  display: block;
}
.received-audio-wrap {
  width: 100%;
}
.received-audio {
  width: 100%;
}
.received-video {
  width: 100%;
  border-radius: 12px;
  max-height: 300px;
  display: block;
}

/* ─── Result message ─────────────────────────────────── */
.result-msg {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--done);
  margin-top: 10px;
}

/* ─── Passa round ────────────────────────────────────── */
.skip-btn {
  width: 100%;
  margin-top: 10px;
  background: none;
  border: 1px dashed #444;
  color: #666;
  border-radius: 10px;
  padding: 9px 14px;
  font-family: var(--font);
  font-size: 0.82rem;
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.skip-btn:hover {
  color: var(--muted);
  border-color: #666;
}

/* ─── Confirmer content box ──────────────────────────── */
.confirmer-content-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

/* ─── Reaction buttons ───────────────────────────────── */
.reaction-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  width: 100%;
}
.reaction-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  background: var(--surface);
  border: 1px solid #2e2e2e;
  border-radius: 12px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.1s;
}
.reaction-btn:hover {
  border-color: var(--red);
  background: #2a1212;
  transform: translateY(-2px);
}
.reaction-btn:active {
  transform: translateY(0);
}
.reaction-btn.selected {
  border-color: var(--red);
  background: #2a1212;
}
.reaction-btn:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}
.reaction-btn.selected:disabled {
  opacity: 1;
}
.reaction-emoji {
  font-size: 1.5rem;
  line-height: 1;
}
.reaction-text {
  font-size: 0.6rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.3;
}

/* Reaction nel result phase (lato performer) */
.reaction-result-emoji {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 6px;
}
.reaction-result-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: block;
}

/* ─── Pass notice (lato confirmer) ──────────────────── */
.pass-notice {
  text-align: center;
  padding: 20px;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ─── Abbandona (fisso in basso) ─────────────────────── */
.abandon-btn {
  position: fixed;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 14px;
  color: #555;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 8px 22px;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
  white-space: nowrap;
}
.abandon-btn:hover {
  color: #888;
  border-color: #555;
}

/* ─── Abandon overlay ────────────────────────────────── */
.abandon-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.abandon-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  border: 1px solid #2a2a2a;
}
.abandon-emoji {
  font-size: 2.8rem;
  margin-bottom: 12px;
}
.abandon-box h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 10px;
}
.abandon-box p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 22px;
}
.abandon-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 400px) {
  .cc-header h1 {
    font-size: 1.7rem;
  }
  .level-btn {
    padding: 14px 6px;
  }
  .level-btn .lvl-emoji {
    font-size: 1.7rem;
  }
  .action-type-btn {
    padding: 12px 4px;
    font-size: 1.3rem;
  }
}

.cc-welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
  animation: ccFadeIn 0.25s ease;
}
@keyframes ccFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.cc-welcome-box {
  background: var(--surface, #1a1a1a);
  border: 1px solid #2e2e2e;
  border-radius: 22px;
  padding: 36px 28px 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  animation: ccSlideUp 0.3s ease;
}
@keyframes ccSlideUp {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.cc-welcome-emoji {
  font-size: 2.6rem;
  margin-bottom: 10px;
}
.cc-welcome-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.cc-welcome-sub {
  color: var(--muted, #888);
  font-size: 0.88rem;
  margin-bottom: 24px;
}
.cc-welcome-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cc-how-box {
  text-align: left;
  position: relative;
  padding-top: 44px;
}
.cc-how-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--muted, #888);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  line-height: 1;
}
.cc-how-close:hover {
  background: #2a2a2a;
  color: #fff;
}
.cc-how-content {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted, #aaa);
}
.cc-how-content p {
  margin-bottom: 10px;
}
.cc-how-content strong {
  color: var(--text, #fff);
}
.cc-how-section {
  font-size: 0.9rem;
  margin: 14px 0 6px;
  color: var(--text, #fff);
}

/* ─── Action btn: primary (text = green glow) ──────── */
.action-type-btn.action-primary {
  border-color: #27ae60;
  background: #0d2b1a;
  box-shadow:
    0 0 0 3px rgba(39, 174, 96, 0.25),
    0 0 18px rgba(39, 174, 96, 0.15);
  animation: primary-pulse 2s ease-in-out infinite;
}
.action-type-btn.action-primary small {
  color: #2ecc71;
}
@keyframes primary-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 3px rgba(39, 174, 96, 0.25),
      0 0 12px rgba(39, 174, 96, 0.15);
  }
  50% {
    box-shadow:
      0 0 0 5px rgba(39, 174, 96, 0.35),
      0 0 28px rgba(39, 174, 96, 0.25);
  }
}
.action-type-btn.action-dimmed {
  opacity: 0.45;
}
.action-type-btn.action-empty {
  opacity: 0.15;
  pointer-events: none;
  cursor: default;
}
.action-type-btn.action-empty .btn-content {
  opacity: 0;
}

/* ─── Milestone banner ───────────────────────────────── */
@keyframes milestone-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 2px var(--ms-glow),
      0 0 10px var(--ms-glow);
  }
  50% {
    box-shadow:
      0 0 0 4px var(--ms-glow),
      0 0 24px var(--ms-glow);
  }
}
.milestone-banner {
  border-radius: 12px;
  padding: 9px 16px;
  margin-bottom: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  animation: milestone-pulse 2.2s ease-in-out infinite;
  border: 1px solid currentColor;
  transition:
    color 0.6s ease,
    background 0.6s ease,
    border-color 0.6s ease;
}
.milestone-banner.zone-1 {
  color: #22c55e;
  --ms-glow: rgba(34, 197, 94, 0.45);
  background: linear-gradient(135deg, #021008, #052814);
}
.milestone-banner.zone-2 {
  color: #a3e635;
  --ms-glow: rgba(163, 230, 53, 0.45);
  background: linear-gradient(135deg, #0a1402, #152604);
}
.milestone-banner.zone-3 {
  color: #f59e0b;
  --ms-glow: rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, #1a0e00, #2e1a02);
}
.milestone-banner.zone-4 {
  color: #fb653d;
  --ms-glow: rgba(251, 101, 61, 0.45);
  background: linear-gradient(135deg, #1a0800, #2e1200);
}
.milestone-banner.zone-5 {
  color: #f94500;
  --ms-glow: rgba(249, 69, 0, 0.45);
  background: linear-gradient(135deg, #1a0500, #2e0a00);
}
.milestone-banner.zone-6 {
  color: #c80000;
  --ms-glow: rgba(200, 0, 0, 0.45);
  background: linear-gradient(135deg, #1a0000, #2e0000);
}

/* ─── Upload overlay ─────────────────────────────────── */
.upload-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.upload-box {
  background: var(--surface1);
  border: 1px solid #2e2e2e;
  border-radius: 20px;
  padding: 32px 28px;
  text-align: center;
  width: min(320px, 90vw);
}
.upload-emoji {
  font-size: 2.4rem;
  margin-bottom: 12px;
}
.upload-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.upload-sub {
  font-size: 0.83rem;
  color: var(--muted);
  margin-bottom: 22px;
}
.upload-progress-track {
  background: #2a2a2a;
  border-radius: 99px;
  height: 8px;
  overflow: hidden;
}
.upload-progress-bar {
  height: 100%;
  background: var(--red);
  border-radius: 99px;
  width: 0%;
  transition: width 0.35s ease;
}

/* ─── Result countdown ───────────────────────────────── */
.result-countdown {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.countdown-number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--red);
  animation: countdown-tick 0.4s ease-out;
}
@keyframes countdown-tick {
  0% {
    transform: scale(1.4);
    opacity: 0.3;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ─── Reaction hint ─── */
.reaction-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 50px 14px;
  padding: 9px 16px;
  border: 1px solid rgba(240, 180, 41, 0.35);
  border-radius: 10px;
  background: rgba(240, 180, 41, 0.06);
  font-size: 0.78rem;
  color: rgba(245, 237, 224, 0.65);
  letter-spacing: 0.03em;
}
.reaction-hint-arrow {
  font-size: 1rem;
  animation: hint-bounce 1.2s ease-in-out infinite;
}
@keyframes hint-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

/* ── Feedback ── */
.cc-feedback-link {
  margin-top: 14px;
  text-align: center;
}
.cc-feedback-link button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
  transition: color 0.2s;
}
.cc-feedback-link button:hover {
  color: rgba(255, 255, 255, 0.75);
}
.cc-feedback-textarea {
  width: 100%;
  min-height: 110px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #fff;
  padding: 10px 12px;
  font-size: 0.9rem;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
}
.cc-feedback-textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.45);
}
.cc-feedback-count {
  text-align: right;
  font-size: 0.72rem;
  opacity: 0.45;
  margin-top: 4px;
}

#seo-info-couple {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
