:root{
  --void:#070814;
  --night:#0d1022;
  --blue:#152844;
  --violet:#2a164b;
  --gold:#d8b465;
  --gold2:#f0d58a;
  --ice:#8ad8ff;
  --red:#d45f5f;
  --green:#77e2b4;
  --text:#f4ead5;
  --muted:#a9a1b8;
  --line:rgba(216,180,101,.28);
  --panel:rgba(255,255,255,.07);
}

*{box-sizing:border-box}

body{
  margin:0;
  min-height:100vh;
  color:var(--text);
  font-family:Arial,Helvetica,sans-serif;
  background:
    radial-gradient(circle at 50% 10%, rgba(138,216,255,.15), transparent 26%),
    radial-gradient(circle at 12% 22%, rgba(212,95,95,.12), transparent 18%),
    radial-gradient(circle at 85% 20%, rgba(216,180,101,.12), transparent 22%),
    radial-gradient(circle at 50% 90%, rgba(42,22,75,.45), transparent 32%),
    linear-gradient(135deg,#050713 0%,#0d1022 42%,#080917 100%);
  overflow-x:hidden;
}

body:before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:0;
  background:
    linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px),
    linear-gradient(rgba(255,255,255,.022) 1px,transparent 1px);
  background-size:72px 72px;
  mask-image:radial-gradient(circle at 50% 45%,black,transparent 78%);
}

.fog{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  overflow:hidden;
}
.fog span{
  position:absolute;
  width:420px;
  height:120px;
  border-radius:999px;
  background:rgba(138,216,255,.08);
  filter:blur(24px);
  animation:fogMove 12s ease-in-out infinite;
}
.fog .f1{left:-80px;top:22%}
.fog .f2{right:-120px;top:58%;animation-delay:2s;background:rgba(216,180,101,.07)}
.fog .f3{left:34%;bottom:3%;animation-delay:4s;background:rgba(142,93,255,.08)}

.main-game{
  position:relative;
  z-index:2;
  width:min(1200px,calc(100% - 32px));
  margin:0 auto;
  min-height:calc(100vh - 96px);
  display:grid;
  place-items:center;
  padding:28px 0 14px;
}

.game-card{
  width:100%;
  border-radius:38px;
  padding:clamp(18px,3vw,34px);
  background:linear-gradient(180deg,rgba(255,255,255,.085),rgba(255,255,255,.04));
  border:1px solid rgba(216,180,101,.22);
  box-shadow:0 38px 120px rgba(0,0,0,.48),0 0 90px rgba(138,216,255,.06),inset 0 0 0 1px rgba(255,255,255,.035);
  backdrop-filter:blur(14px);
}

.game-layout{
  display:grid;
  grid-template-columns:minmax(560px,1fr) 340px;
  gap:clamp(22px,3vw,36px);
  align-items:stretch;
}

.play-area{display:grid;gap:20px}

.scene{
  min-height:300px;
  border-radius:34px;
  background:
    radial-gradient(circle at 50% 18%,rgba(138,216,255,.16),transparent 30%),
    radial-gradient(circle at 50% 92%,rgba(216,180,101,.10),transparent 24%),
    linear-gradient(180deg,rgba(0,0,0,.25),rgba(0,0,0,.18));
  border:1px solid rgba(255,255,255,.09);
  display:grid;
  place-items:center;
  position:relative;
  overflow:hidden;
  box-shadow:inset 0 0 60px rgba(0,0,0,.25);
}

.scene:before,.scene:after{
  content:"";
  position:absolute;
  bottom:-20px;
  width:170px;
  height:260px;
  border-radius:80px 80px 0 0;
  background:linear-gradient(180deg,rgba(216,180,101,.16),rgba(255,255,255,.03));
  border:1px solid rgba(216,180,101,.18);
}
.scene:before{left:7%}
.scene:after{right:7%}

.gate{
  position:relative;
  width:min(330px,70%);
  height:250px;
  border-radius:150px 150px 18px 18px;
  background:
    radial-gradient(circle at 50% 48%,rgba(138,216,255,.20),transparent 34%),
    linear-gradient(90deg,rgba(216,180,101,.14),rgba(255,255,255,.04),rgba(216,180,101,.14)),
    linear-gradient(180deg,#1d1f31,#0d0f1c);
  border:6px solid rgba(216,180,101,.55);
  box-shadow:0 0 60px rgba(138,216,255,.16),0 24px 68px rgba(0,0,0,.42),inset 0 0 50px rgba(0,0,0,.42);
  display:grid;
  place-items:center;
  z-index:2;
}
.gate.open{
  background:
    radial-gradient(circle at 50% 48%,rgba(240,213,138,.95),rgba(138,216,255,.40) 32%,rgba(0,0,0,.22) 65%),
    linear-gradient(180deg,#1d1f31,#0d0f1c);
}
.gate-symbol{
  font-size:96px;
  color:var(--gold2);
  text-shadow:0 0 22px rgba(240,213,138,.45);
}
.runes-ring{
  position:absolute;
  inset:20px;
  border-radius:inherit;
  border:1px dashed rgba(216,180,101,.35);
  animation:pulse 2.4s ease-in-out infinite;
}

.round-head{
  padding:18px 20px;
  border-radius:28px;
  background:rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.09);
}
.round-head h1{
  margin:0 0 8px;
  color:var(--gold2);
  font-size:clamp(32px,4.6vw,58px);
  line-height:1.02;
  letter-spacing:-.9px;
}
.round-head p{
  margin:0;
  color:var(--muted);
  font-size:17px;
  line-height:1.5;
}

.choice-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
}
.choice-grid.cards5{grid-template-columns:repeat(5,1fr)}
.choice-grid.runes{grid-template-columns:repeat(6,1fr)}

.choice-card{
  min-height:260px;
  cursor:pointer;
  border-radius:30px;
  padding:20px;
  color:var(--text);
  background:
    radial-gradient(circle at 50% 0%,rgba(216,180,101,.13),transparent 34%),
    linear-gradient(180deg,rgba(255,255,255,.09),rgba(255,255,255,.045));
  border:1px solid rgba(255,255,255,.11);
  box-shadow:0 22px 60px rgba(0,0,0,.28);
  transition:transform .16s ease,border-color .16s ease,background .16s ease;
  display:grid;
  grid-template-rows:auto auto 1fr;
  gap:12px;
}
.choice-card:hover{
  transform:translateY(-6px);
  border-color:rgba(216,180,101,.52);
}
.choice-card.revealed{cursor:default;pointer-events:none}
.choice-card.selected{border-color:rgba(138,216,255,.65)}

.choice-grid.cards5 .choice-card{min-height:230px;padding:14px}
.choice-grid.runes .choice-card{min-height:150px;padding:14px}

.icon{
  font-size:clamp(64px,7vw,102px);
  line-height:1;
  text-align:center;
  filter:drop-shadow(0 14px 18px rgba(0,0,0,.3));
}
.rune-icon{
  font-size:clamp(42px,6vw,72px);
  color:var(--ice);
  font-weight:950;
  text-shadow:0 0 18px rgba(138,216,255,.30);
}

.choice-card h2{
  margin:0;
  text-align:center;
  font-size:21px;
  color:var(--text);
}
.choice-card p{
  margin:0;
  text-align:center;
  color:var(--muted);
  font-size:14px;
  line-height:1.42;
}

.inventory{
  min-height:110px;
  border-radius:28px;
  padding:16px;
  background:rgba(0,0,0,.20);
  border:1px dashed rgba(216,180,101,.25);
  display:flex;
  justify-content:center;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.inventory-title{
  width:100%;
  text-align:center;
  color:var(--muted);
  font-weight:900;
  font-size:13px;
  letter-spacing:1px;
  text-transform:uppercase;
}
.inv-item{
  width:66px;
  height:66px;
  border-radius:20px;
  display:grid;
  place-items:center;
  font-size:38px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 12px 28px rgba(0,0,0,.22);
  animation:popIn .22s ease;
}

.side-panel{
  min-height:100%;
  border-radius:32px;
  padding:22px;
  background:rgba(0,0,0,.24);
  border:1px solid rgba(255,255,255,.11);
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:15px;
}
.stat-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.stat{
  padding:14px 12px;
  border-radius:20px;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.10);
  text-align:center;
  color:var(--muted);
  font-weight:900;
  font-size:13px;
}
.stat strong{
  display:block;
  margin-top:6px;
  color:var(--text);
  font-size:25px;
}
.message{
  min-height:190px;
  display:grid;
  align-content:center;
  text-align:center;
  line-height:1.48;
  font-size:18px;
}
.message strong{color:var(--gold2)}
.message .small{display:block;margin-top:9px;color:var(--muted);font-size:13px}
.good{color:var(--green);font-weight:950}
.bad{color:var(--red);font-weight:950}
.ice{color:var(--ice);font-weight:950}
.gold{color:var(--gold2);font-weight:950}

.actions{display:grid;gap:11px}
.btn,button{
  border:none;
  cursor:pointer;
  border-radius:999px;
  padding:15px 24px;
  font-size:17px;
  font-weight:950;
  color:#14101d;
  background:linear-gradient(135deg,var(--gold2),var(--gold));
  text-decoration:none;
  text-align:center;
  box-shadow:0 16px 36px rgba(216,180,101,.18);
  transition:transform .16s ease,opacity .16s ease;
}
.btn:hover,button:hover{transform:translateY(-2px)}
.btn.secondary,button.secondary{
  background:rgba(255,255,255,.08);
  color:var(--text);
  border:1px solid rgba(255,255,255,.12);
  box-shadow:none;
}
.reveal-fate{
  padding:20px 30px;
  font-size:24px;
  letter-spacing:.4px;
  text-transform:uppercase;
  background:linear-gradient(135deg,#fff2b2,var(--gold2) 46%,#ad7d28);
  box-shadow:0 24px 58px rgba(216,180,101,.24),inset 0 0 0 1px rgba(255,255,255,.22);
}

.bottom-brand{
  position:relative;
  z-index:2;
  width:min(1180px,calc(100% - 32px));
  margin:0 auto;
  text-align:center;
  color:var(--gold2);
  font-size:clamp(28px,4vw,42px);
  font-weight:950;
  letter-spacing:.4px;
  text-shadow:0 14px 38px rgba(0,0,0,.34);
}
.footer{
  position:relative;
  z-index:2;
  width:min(1180px,calc(100% - 32px));
  margin:0 auto;
  padding:18px 0 34px;
  display:flex;
  justify-content:center;
  gap:20px;
  flex-wrap:wrap;
}
.footer a{
  color:var(--muted);
  text-decoration:none;
  font-size:15px;
  font-weight:900;
}
.footer a:hover{color:var(--gold2)}

.content-wrap{
  position:relative;
  z-index:2;
  width:min(900px,calc(100% - 32px));
  margin:34px auto 60px;
}
.content-card{
  padding:34px;
  border-radius:32px;
  background:linear-gradient(180deg,rgba(255,255,255,.085),rgba(255,255,255,.04));
  border:1px solid rgba(216,180,101,.22);
  box-shadow:0 24px 80px rgba(0,0,0,.28);
  color:var(--muted);
  line-height:1.72;
  backdrop-filter:blur(12px);
}
.content-card h1,.content-card h2{color:var(--text)}
.content-card h1{margin-top:0;font-size:clamp(32px,4vw,48px)}
.content-card a{color:var(--gold2);font-weight:900}

@keyframes popIn{from{transform:scale(.5);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes pulse{0%,100%{opacity:.35}50%{opacity:1}}
@keyframes fogMove{0%,100%{transform:translateX(0)}50%{transform:translateX(60px)}}

@media(max-width:1040px){
  .game-layout{grid-template-columns:1fr}
  .side-panel{min-height:auto}
}
@media(max-width:760px){
  .choice-grid,.choice-grid.cards5,.choice-grid.runes{grid-template-columns:1fr}
  .choice-card{min-height:220px}
  .choice-grid.runes .choice-card{min-height:130px}
  .icon{font-size:82px}
  .gate{height:220px}
}