:root{
  --card-radius: 18px;
  --shadow: 0 12px 30px rgba(0,0,0,.35);
  --panel: rgba(10,10,12,.55);
  --panel2: rgba(10,10,12,.35);
  --text: #fff;
  --muted: rgba(255,255,255,.7);
  --accent: #00d4ff;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  overflow-x:hidden;
}
.bg{
  position:fixed; inset:0;
  background-size:cover;
  background-position:center;
  filter:saturate(1.08) contrast(1.05);
  transform:translateZ(0);
}
.app{position:relative; min-height:100%; display:flex; flex-direction:column}
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,.65), rgba(0,0,0,0));
}
.brand{font-weight:900; letter-spacing:.08em; font-size:14px}
.topbar-right{display:flex; gap:10px; align-items:center}
.btn{
  border:none; border-radius:999px;
  padding:10px 14px;
  background: rgba(255,255,255,.14);
  color:var(--text);
  cursor:pointer;
  backdrop-filter: blur(10px);
  transition: transform .06s ease, background .2s ease;
  font-weight:700;
}
.btn:hover{background: rgba(255,255,255,.22)}
.btn:active{transform: scale(.98)}
.btn.primary{background: rgba(0,212,255,.22); border:1px solid rgba(0,212,255,.35)}
.btn.primary:hover{background: rgba(0,212,255,.30)}

.main{flex:1; display:flex; align-items:center; justify-content:center; padding:18px}
.screen{width:min(1100px, 100%); display:none}
.screen.active{display:block}
.panel{
  background: var(--panel);
  backdrop-filter: blur(14px);
  border:1px solid rgba(255,255,255,.14);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding:18px;
}
.h1{font-size:26px; font-weight:900; margin:0 0 12px 0}
.sub{color:var(--muted); margin:0 0 16px 0}
.row{display:flex; gap:12px; flex-wrap:wrap}

.pillgrid{display:flex; gap:10px; flex-wrap:wrap}
.pill{
  min-width:62px;
  text-align:center;
  padding:12px 14px;
  border-radius:16px;
  background: rgba(255,255,255,.12);
  cursor:pointer;
  font-weight:900;
}
.pill:hover{background: rgba(255,255,255,.18)}
.pill.active{background: rgba(0,212,255,.26); border:1px solid rgba(0,212,255,.35)}

.hero-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(120px, 1fr)); gap:12px}
.hero-card{
  background: rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  padding:10px;
  cursor:pointer;
  display:flex; flex-direction:column; gap:8px;
  align-items:center;
  text-align:center;
}
.hero-card img{width:64px; height:64px; border-radius:16px; object-fit:cover; box-shadow: 0 8px 16px rgba(0,0,0,.25)}
.hero-card .name{font-weight:800; font-size:13px}
.hero-card.disabled{opacity:.35; filter:grayscale(1); cursor:not-allowed}
.hero-card.taken{opacity:.35; filter:grayscale(1); cursor:not-allowed}
.hero-card.selected{outline:2px solid rgba(0,212,255,.6); background: rgba(0,212,255,.14)}

.form{
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
  margin:8px 0 12px 0;
}
.input{
  background: rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.16);
  color:var(--text);
  border-radius:14px;
  padding:12px 12px;
  min-width: 220px;
  outline:none;
}

.table{
  display:grid;
  grid-template-columns: 1fr;
  gap:14px;
}
.situation-wrap{display:flex; justify-content:center}
.situation-card{
  position:relative;
  width:min(520px, 100%);
  aspect-ratio: 3 / 4;
  border-radius: var(--card-radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  border:1px solid rgba(255,255,255,.18);
}
.situation-card img{width:100%; height:100%; object-fit:cover; display:block}
.cloud{
  position:absolute;
  top:10px; left:10px; right:10px;
  background: rgba(255,255,255,.85);
  color:#111;
  border-radius:999px;
  padding:10px 14px;
  font-weight:900;
  text-align:center;
  box-shadow: 0 10px 18px rgba(0,0,0,.22);
}

.pass{
  text-align:center;
  padding:20px;
}
.pass .who{font-size:20px; font-weight:900}

.hand{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));
  gap:12px;
}
.answer-card{
  position:relative;
  border-radius: var(--card-radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  cursor:pointer;
  border:1px solid rgba(255,255,255,.16);
  aspect-ratio: 3 / 4;
}
.answer-card img{width:100%; height:100%; object-fit:cover; display:block}
.answer-text{
  position:absolute;
  left:10%; right:10%;
  bottom:8%;
  height:30%;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-weight:900;
  color:#111;
  padding:6px;
  line-height:1.05;
}

.reveal-grid{display:grid; gap:12px; justify-content:center}
.reveal-grid.cols-2{grid-template-columns:repeat(2, minmax(170px, 220px))}
.reveal-grid.cols-3{grid-template-columns:repeat(3, minmax(160px, 200px))}
.reveal-grid.cols-4{grid-template-columns:repeat(2, minmax(170px, 220px))}
.reveal-grid.cols-5{grid-template-columns:repeat(3, minmax(150px, 190px))}
.reveal-note{color:var(--muted); text-align:center; margin-top:8px}

.footer-actions{display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-top:14px}

@media (max-width:520px){
  .h1{font-size:22px}
  .answer-text{left:8%; right:8%}
}
