:root{
  --bg0:#070a12;
  --bg1:#0b1020;
  --card:#0f162c;
  --card2:#101a34;
  --text:#e7ecff;
  --muted:#aab3d6;
  --line:rgba(255,255,255,0.08);
  --accent:#22c55e;
  --accent2:#38bdf8;
  --good:#22c55e;
  --bad:#fb7185;
  --shadow: 0 20px 60px rgba(0,0,0,0.45);
}
html{color-scheme: dark}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background: radial-gradient(1200px 600px at 10% 10%, rgba(124,92,255,0.18), transparent 60%),
              radial-gradient(900px 500px at 90% 20%, rgba(34,211,238,0.12), transparent 60%),
              linear-gradient(180deg, var(--bg0), var(--bg1));
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.bg{
  position:fixed; inset:0;
  background-image: radial-gradient(circle at 20% 30%, rgba(124,92,255,0.25), transparent 35%),
                    radial-gradient(circle at 80% 20%, rgba(34,211,238,0.18), transparent 40%);
  background-repeat: no-repeat;
  filter: blur(20px);
  opacity:0.65;
  pointer-events:none;
}
.container{max-width:1100px; margin:0 auto; padding:28px 18px 40px; position:relative}
.bannerWrap{
  margin: 0 0 18px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(15,22,44,0.45);
  box-shadow: var(--shadow);
  height: 220px;
}
.banner{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.header{display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px}
.title{margin:0; font-size:28px; letter-spacing:-0.02em}
.sub{margin-top:6px; color:var(--muted); font-size:13px}
.linksRow{display:flex; flex-wrap:wrap; gap:8px; margin-top:10px}
.chipLink{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(15,22,44,0.55);
  color: var(--text);
  text-decoration:none;
  font-size:12px;
  font-weight:800;
}
.chipLink:hover{border-color: rgba(34,197,94,0.35); box-shadow: 0 0 0 3px rgba(34,197,94,0.12)}
.twitchEmbedWrap{
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(7,10,18,0.35);
  aspect-ratio: 16 / 9;
}
.twitchEmbedWrap iframe{
  width: 100%;
  height: 100%;
  display: block;
}
.pill{
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(15,22,44,0.6);
  backdrop-filter: blur(10px);
  font-size:12px;
  color:var(--muted);
}
.grid{display:grid; gap:14px; grid-template-columns: repeat(2, minmax(0, 1fr));}
.card{
  border:1px solid var(--line);
  background: linear-gradient(180deg, rgba(15,22,44,0.92), rgba(16,26,52,0.72));
  border-radius:18px;
  padding:16px;
  box-shadow: var(--shadow);
}
.span2{grid-column: span 2;}
.cardTitle{color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:0.1em}
.cardTitleRow{display:flex; align-items:center; justify-content:space-between; gap:12px}
.sortWrap{display:flex; align-items:center; gap:8px}
.sortLabel{color:var(--muted); font-size:12px; letter-spacing:0.04em; text-transform:uppercase}
.sortSelect{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(15,22,44,0.92);
  background-color: rgba(15,22,44,0.92);
  color: var(--text);
  font-size:12px;
  outline:none;
}
.sortSelect:focus{border-color: rgba(34,211,238,0.55); box-shadow: 0 0 0 3px rgba(34,211,238,0.14)}
.textInput{
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(15,22,44,0.92);
  color: var(--text);
  font-size:12px;
  outline:none;
  min-width: 220px;
}
.textInput::placeholder{color: rgba(170,179,214,0.65)}
.textInput:focus{border-color: rgba(34,211,238,0.55); box-shadow: 0 0 0 3px rgba(34,211,238,0.14)}
.big{font-size:34px; margin-top:10px; letter-spacing:-0.03em}
.muted{color:var(--muted); font-size:13px; margin-top:6px}
.barWrap{height:10px; border-radius:999px; background: rgba(255,255,255,0.07); margin-top:12px; overflow:hidden}
.bar{height:100%; width:0%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius:999px; transition: width 300ms ease}
.bar.milestone{background: linear-gradient(90deg, #22c55e, #38bdf8);}
.progressRow{display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top:10px}
.progressChip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(7,10,18,0.25);
  color: rgba(235,242,255,0.92);
  font-size:12px;
  line-height:1;
}
.progressChip.muted{color: rgba(170,179,214,0.95); background: rgba(7,10,18,0.18)}
.progressChip.secondary{
  border: 1px solid rgba(34,211,238,0.22);
  background: linear-gradient(90deg, rgba(34,197,94,0.20), rgba(56,189,248,0.20));
  color: rgba(235,242,255,0.95);
  font-weight: 800;
}
.progressChip.primary{border:none; background: linear-gradient(90deg, var(--accent), var(--accent2)); color:#061018; font-weight:900}
.progressChip.primary{box-shadow: 0 8px 24px rgba(34,211,238,0.10)}
.link{color: var(--good); text-decoration:none}
.link:hover{text-decoration:underline}
.list{list-style:none; padding:0; margin:12px 0 0; display:flex; flex-direction:column; gap:10px; max-height:360px; overflow:auto}
.logPage .list{max-height: calc(25 * 56px);}
#featuredList.list{max-height:none; overflow:visible;}
.rewardsGrid{display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:12px; margin-top:12px;}
.rewardCard{border:1px solid rgba(255,255,255,0.08); background: rgba(7,10,18,0.25); border-radius:16px; overflow:hidden}
.rewardCard.isDisabled{opacity:0.6}
.rewardImg{display:block; width:100%; aspect-ratio: 16 / 9; max-height:140px; object-fit:contain; background: rgba(255,255,255,0.06)}
.rewardBody{padding:12px}
.rewardTitleRow{display:flex; align-items:baseline; justify-content:space-between; gap:10px}
.rewardName{font-weight:800; font-size:13px; line-height:1.25; min-width:0}
.rewardPrice{font-weight:900; font-size:12px; color: var(--text); white-space:nowrap}
.rewardDesc{color:var(--muted); font-size:12px; margin-top:6px; line-height:1.35}
.rewardMetaRow{display:flex; flex-wrap:wrap; gap:8px; margin-top:10px}
.badge{font-size:11px; padding:6px 8px; border-radius:999px; border:1px solid rgba(255,255,255,0.12); color: rgba(170,179,214,0.95); background: rgba(15,22,44,0.55)}
.badge.good{border-color: rgba(34,197,94,0.35); color: rgba(34,197,94,0.95)}
.badge.bad{border-color: rgba(251,113,133,0.35); color: rgba(251,113,133,0.95)}
.rewardBtn{display:inline-block; margin-top:10px; padding:9px 10px; border-radius:12px; text-decoration:none; font-weight:900; font-size:12px; color:#061018; background: linear-gradient(90deg, var(--accent), var(--accent2))}
.rewardBtn:hover{filter: brightness(1.06)}
.rewardBtn.isDisabled{pointer-events:none; opacity:0.6}
.item{display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:10px 12px; border-radius:14px; border:1px solid rgba(255,255,255,0.08); background: rgba(7,10,18,0.35)}
.left{min-width:0}
.name{font-weight:700; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.comment{color:var(--muted); font-size:12px; margin-top:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.meta{color:rgba(170,179,214,0.9); font-size:11px; margin-top:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.right{text-align:right; flex:0 0 auto}
.amount{font-weight:800; font-size:13px}
.time{color:var(--muted); font-size:11px; margin-top:3px}
.footer{margin-top:18px}
.widgetsGrid{display:grid; gap:12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top:12px}
.widget{border:1px solid rgba(255,255,255,0.08); background: rgba(7,10,18,0.25); border-radius:16px; padding:12px}
.widget .big{font-size:24px; margin-top:8px}
@media (max-width: 760px){
  .grid{grid-template-columns:1fr}
  .span2{grid-column: span 1;}
  .big{font-size:30px}
  .bannerWrap{height: 160px;}
  #featuredList.list{max-height:none; overflow:visible;}
  .rewardsGrid{grid-template-columns: 1fr;}
  .rewardImg{max-height:160px;}
  .widgetsGrid{grid-template-columns: 1fr;}
}
