:root{
  --bg0:#070913;
  --bg1:#0b1022;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.04);
  --text:#eef0ff;
  --muted:#a8b0c7;
  --border: rgba(255,255,255,.10);
  --shadow: 0 14px 40px rgba(0,0,0,.35);
  --shadow2: 0 10px 28px rgba(0,0,0,.28);
  --accent:#7c5cff;
  --accent2:#2fe3c0;
  --warn:#ff6b6b;
  --radius:18px;
  --radius2:14px;
  --container: 1060px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  letter-spacing: -0.01em;
  background:
    radial-gradient(900px 520px at 12% 10%, rgba(124,92,255,.22), transparent 60%),
    radial-gradient(800px 520px at 85% 0%, rgba(47,227,192,.12), transparent 60%),
    radial-gradient(900px 600px at 70% 110%, rgba(124,92,255,.12), transparent 62%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

a{color:inherit}

.container{max-width:var(--container); margin:0 auto; padding:0 18px}

.muted{color:var(--muted)}

/* Topbar */
.topbar{
  position:sticky;
  top:0;
  z-index:10;
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(7,9,19,.76), rgba(7,9,19,.40));
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar__inner{display:flex; align-items:center; justify-content:space-between; padding:14px 0}

.brand{display:flex; gap:10px; align-items:center; text-decoration:none}
.brand__mark{
  width:36px; height:36px; border-radius:12px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, rgba(124,92,255,.9), rgba(47,227,192,.65));
  box-shadow: 0 10px 30px rgba(124,92,255,.22);
  font-weight:900;
}
.brand__text{display:flex; flex-direction:column; line-height:1}
.brand__name{font-weight:900; letter-spacing:-0.03em}
.brand__sub{font-size:12px; color:var(--muted); margin-top:3px}

.pill{
  font-size:12px;
  color: rgba(238,240,255,.86);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  padding:7px 10px;
  border-radius:999px;
}

/* Hero */
.hero{padding:28px 0 14px}
.hero__inner{display:grid; grid-template-columns: 1.25fr .75fr; gap:18px; align-items:stretch}

@media (max-width: 920px){
  .hero__inner{grid-template-columns: 1fr;}
}

.hero__copy{
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow: var(--shadow);
  padding: 18px;
  position:relative;
  overflow:hidden;
}
.hero__copy::before{
  content:"";
  position:absolute;
  inset:-1px;
  background:
    radial-gradient(520px 200px at 18% 0%, rgba(124,92,255,.22), transparent 65%),
    radial-gradient(520px 220px at 95% 20%, rgba(47,227,192,.10), transparent 65%);
  pointer-events:none;
}
.hero__copy > *{position:relative}

.hero__title{margin:0; font-size:44px; line-height:1.05; letter-spacing:-0.04em}
@media (max-width:520px){.hero__title{font-size:34px}}

.gradient{
  background: linear-gradient(90deg, rgba(124,92,255,1), rgba(47,227,192,1));
  -webkit-background-clip:text;
  background-clip:text;
  color: transparent;
}

.hero__desc{margin:12px 0 0; color:rgba(238,240,255,.82); line-height:1.6}

.controls{margin-top:16px; display:grid; gap:12px}

.search{
  display:flex;
  gap:10px;
  align-items:center;
  padding:12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.20);
}
.search__icon{opacity:.85}
.search input{
  width:100%;
  border:0;
  outline:0;
  background:transparent;
  color:var(--text);
  font-size:14px;
}
.search input::placeholder{color:rgba(168,176,199,.85)}

.chips{display:flex; gap:8px; flex-wrap:wrap}

.sort{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.sort__label{font-size:12px}
.sort__select{
  appearance:none;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.20);
  color: rgba(238,240,255,.92);
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 12px;
  outline: none;
}
.sort__select:focus{border-color: rgba(124,92,255,.55)}

.chip{
  appearance:none;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: rgba(238,240,255,.88);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}
.chip:hover{transform: translateY(-1px); border-color: rgba(124,92,255,.50)}
.chip.is-active{background: rgba(124,92,255,.18); border-color: rgba(124,92,255,.55)}

.hero__meta{display:flex; gap:10px; flex-wrap:wrap; align-items:center}
.meta{font-size:12px; color:rgba(168,176,199,.92)}

/* Hero art */
.hero__art{
  border-radius: var(--radius);
  position:relative;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  box-shadow: var(--shadow2);
  min-height: 220px;
}
.orb{position:absolute; filter: blur(0px); border-radius: 999px; opacity: .95}
.orb--a{width:220px; height:220px; left:-60px; top:-70px; background: radial-gradient(circle at 30% 30%, rgba(124,92,255,1), rgba(124,92,255,0))}
.orb--b{width:260px; height:260px; right:-90px; top:-120px; background: radial-gradient(circle at 30% 30%, rgba(47,227,192,.95), rgba(47,227,192,0))}
.orb--c{width:240px; height:240px; right:-60px; bottom:-90px; background: radial-gradient(circle at 30% 30%, rgba(124,92,255,.65), rgba(124,92,255,0))}

.glass{
  position:absolute;
  left:14px; right:14px; bottom:14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  backdrop-filter: blur(10px);
  padding: 12px;
}
.glass__title{font-weight:800; letter-spacing:-0.02em}
.glass__row{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px}
.glass__hint{margin-top:10px; font-size:12px; color:rgba(168,176,199,.92); line-height:1.5}

/* Section */
.section{padding: 12px 0}
.section__head{display:flex; align-items:flex-end; justify-content:space-between; gap:10px; padding: 0 2px}
.section__title{margin:0; font-size:18px; letter-spacing:-0.02em}
.section__sub{font-size:12px}

.grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 12px}

.game{
  display:block;
  text-decoration:none;
  border-radius: var(--radius2);
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow: 0 8px 22px rgba(0,0,0,.24);
  overflow:hidden;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.game:hover{transform: translateY(-2px); border-color: rgba(124,92,255,.50); box-shadow: 0 16px 34px rgba(0,0,0,.30)}

.game__inner{padding: 14px}
.game__top{display:flex; gap:10px; align-items:flex-start; justify-content:space-between}
.game__head{display:flex; gap:12px; align-items:flex-start}
.game__thumb{
  width:46px;
  height:46px;
  border-radius: 16px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border: 1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(24px 24px at 22% 20%, hsla(var(--h2), 92%, 70%, .95), transparent 70%),
    radial-gradient(44px 44px at 70% 85%, hsla(var(--h1), 92%, 64%, .85), transparent 72%),
    linear-gradient(180deg, rgba(0,0,0,.20), rgba(0,0,0,.06));
  box-shadow: 0 12px 24px rgba(0,0,0,.28);
}
.game__thumbText{font-weight:1000; letter-spacing:-0.03em; opacity:.95}
.game__title{font-weight:900; letter-spacing:-0.02em}
.game__tagline{margin-top:8px; line-height:1.55}
.game__footer{margin-top:12px; display:flex; gap:8px; flex-wrap:wrap; align-items:center}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  color: rgba(238,240,255,.88);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.20);
}

/* Buttons */
.btn{
  appearance:none;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(238,240,255,.92);
  padding: 10px 12px;
  border-radius: 14px;
  cursor:pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}
.btn:hover{transform: translateY(-1px); border-color: rgba(124,92,255,.55)}

/* Info card */
.card{
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow: var(--shadow2);
  padding: 16px;
}
.card__kicker{font-size:12px; color:rgba(168,176,199,.92)}
.card__title{margin-top:8px; font-weight:900; letter-spacing:-0.02em}

/* Empty */
.empty{margin-top:14px; text-align:center; padding: 18px; border: 1px dashed rgba(255,255,255,.14); border-radius: var(--radius)}
.empty__icon{font-size:24px}
.empty__title{margin-top:8px; font-weight:900}
.empty__desc{margin-top:6px}

/* Footer */
.footer{margin-top: 18px; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.08)}
.footer__inner{display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; font-size:12px}

/* Game page header */
.header{
  position:sticky;
  top:0;
  z-index:10;
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(7,9,19,.76), rgba(7,9,19,.40));
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 14px 0;
  margin-bottom: 18px;
}

/* Shared helper for game pages */
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

@media (prefers-reduced-motion: reduce){
  .chip,.btn,.game{transition:none}
  .game:hover{transform:none}
}
