@import url('https://fonts.googleapis.com/css2?family=Lalezar&family=Cairo:wght@400;600;700;800&display=swap');

:root{
  --ink:#14102B;
  --ink-2:#1E1840;
  --coral:#FF6B57;
  --coral-dark:#e0503d;
  --zest:#FFC245;
  --mint:#33D6A6;
  --grape:#8B5CF6;
  --paper:#FFF8ED;
  --text:#F5F0FF;
  --text-dim:#B9AFDD;
  --radius:22px;
}

*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  background:
    radial-gradient(circle at 15% 0%, #241c4d 0%, transparent 45%),
    radial-gradient(circle at 100% 30%, #2a1550 0%, transparent 40%),
    var(--ink);
  color:var(--text);
  font-family:'Cairo', sans-serif;
  direction:rtl;
  min-height:100%;
  display:flex;
  justify-content:center;
}

#app{
  width:100%;
  max-width:520px;
  min-height:100vh;
  padding:20px 18px 40px;
  display:flex;
  flex-direction:column;
  gap:16px;
}

.brand{
  text-align:center;
  margin:18px 0 6px;
}
.brand h1{
  font-family:'Lalezar', sans-serif;
  font-size:2.6rem;
  letter-spacing:1px;
  margin:0;
  color:var(--zest);
  text-shadow:3px 3px 0 var(--coral-dark);
}
.brand p{
  color:var(--text-dim);
  margin:6px 0 0;
  font-size:.95rem;
}

.card{
  background:var(--ink-2);
  border-radius:var(--radius);
  padding:22px;
  box-shadow:0 10px 0 rgba(0,0,0,.25), 0 20px 40px rgba(0,0,0,.35);
  position:relative;
}

.card.stacked::before, .card.stacked::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:var(--radius);
  background:var(--ink-2);
  z-index:-1;
}
.card.stacked::before{ transform:rotate(-3deg); opacity:.55; }
.card.stacked::after{ transform:rotate(3deg); opacity:.35; }

h2.title{
  font-family:'Lalezar', sans-serif;
  font-size:1.7rem;
  color:var(--text);
  margin:0 0 14px;
}

label{
  display:block;
  font-size:.85rem;
  color:var(--text-dim);
  margin-bottom:6px;
  font-weight:600;
}

input[type=text], textarea{
  width:100%;
  background:#0F0B27;
  border:2px solid #362a63;
  border-radius:14px;
  color:var(--text);
  font-family:'Cairo', sans-serif;
  font-size:1.05rem;
  padding:14px;
  outline:none;
  transition:border-color .15s;
}
input[type=text]:focus, textarea:focus{ border-color:var(--coral); }
textarea{ resize:none; min-height:90px; }

.field{ margin-bottom:16px; }

.btn{
  display:block;
  width:100%;
  border:none;
  border-radius:16px;
  padding:16px;
  font-family:'Cairo', sans-serif;
  font-weight:800;
  font-size:1.05rem;
  cursor:pointer;
  transition:transform .1s ease, box-shadow .1s ease;
  box-shadow:0 6px 0 rgba(0,0,0,.25);
}
.btn:active{ transform:translateY(4px); box-shadow:0 2px 0 rgba(0,0,0,.25); }
.btn-primary{ background:var(--coral); color:#2a0d05; }
.btn-secondary{ background:transparent; color:var(--text); border:2px solid #362a63; box-shadow:none; }
.btn-mint{ background:var(--mint); color:#04281f; }
.btn-grape{ background:var(--grape); color:#fff; }
.btn:disabled{ opacity:.45; cursor:not-allowed; }
.btn + .btn{ margin-top:12px; }

.row{ display:flex; gap:10px; }
.row .btn{ flex:1; }

.pill{
  display:inline-block;
  background:#0F0B27;
  border:2px solid #362a63;
  border-radius:999px;
  padding:6px 16px;
  font-weight:700;
  letter-spacing:2px;
  font-size:1.1rem;
  color:var(--zest);
}

.center{ text-align:center; }

.player-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.player-list li{
  background:#0F0B27;
  border-radius:12px;
  padding:12px 14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-weight:700;
}
.player-list li .score{ color:var(--mint); font-family:'Cairo'; }
.you-tag{ background:var(--coral); color:#2a0d05; border-radius:8px; padding:2px 8px; font-size:.7rem; margin-right:6px; }

.timer-wrap{
  display:flex; align-items:center; justify-content:center; gap:10px; margin-bottom:14px;
}
.timer{
  font-family:'Lalezar';
  font-size:2rem;
  color:var(--zest);
  min-width:60px;
  text-align:center;
}
.timer.low{ color:var(--coral); animation:pulse .6s infinite; }
@keyframes pulse{ 50%{ transform:scale(1.12);} }

.prompt-card{
  background:var(--paper);
  color:#241a3f;
  border-radius:18px;
  padding:22px;
  font-size:1.25rem;
  font-weight:700;
  line-height:1.7;
  margin-bottom:16px;
  transform:rotate(-1.2deg);
  box-shadow:0 8px 0 rgba(0,0,0,.15);
}
.prompt-card .blank{
  display:inline-block;
  border-bottom:3px dashed var(--coral);
  min-width:60px;
  margin:0 2px;
}

.small{ font-size:.85rem; color:var(--text-dim); }

.vote-pair{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:22px;
  border:2px solid #362a63;
  border-radius:18px;
  padding:16px;
}
.vote-prompt{ font-weight:700; color:var(--zest); margin-bottom:6px; }
.answer-btn{
  background:#0F0B27;
  border:2px solid #362a63;
  border-radius:14px;
  padding:14px;
  color:var(--text);
  text-align:right;
  cursor:pointer;
  font-family:'Cairo';
  font-size:1rem;
  transition:.12s;
}
.answer-btn:hover{ border-color:var(--mint); }
.answer-btn.voted{ border-color:var(--mint); background:#0f2b25; }
.answer-btn:disabled{ cursor:default; opacity:.6; }
.own-note{ color:var(--text-dim); font-size:.85rem; text-align:center; padding:8px; }

.result-row{
  display:flex; justify-content:space-between; align-items:center;
  background:#0F0B27; border-radius:14px; padding:14px 16px; margin-bottom:10px;
}
.result-row .votes{ color:var(--mint); font-weight:800; }
.result-row.winner{ border:2px solid var(--zest); }
.crown{ font-size:1.1rem; }

.hidden{ display:none !important; }

.footer-note{
  text-align:center;
  color:var(--text-dim);
  font-size:.8rem;
  margin-top:8px;
}

.error-box{
  background:#3a1420; color:#ff9a9a; border-radius:12px; padding:10px 14px; font-size:.9rem; margin-bottom:12px;
}

.copy-row{ display:flex; gap:8px; align-items:center; }
.copy-row .pill{ flex:1; text-align:center; }
