:root {
  --bg: #0c0a14; --bg2: #151122; --panel: #1b1630; --line: #3a2f5c; --gold: #ffd100; --gold2: #f5b400;
  --text: #ece9f5; --muted: #a59fbd; --purple: #a970ff; --green: #46e66e; --red: #eb4646; --blue: #50a0ff;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 Inter, system-ui, sans-serif; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .brand { font-family: Cinzel, Georgia, serif; letter-spacing: .02em; }
h1 { font-size: clamp(30px, 6vw, 56px); margin: 0 0 8px; color: var(--gold); text-shadow: 0 0 24px rgba(255, 209, 0, .35); }
h2 { font-size: clamp(22px, 3.5vw, 32px); margin: 0 0 16px; color: var(--gold); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; background: rgba(12, 10, 20, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { font-size: 22px; color: var(--gold); display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; }
.nav { display: flex; gap: 16px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--text); font-weight: 600; }
.nav a.on { color: var(--gold); }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); margin-right: 6px; }

/* sections */
section { padding: 40px 0; }
.hero { padding: 48px 0 24px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.hero p { color: var(--muted); font-size: 18px; max-width: 560px; }
.hero .art { position: relative; }
.hero .art img { width: 100%; max-width: 420px; display: block; margin: 0 auto; filter: drop-shadow(0 0 40px rgba(169, 112, 255, .45)); }
.btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; font-weight: 700;
       border: 2px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; font-size: 15px; }
.btn:hover { text-decoration: none; border-color: var(--gold); }
.btn.gold { background: linear-gradient(180deg, var(--gold), var(--gold2)); color: #1a1200; border-color: var(--gold); }
.btn.twitch { background: #9146ff; border-color: #9146ff; color: #fff; }
.btn.yt { background: #e62117; border-color: #e62117; color: #fff; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* live */
.live { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.embed { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.chat { min-height: 360px; }

/* video grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.grid.shorts { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: block; color: var(--text); }
.card:hover { border-color: var(--gold); text-decoration: none; transform: translateY(-2px); transition: .15s; }
.card img { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; }
.grid.shorts .card img { aspect-ratio: 9/16; }
.card .t { padding: 10px 12px; font-weight: 600; font-size: 14px; line-height: 1.35; }

/* class tiles */
.classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.cls { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: var(--radius);
       background: var(--panel); border: 2px solid var(--line); color: var(--text); font-weight: 700; cursor: pointer; }
.cls img { width: 48px; height: 48px; border-radius: 10px; border: 2px solid #000; }
.cls:hover, .cls.on { border-color: var(--gold); text-decoration: none; }

/* builds */
.build { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px;
         background: var(--bg2); border: 1px solid var(--line); margin-bottom: 10px; }
.build .rank { font: 700 22px Cinzel, serif; color: var(--gold); text-align: center; }
.build .bar { height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--purple), var(--gold)); margin-top: 6px; }
.build .dps { font: 800 22px Inter; text-align: right; }
.build .acts { grid-column: 2 / 4; display: flex; gap: 10px; flex-wrap: wrap; }
.warn { border: 1px solid var(--red); background: rgba(235, 70, 70, .1); color: #ffd1d1; padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }

/* talent calculator */
.calc-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.calc-head .pts { font: 800 20px Inter; flex: 1 1 420px; }
.calc-btns { display: flex; gap: 10px; flex-wrap: nowrap; margin-left: auto; }
.calc-btns .btn { white-space: nowrap; }
#summary { margin-top: 26px; }
.sumtab { width: 100%; border-collapse: collapse; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sumtab th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.sumtab td { padding: 8px 12px; border-bottom: 1px solid #241d3d; vertical-align: middle; font-size: 14px; }
.sumtab tr:last-child td { border-bottom: 0; }
.sumtab img { width: 32px; height: 32px; border-radius: 6px; border: 1px solid #000; display: block; }
.sumtab .s-tree { color: var(--muted); white-space: nowrap; }
.sumtab .s-name { font-weight: 700; white-space: nowrap; }
.sumtab .s-rank { color: var(--gold); font-weight: 800; white-space: nowrap; }
@media (max-width: 860px) { .sumtab .s-tree, .sumtab th:first-child { display: none; } .sumtab .s-name { white-space: normal; } }
.trees { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tree { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.tree h3 { margin: 0 0 10px; display: flex; justify-content: space-between; color: var(--gold); font-size: 18px; }
.tgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; position: relative; }
.tal { position: relative; width: 100%; aspect-ratio: 1; max-width: 58px; justify-self: center; border-radius: 9px; border: 3px solid #555;
       background: #000; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.tal img { width: 100%; height: 100%; border-radius: 6px; display: block; filter: grayscale(1) brightness(.55); }
.tal.avail { border-color: var(--green); }
.tal.avail img { filter: none; }
.tal.some { border-color: var(--green); }
.tal.some img, .tal.maxed img { filter: none; }
.tal.maxed { border-color: var(--gold); }
.tal .r { position: absolute; right: -6px; bottom: -6px; background: #000; border: 1px solid #777; border-radius: 6px; padding: 0 5px;
          font: 800 12px Inter; color: var(--green); }
.tal.maxed .r { color: var(--gold); }
.tal.empty { visibility: hidden; }
.arrow { position: absolute; width: 4px; background: #666; z-index: 0; border-radius: 2px; }
.arrow.on { background: var(--gold); }
.tip { position: fixed; z-index: 50; max-width: 320px; background: #0b0918; border: 1px solid #777; border-radius: 8px; padding: 10px 12px;
       font-size: 14px; pointer-events: none; display: none; box-shadow: 0 8px 30px rgba(0, 0, 0, .6); }
.tip b { color: #fff; font-size: 15px; }
.tip .rk { color: var(--muted); font-size: 13px; }
.tip .d { color: var(--gold); margin-top: 6px; }
.tip .req { color: var(--red); margin-top: 6px; font-size: 13px; }
.mode { display: inline-flex; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.mode button { background: var(--panel); color: var(--text); border: 0; padding: 9px 14px; font-weight: 700; cursor: pointer; }
.mode button.on { background: var(--gold); color: #1a1200; }

.ad { display: none; }
.ad.on { display: block; margin: 28px auto; max-width: 970px; min-height: 100px; text-align: center; }
.ad-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }

.mini { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 340px; background: var(--panel); border: 2px solid #9146ff;
        border-radius: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); overflow: hidden; }
.mini-body { display: flex; gap: 10px; padding: 10px; align-items: center; }
.mini-body img { width: 128px; aspect-ratio: 16/9; border-radius: 8px; object-fit: cover; background: #000; }
.mini-txt { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.mini-txt span { color: var(--muted); font-size: 12px; }
.mini-txt .btn { padding: 7px 12px; font-size: 13px; margin-top: 4px; align-self: flex-start; }
.mini-x { position: absolute; top: 4px; right: 6px; z-index: 2; background: rgba(0, 0, 0, .5); color: #fff; border: 0; border-radius: 50%;
          width: 24px; height: 24px; cursor: pointer; font-size: 16px; line-height: 1; }
.mini.compact:not(.open) { width: auto; border-radius: 999px; }
.mini.compact:not(.open) .mini-body { padding: 6px 8px 6px 6px; }
.mini.compact:not(.open) .mini-body img, .mini.compact:not(.open) .mini-txt b, .mini.compact:not(.open) .mini-txt span { display: none; }
.mini.compact:not(.open) .mini-txt .btn { margin: 0; }
.mini.compact:not(.open) .mini-x { position: static; margin-left: 4px; }
.mini.compact:not(.open) { display: flex; align-items: center; flex-direction: row-reverse; }
.mini.open { width: 420px; }
.mini.open .mini-body { display: block; padding: 0; }
.mini.open iframe { display: block; width: 420px; height: 300px; border: 0; }
.mini-link { display: block; padding: 8px 12px; font-size: 13px; }
@media (max-width: 860px) {
  .mini { right: 8px; bottom: 8px; width: calc(100% - 16px); max-width: 360px; }
  .mini.open { width: calc(100% - 16px); max-width: 420px; }
  .mini.open iframe { width: 100%; height: auto; aspect-ratio: 4/3; min-height: 300px; }
}

.tlist { margin: 6px 0 16px; padding-left: 18px; }
.tlist li { margin: 6px 0; font-size: 14px; }
details.panel summary { cursor: pointer; }
.tdump h3 { color: var(--gold); margin: 14px 0 4px; }
a.cls { color: var(--text); }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }

@media (max-width: 860px) {
  .hero, .live { grid-template-columns: 1fr; }
  .trees { grid-template-columns: 1fr; }
  .nav { gap: 12px; font-size: 14px; }
  .top .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
}
