:root{
  --bg1:#0b1020;
  --bg2:#0f1b3a;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.09);
  --stroke: rgba(255,255,255,.12);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.65);
  --shadow: 0 20px 70px rgba(0,0,0,.45);
  --radius: 22px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--text);
  background:
    radial-gradient(1000px 800px at 20% 10%, rgba(130,87,255,.25), transparent 60%),
    radial-gradient(900px 700px at 85% 25%, rgba(30,231,255,.18), transparent 60%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
}

.page{max-width:1200px; margin:0 auto; padding:26px;}
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 20px;
  border:1px solid var(--stroke);
  background:linear-gradient(180deg, var(--card2), var(--card));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.brand{display:flex; gap:14px; align-items:center;}
.logo {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.08);
  box-shadow: 0 8px 25px rgba(0,0,0,.25);
  overflow: hidden; /* ensures image never spills outside */
}

.logo img {
  width: 70%;        /* scales nicely inside box */
  height: 70%;
  object-fit: contain;
  display: block;
}


.title{font-weight:800; letter-spacing:.2px; font-size:18px}
.subtitle{color:var(--muted); font-size:13px; margin-top:2px}
.adminLink{
  color:var(--text);
  text-decoration:none;
  border:1px solid var(--stroke);
  padding:10px 14px;
  border-radius:14px;
  background:rgba(255,255,255,.06);
}
.adminLink:hover{background:rgba(255,255,255,.10)}

.grid{
  margin-top:18px;
  display:grid;
  grid-template-columns: 1fr 1.2fr;
  gap:18px;
}
@media (max-width: 980px){
  .grid{grid-template-columns:1fr}
}

.card{
  border:1px solid var(--stroke);
  background:linear-gradient(180deg, var(--card2), var(--card));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:18px;
  backdrop-filter: blur(10px);
}
.card h2{margin:0 0 6px 0}
.muted{color:var(--muted)}
textarea{
  width:100%;
  min-height:240px;
  margin-top:10px;
  border-radius:18px;
  border:1px solid var(--stroke);
  background:rgba(10,14,25,.55);
  color:var(--text);
  padding:14px;
  outline:none;
  resize:vertical;
  font-size:14px;
  line-height:1.35;
}
textarea:focus{border-color:rgba(150,170,255,.45)}

.row{
  display:flex; gap:12px;
  margin-top:12px;
}
.btn{
  border:none;
  border-radius:16px;
  padding:12px 16px;
  font-weight:800;
  cursor:pointer;
  color:#08101f;
  background: linear-gradient(135deg, #1ee7ff, #7f6bff);
  box-shadow: 0 14px 35px rgba(0,0,0,.35);
  flex:1;
}
.btn:hover{filter:brightness(1.05)}
.btn:disabled{opacity:.55; cursor:not-allowed}
.btn.secondary{
  background: rgba(255,255,255,.08);
  color: var(--text);
  border:1px solid var(--stroke);
  box-shadow:none;
}
.btn.secondary:hover{background: rgba(255,255,255,.12)}

.hint{
  display:flex; gap:10px; align-items:flex-start;
  margin-top:14px;
  padding:12px 12px;
  border-radius:18px;
  border:1px dashed rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
}
.pill{
  font-size:12px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.07);
  color: var(--muted);
  margin-top:1px;
}

.resultBox{
  margin-top:14px;
  padding:14px;
  border-radius:18px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.05);
}
.resultLabel{color:var(--muted); font-size:12px}
.resultValue{font-size:22px; font-weight:900; margin-top:4px}

.wheelCard{display:flex; flex-direction:column; justify-content:center}
.wheelWrap{
  position:relative;
  display:grid;
  place-items:center;
  padding:16px;
}
canvas{
  width:min(650px, 100%);
  height:auto;
  border-radius:999px;
  background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.08), rgba(255,255,255,0) 55%);
  border:1px solid rgba(255,255,255,.10);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.pointer{
  position:absolute;
  
  top:10px;
  width:0; height:0;
  border-left:16px solid transparent;
  border-right:16px solid transparent;
  border-bottom:30px solid rgba(255,255,255,.92);
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.5));
  z-index:3;
  transform: rotate(180deg);
}
.centerCap{
  position:absolute;
  width:92px; height:92px;
  border-radius:999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.5), rgba(255,255,255,.08) 45%, rgba(0,0,0,.35) 70%),
    linear-gradient(135deg, rgba(30,231,255,.5), rgba(127,107,255,.35));
  z-index:2;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}

.underWheel{
  display:flex; gap:12px;
  padding:0 14px 14px 14px;
}
.mini{
  flex:1;
  border-radius:18px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  padding:12px;
}
.miniLabel{font-size:12px; color:var(--muted)}
.miniValue{font-size:16px; font-weight:900; margin-top:2px}

.footer{
  margin-top:14px;
  padding:10px 2px;
  text-align:center;
}
code{color:rgba(255,255,255,.85)}
