:root{
  --bg:#070513;
  --bg2:#120821;
  --card:rgba(255,255,255,.065);
  --card2:rgba(255,255,255,.095);
  --border:rgba(255,255,255,.12);
  --pink:#ff3d9a;
  --pink2:#ff74bd;
  --purple:#9b5cff;
  --green:#35e27e;
  --red:#ff4f69;
  --gold:#ffd166;
  --text:#fff7ff;
  --muted:#a8a2b7;
  --shadow:0 22px 70px rgba(0,0,0,.45);
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body{
  background:
    radial-gradient(circle at 20% 0%,rgba(255,61,154,.22),transparent 30%),
    radial-gradient(circle at 90% 10%,rgba(155,92,255,.20),transparent 28%),
    radial-gradient(circle at 50% 120%,rgba(255,61,154,.13),transparent 36%),
    linear-gradient(150deg,#05030d,#10071d 52%,#05030d);
  overflow-x:hidden;
}

button,input,select{font:inherit}
button{border:0;color:var(--text);cursor:pointer}
input{
  width:100%;
  padding:14px 15px;
  border-radius:16px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.28);
  color:var(--text);
  outline:none;
}
input:focus{border-color:rgba(255,61,154,.65);box-shadow:0 0 0 4px rgba(255,61,154,.12)}

.app{
  width:min(440px,100%);
  min-height:100svh;
  margin:0 auto;
  padding:calc(16px + env(safe-area-inset-top)) 14px calc(92px + env(safe-area-inset-bottom));
  position:relative;
}

.top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:16px;
}
.back,.iconbtn{
  width:42px;height:42px;
  display:grid;place-items:center;
  border-radius:14px;
  background:rgba(255,255,255,.06);
  border:1px solid var(--border);
}
.brand{text-align:center;flex:1}
.brand h1,.brand h2{
  margin:0;
  font-size:17px;
  letter-spacing:.08em;
  color:var(--pink2);
  text-shadow:0 0 18px rgba(255,61,154,.45);
}
.brand small{color:var(--muted)}

.logo{
  padding:28px 18px 20px;
  text-align:center;
}
.logo .party{
  font-size:54px;
  line-height:.9;
  font-weight:950;
  letter-spacing:-2px;
  color:#ff7ac4;
  text-shadow:0 0 12px rgba(255,61,154,.9),0 0 36px rgba(255,61,154,.52);
}
.logo .enzo{
  font-size:34px;
  font-family:cursive;
  color:white;
  text-shadow:0 0 20px rgba(255,255,255,.4);
}

.card{
  background:linear-gradient(150deg,rgba(255,255,255,.10),rgba(255,255,255,.045));
  border:1px solid var(--border);
  border-radius:24px;
  box-shadow:var(--shadow);
  backdrop-filter:blur(18px);
}
.panel{padding:16px;margin-bottom:14px}
.panel h3{margin:0 0 12px;font-size:14px;letter-spacing:.06em;text-transform:uppercase;color:#ffd8ed}
.muted{color:var(--muted);font-size:13px}
.center{text-align:center}
.hidden{display:none!important}

.menu{
  display:grid;
  gap:14px;
  margin-top:18px;
}
.menuItem{
  display:flex;
  align-items:center;
  gap:16px;
  padding:18px;
  min-height:96px;
  border-radius:22px;
  background:linear-gradient(135deg,rgba(255,61,154,.22),rgba(155,92,255,.10));
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 15px 38px rgba(0,0,0,.3);
}
.menuItem.active{border-color:rgba(255,61,154,.75);box-shadow:0 0 0 1px rgba(255,61,154,.4),0 0 35px rgba(255,61,154,.32)}
.menuIcon{font-size:38px;width:58px;text-align:center}
.menuTitle{font-size:21px;font-weight:950;color:#ff8acb}
.menuSub{font-size:13px;color:var(--muted);margin-top:4px}

.primary{
  width:100%;
  padding:16px 18px;
  border-radius:16px;
  background:linear-gradient(135deg,#ff2f94,#b935ff);
  box-shadow:0 14px 34px rgba(255,61,154,.28);
  font-weight:950;
  text-transform:uppercase;
}
.secondary{
  width:100%;
  padding:14px 16px;
  border-radius:16px;
  background:rgba(255,255,255,.075);
  border:1px solid var(--border);
  font-weight:800;
}
.danger{background:linear-gradient(135deg,#ff365d,#8d1830)}
.success{background:linear-gradient(135deg,#24c867,#10753b)}
.row{display:flex;gap:10px;align-items:center}
.row>*{flex:1}
.counter{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 0;
  border-bottom:1px solid rgba(255,255,255,.07);
}
.counter:last-child{border-bottom:0}
.counter button{
  width:38px;height:38px;border-radius:13px;
  background:rgba(255,255,255,.09);
  border:1px solid var(--border);
  font-size:22px;
}
.counter strong{font-size:20px}
.players{display:flex;flex-wrap:wrap;gap:8px}
.badge{
  display:inline-flex;
  gap:6px;
  align-items:center;
  padding:8px 10px;
  border-radius:12px;
  background:rgba(255,61,154,.12);
  border:1px solid rgba(255,61,154,.22);
  color:#ffd4eb;
  font-weight:800;
  font-size:13px;
}
.badge.ok{background:rgba(53,226,126,.12);border-color:rgba(53,226,126,.25);color:#afffcc}
.badge.wait{background:rgba(255,255,255,.06);border-color:var(--border);color:var(--muted)}

.cards{
  display:flex;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
  margin:18px 0;
}
.playingCard{
  width:58px;height:82px;
  border-radius:8px;
  background:#fafafa;
  color:#111;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:7px;
  font-weight:950;
  font-size:21px;
  box-shadow:0 10px 28px rgba(0,0,0,.32);
  border:1px solid rgba(0,0,0,.2);
}
.playingCard.red{color:#d81f42}
.playingCard.big{width:86px;height:122px;font-size:31px}
.playingCard.back{
  background:
    linear-gradient(45deg,rgba(255,255,255,.08) 25%,transparent 25%,transparent 75%,rgba(255,255,255,.08) 75%),
    linear-gradient(45deg,rgba(255,255,255,.08) 25%,transparent 25%,transparent 75%,rgba(255,255,255,.08) 75%),
    linear-gradient(135deg,#2b143e,#ff3d9a);
  background-position:0 0,8px 8px,0 0;
  background-size:16px 16px,16px 16px,100% 100%;
  color:transparent;
  border:2px solid rgba(255,255,255,.7);
}
.playingCard.selectable{cursor:pointer;transition:.15s}
.playingCard.selectable.selected{transform:translateY(-8px);box-shadow:0 0 0 3px var(--pink),0 0 28px rgba(255,61,154,.45)}
.playingCard .bottom{align-self:flex-end;transform:rotate(180deg)}

.pyramid{
  display:flex;
  flex-direction:column-reverse;
  align-items:center;
  gap:5px;
  margin:16px 0 20px;
}
.pyrow{display:flex;gap:5px;align-items:center}
.pycard{
  width:42px;height:58px;border-radius:6px;
  background:linear-gradient(135deg,#2b143e,#ff3d9a);
  border:1px solid rgba(255,255,255,.55);
  box-shadow:0 0 12px rgba(255,61,154,.22);
  display:grid;place-items:center;
  font-weight:950;
  font-size:13px;
}
.pycard.revealed{background:#fafafa;color:#111}
.pycard.red{color:#d81f42}
.pycard.current{box-shadow:0 0 0 3px var(--gold),0 0 26px rgba(255,209,102,.45)}

.choiceGrid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.choiceGrid.three{grid-template-columns:repeat(3,1fr)}
.choice{
  padding:13px 10px;
  border-radius:14px;
  background:rgba(255,255,255,.07);
  border:1px solid var(--border);
  text-align:center;
  font-weight:900;
}
.choice.active{background:linear-gradient(135deg,#ff2f94,#b935ff);border-color:rgba(255,255,255,.32)}
.choice small{display:block;color:var(--muted);font-weight:600;margin-top:4px}

.alert{
  padding:15px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.055);
  margin-bottom:13px;
}
.alert.red{border-color:rgba(255,79,105,.35);background:rgba(255,79,105,.12)}
.alert.green{border-color:rgba(53,226,126,.35);background:rgba(53,226,126,.11)}
.alert.gold{border-color:rgba(255,209,102,.35);background:rgba(255,209,102,.10)}

.footerNav{
  position:fixed;
  left:50%;
  bottom:0;
  transform:translateX(-50%);
  width:min(440px,100%);
  padding:8px 12px calc(8px + env(safe-area-inset-bottom));
  background:rgba(8,5,18,.86);
  border-top:1px solid rgba(255,255,255,.1);
  backdrop-filter:blur(20px);
  display:flex;
  gap:8px;
  z-index:50;
}
.footerNav button{
  flex:1;
  padding:9px 5px;
  border-radius:14px;
  background:transparent;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
}
.footerNav button.active{background:rgba(255,61,154,.16);color:#ff8acb}
.footerNav b{display:block;font-size:20px;margin-bottom:2px}

.fullscreenHint{
  font-size:12px;
  color:var(--muted);
  text-align:center;
  margin:10px 0;
}

@media (display-mode:standalone){
  .fullscreenHint{display:none}
}
