/* HABIBI BATTLES — underground championship UI */
:root {
  --bg: #050507;
  --bg-2: #0c0b12;
  --panel: #111019;
  --panel-2: #17151f;
  --line: #262335;
  --text: #f4f2ff;
  --muted: #9a96ad;
  --purple: #a43cff;
  --purple-2: #7b1fff;
  --purple-glow: rgba(164, 60, 255, .55);
  --green: #39ff88;
  --green-2: #1fe06c;
  --green-glow: rgba(57, 255, 136, .5);
  --red: #ff3b5c;
  --amber: #ffc53d;
  --radius: 14px;
  --display: 'Anton', 'Cairo', Impact, 'Arial Narrow', sans-serif;
  --body: 'Space Grotesk', 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --maxw: 1240px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
html[lang="ar"] { --display: 'Cairo', 'Anton', sans-serif; --body: 'Cairo', system-ui, sans-serif; }
html[lang="ar"] .display, html[lang="ar"] h1, html[lang="ar"] h2 { font-weight: 900; letter-spacing: 0 !important; }

* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); font-family: var(--body); -webkit-font-smoothing: antialiased; }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(123, 31, 255, .18), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(57, 255, 136, .07), transparent 60%),
    var(--bg);
}
body::before { /* film grain */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main { flex: 1; outline: none; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip: auto; inset-inline-start: 1rem; top: 1rem; z-index: 999; background: var(--green); color: #000; padding: .5rem 1rem; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(14px, 3vw, 28px); }
.display { font-family: var(--display); text-transform: uppercase; letter-spacing: .01em; line-height: .95; }
h1, h2, h3 { margin: 0 0 .5em; }
h1 { font-family: var(--display); text-transform: uppercase; font-size: clamp(2.2rem, 6vw, 4.4rem); line-height: .92; font-weight: 400; }
h2 { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.5rem, 3.4vw, 2.3rem); font-weight: 400; letter-spacing: .01em; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { line-height: 1.55; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.green { color: var(--green); }
.purple { color: var(--purple); }
.section { padding: clamp(28px, 5vw, 56px) 0; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.stack > * + * { margin-top: 12px; }
.hidden { display: none !important; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); background: rgba(5, 5, 7, .78); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand .word { font-family: 'Anton', sans-serif; font-size: 1.35rem; letter-spacing: .04em; line-height: 1; }
.brand .word b { color: var(--green); font-weight: 400; }
.nav { display: flex; gap: 4px; margin-inline-start: 12px; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: .95rem; transition: color .2s, background .2s; }
.nav a:hover, .nav a.active { color: var(--text); background: var(--panel-2); }
.topbar .end { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg, var(--purple), var(--green)); display: inline-grid; place-items: center; font-weight: 700; color: #000; flex: none; overflow: hidden; }
.avatar.lg { width: 120px; height: 120px; font-size: 2.6rem; }
.avatar.md { width: 56px; height: 56px; font-size: 1.3rem; }
.btn.menu-btn { display: none; }
.lang-btn { font-family: 'Cairo', var(--body); font-weight: 700; }

@media (max-width: 860px) {
  .nav { position: fixed; inset: 64px 0 auto 0; flex-direction: column; background: rgba(5, 5, 7, .97); padding: 12px; margin: 0; border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform .3s var(--ease); }
  .nav.open { transform: none; }
  .nav a { padding: 14px; font-size: 1.1rem; }
  .btn.menu-btn { display: inline-flex; }
}

/* ---------- Buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  padding: 10px 16px; border-radius: 999px; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .15s var(--ease), box-shadow .2s, background .2s, border-color .2s; white-space: nowrap; font-size: .95rem; }
.btn:hover { border-color: #3a3550; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--purple); border-color: var(--purple); box-shadow: 0 0 0 0 var(--purple-glow); }
.btn.primary:hover { box-shadow: 0 0 28px var(--purple-glow); }
.btn.go { background: var(--green); border-color: var(--green); color: #031b0c; }
.btn.go:hover { box-shadow: 0 0 28px var(--green-glow); }
.btn.danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 12px; font-size: .85rem; }
.btn.lg { padding: 15px 26px; font-size: 1.08rem; }
.btn.icon { width: 40px; height: 40px; padding: 0; }
.btn.block { width: 100%; }
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.input, select, textarea { width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; transition: border-color .2s, box-shadow .2s; }
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(164, 60, 255, .2); }
textarea { min-height: 96px; resize: vertical; }
.field { margin-bottom: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: .92rem; }
.check input { margin-top: 3px; accent-color: var(--green); }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* ---------- Cards & chips ---------- */
.card { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: relative; }
.card.link { text-decoration: none; display: block; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.card.link:hover { transform: translateY(-3px); border-color: #3b2f5c; box-shadow: 0 18px 40px -20px var(--purple-glow); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: .78rem; color: var(--muted); background: var(--bg-2); text-transform: capitalize; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--panel-2); border: 1px solid var(--line); }
.pill.live { background: var(--red); border-color: var(--red); color: #fff; }
.pill.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
.pill.voting { background: var(--green); border-color: var(--green); color: #031b0c; }
.pill.upcoming { color: var(--purple); border-color: rgba(164, 60, 255, .5); }
.pill.ended { color: var(--muted); }
@keyframes blink { 50% { opacity: .25; } }
.notice { overflow-wrap: anywhere; border: 1px dashed #3a3550; border-radius: 12px; padding: 12px 14px; color: var(--muted); font-size: .9rem; background: rgba(164, 60, 255, .05); }
.notice.warn { border-color: rgba(255, 197, 61, .5); background: rgba(255, 197, 61, .06); color: #ffe3a3; }
.notice strong { color: var(--text); }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.kbd { font-family: ui-monospace, monospace; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .82em; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 8vw, 96px) 0 clamp(36px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(3rem, 11vw, 8.5rem); margin: 0; }
.hero h1 .l2 { display: block; color: transparent; -webkit-text-stroke: 2px var(--green); text-shadow: 0 0 40px var(--green-glow); }
html[lang="ar"] .hero h1 .l2 { -webkit-text-stroke: 0; color: var(--green); }
.hero .slogan { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.1rem, 2.6vw, 1.7rem); margin: 18px 0 26px; letter-spacing: .04em; }
.hero .slogan span { color: var(--purple); }
.hero .slogan span:last-child { color: var(--green); }
.hero .eq { position: absolute; inset-inline-end: -40px; bottom: 0; height: 70%; width: min(56vw, 620px); opacity: .45; pointer-events: none; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.stats-strip { display: flex; gap: clamp(18px, 5vw, 56px); margin-top: 36px; flex-wrap: wrap; }
.stats-strip div { font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.6rem); }
.stats-strip small { display: block; font-family: var(--body); font-size: .75rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }

/* decorative equalizer (CSS animation only — not data) */
.eqbars { display: flex; align-items: flex-end; gap: 6px; height: 100%; }
.eqbars i { flex: 1; height: 100%; background: linear-gradient(180deg, var(--green), var(--purple)); border-radius: 3px 3px 0 0; animation: eq 1.4s ease-in-out infinite; transform-origin: bottom; }
@keyframes eq { 0%, 100% { transform: scaleY(.2); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .eqbars i, .pill.live::before { animation: none; } }

/* ---------- Battle cards ---------- */
.bcard .vsrow { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin: 14px 0; }
.bcard .vsrow.multi { grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); }
.bcard .dj { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.bcard .dj .name { font-weight: 700; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.bcard .vs { font-family: 'Anton', sans-serif; font-size: 1.6rem; color: var(--purple); text-shadow: 0 0 18px var(--purple-glow); }
.bcard .title { font-weight: 700; font-size: 1.05rem; }
.bcard.is-live { border-color: rgba(255, 59, 92, .5); box-shadow: 0 0 0 1px rgba(255, 59, 92, .25), 0 20px 50px -25px rgba(255, 59, 92, .6); }
.winner-crown { color: var(--amber); font-size: .8rem; font-weight: 700; }

/* ---------- Arena ---------- */
.arena-head { padding: 18px 0 10px; }
.arena-head h1 { font-size: clamp(1.7rem, 4.5vw, 3rem); margin: 8px 0 0; }
.arena { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 1020px) { .arena { grid-template-columns: minmax(0, 1fr); } }
.stage { position: relative; background: #000; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.tiles-wrap { position: relative; }
.tiles { display: grid; gap: 2px; background: var(--line); grid-template-columns: 1fr 1fr; }
.tiles.n3 { grid-template-columns: repeat(3, 1fr); }
.tiles.n4 { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .tiles.n3 { grid-template-columns: 1fr 1fr; } .tiles.n3 .tile:last-child { grid-column: span 2; } }
.tile { position: relative; aspect-ratio: 16 / 10; background: radial-gradient(circle at 50% 40%, #16121f, #050507); overflow: hidden; transition: box-shadow .4s var(--ease); }
.tiles.n2 .tile { aspect-ratio: 4 / 5; }
@media (min-width: 700px) { .tiles.n2 .tile { aspect-ratio: 16 / 12; } }
.tile .video { position: absolute; inset: 0; }
.tile .video video { object-fit: cover !important; }
.tile .placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 12px; color: var(--muted); }
.tile .placeholder .avatar { width: clamp(64px, 12vw, 110px); height: clamp(64px, 12vw, 110px); font-size: 2rem; margin: 0 auto 10px; opacity: .9; }
.tile .label { position: absolute; inset-inline: 0; bottom: 0; padding: 30px 12px 10px; background: linear-gradient(0deg, rgba(0, 0, 0, .85), transparent); display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.tile .label .who { min-width: 0; }
.tile .label .nm { font-family: var(--display); text-transform: uppercase; font-size: clamp(1rem, 2.4vw, 1.5rem); line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .label .sub { font-size: .75rem; color: var(--muted); margin-top: 4px; }
.tile .ondeck { position: absolute; top: 10px; inset-inline-start: 10px; opacity: 0; transform: translateY(-6px); transition: all .35s var(--ease); }
.tile.active { box-shadow: inset 0 0 0 3px var(--green), inset 0 0 60px rgba(57, 255, 136, .25); z-index: 1; }
.tile.active .ondeck { opacity: 1; transform: none; }
.tile .flags { position: absolute; top: 10px; inset-inline-end: 10px; display: flex; gap: 6px; }
.tile.dimmed .video { filter: saturate(.7) brightness(.75); }
.meter { display: flex; align-items: flex-end; gap: 2px; height: 26px; flex: none; }
.meter i { width: 4px; background: var(--green); border-radius: 2px; height: 8%; transition: height .08s linear; }
.tile:not(.active) .meter i { background: var(--purple); }
.vs-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; font-family: 'Anton', sans-serif; font-size: clamp(1.4rem, 4vw, 2.6rem); width: clamp(52px, 9vw, 84px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; background: #000; border: 2px solid var(--purple); box-shadow: 0 0 30px var(--purple-glow); pointer-events: none; }
.enter-overlay { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(5, 5, 7, .72); backdrop-filter: blur(6px); text-align: center; padding: 20px; }
.timerbar { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; background: var(--panel); border-top: 1px solid var(--line); }
.timerbar .clock { font-family: 'Anton', sans-serif; font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1; font-variant-numeric: tabular-nums; min-width: 4ch; }
.timerbar .clock.warn { color: var(--red); animation: blink .8s infinite; }
.progress { height: 6px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--purple), var(--green)); width: 0; transition: width .25s linear; }
.turninfo { font-size: .85rem; color: var(--muted); margin-bottom: 6px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.turninfo b { color: var(--text); }
.reaction-bar { display: flex; gap: 6px; justify-content: center; padding: 10px; border-top: 1px solid var(--line); background: var(--bg-2); flex-wrap: wrap; }
.reaction-bar button { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; width: 46px; height: 42px; font-size: 1.25rem; cursor: pointer; transition: transform .12s; }
.reaction-bar button:active { transform: scale(.88); }
.floaters { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 4; }
.floaters span { position: absolute; bottom: 60px; font-size: 1.8rem; animation: floatup 2.4s var(--ease) forwards; }
@keyframes floatup { from { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(-320px) scale(1.2); opacity: 0; } }

.side { display: flex; flex-direction: column; gap: 14px; }
.vote-panel .opts { display: grid; gap: 10px; }
.vote-btn { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; text-align: start; transition: all .2s var(--ease); width: 100%; }
.vote-btn:hover:not(:disabled) { border-color: var(--green); box-shadow: 0 0 22px -6px var(--green-glow); }
.vote-btn.chosen { border-color: var(--green); background: rgba(57, 255, 136, .08); }
.vote-btn .nm { font-weight: 700; }
.result-row { margin: 10px 0; }
.result-row .bar { height: 34px; border-radius: 10px; background: var(--bg-2); overflow: hidden; position: relative; }
.result-row .bar i { position: absolute; inset-block: 0; inset-inline-start: 0; background: linear-gradient(90deg, var(--purple-2), var(--purple)); width: 0; transition: width 1.6s var(--ease); }
.result-row.win .bar i { background: linear-gradient(90deg, var(--green-2), var(--green)); box-shadow: 0 0 24px var(--green-glow); }
.result-row .bar span { position: relative; z-index: 1; display: flex; justify-content: space-between; padding: 0 12px; line-height: 34px; font-weight: 700; }
.result-row.win .bar span { color: #031b0c; }
.champion { text-align: center; padding: 8px 0 4px; }
.champion .display { font-size: 2rem; color: var(--green); text-shadow: 0 0 30px var(--green-glow); animation: pop .8s var(--ease); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

.chat { display: flex; flex-direction: column; height: 440px; padding: 0; overflow: hidden; }
.chat header { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.chat .msgs { flex: 1; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.chat .msg { font-size: .9rem; line-height: 1.4; word-wrap: break-word; display: flex; gap: 6px; align-items: flex-start; }
.chat .msg .u { font-weight: 700; color: var(--purple); flex: none; }
.chat .msg .u.dj { color: var(--green); }
.chat .msg .u.admin { color: var(--amber); }
.chat .msg .del { margin-inline-start: auto; opacity: .5; background: none; border: none; cursor: pointer; color: var(--red); }
.chat form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
@media (max-width: 1020px) { .chat { height: 360px; } }

/* ---------- Profiles ---------- */
.profile-hero { display: grid; grid-template-columns: auto 1fr; gap: clamp(16px, 4vw, 36px); align-items: center; padding: 36px 0; }
@media (max-width: 600px) { .profile-hero { grid-template-columns: 1fr; text-align: center; } .profile-hero .row { justify-content: center; } .profile-hero .avatar { margin: 0 auto; } }
.profile-hero .avatar.lg { width: clamp(110px, 18vw, 170px); height: clamp(110px, 18vw, 170px); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--purple), 0 0 50px var(--purple-glow); }
.statbox { display: flex; gap: 26px; margin: 14px 0; flex-wrap: wrap; }
.statbox div { font-family: 'Anton', sans-serif; font-size: 2rem; line-height: 1; }
.statbox small { display: block; font-family: var(--body); font-size: .72rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-top: 4px; }
.social a { text-decoration: none; }

table.rank { width: 100%; border-collapse: collapse; }
table.rank th, table.rank td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: start; }
table.rank th { color: var(--muted); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; }
table.rank td.pos { font-family: 'Anton', sans-serif; font-size: 1.4rem; width: 52px; }
table.rank tr:nth-child(1) td.pos { color: var(--amber); }
table.rank tr:nth-child(2) td.pos { color: #d9d9e6; }
table.rank tr:nth-child(3) td.pos { color: #d28a52; }
table.rank a { text-decoration: none; display: flex; gap: 10px; align-items: center; font-weight: 700; }
.table-scroll { overflow-x: auto; }

/* ---------- Bracket ---------- */
.bracket { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 22px; overflow-x: auto; padding-bottom: 10px; }
.bracket .round { display: flex; flex-direction: column; justify-content: space-around; gap: 14px; }
.bracket .round h3 { color: var(--muted); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.match { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.match .side-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; font-size: .9rem; }
.match .side-row + .side-row { border-top: 1px solid var(--line); }
.match .side-row.won { background: rgba(57, 255, 136, .09); color: var(--green); font-weight: 700; }
.match .side-row.tbd { color: var(--muted); font-style: italic; }
.match footer { padding: 6px 12px; background: var(--bg-2); font-size: .78rem; display: flex; justify-content: space-between; gap: 6px; }

/* ---------- Admin ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: none; color: var(--muted); padding: 10px 14px; cursor: pointer; font-weight: 700; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--text); border-bottom-color: var(--green); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--purple); color: #fff; font-size: .72rem; margin-inline-start: 6px; }
.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.status-item { display: flex; gap: 10px; align-items: flex-start; }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--red); box-shadow: 0 0 10px var(--red); }
.dot.on { background: var(--green); box-shadow: 0 0 10px var(--green); }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list-row:last-child { border-bottom: none; }
.ctl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.ctl-grid .btn { white-space: normal; }
.chat .msg .del + .del { margin-inline-start: 4px; }
.copy-box { display: flex; gap: 8px; }
.copy-box input { font-family: ui-monospace, monospace; font-size: .8rem; }

/* ---------- Stage (DJ studio) ---------- */
.studio { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; } }
.preview { aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; position: relative; border: 1px solid var(--line); }
.preview.onair { box-shadow: 0 0 0 3px var(--red), 0 0 50px rgba(255, 59, 92, .35); }
.big-meter { display: flex; gap: 3px; height: 14px; }
.big-meter i { flex: 1; background: var(--panel-2); border-radius: 2px; }
.big-meter i.on { background: var(--green); }
.big-meter i.on.hot { background: var(--amber); }
.big-meter i.on.clip { background: var(--red); }
.your-turn { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.6rem, 5vw, 2.6rem); text-align: center; padding: 14px; border-radius: 14px; }
.your-turn.on { background: var(--green); color: #031b0c; box-shadow: 0 0 40px var(--green-glow); }
.your-turn.off { background: var(--panel-2); color: var(--muted); }

/* ---------- Footer / toasts ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .88rem; }
.footer .wrap { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer a { color: var(--muted); text-decoration: none; margin-inline-end: 14px; }
.footer a:hover { color: var(--text); }
.toasts { position: fixed; bottom: calc(16px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--panel-2); border: 1px solid var(--line); border-inline-start: 4px solid var(--green); padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); animation: pop .3s var(--ease); }
.toast.err { border-inline-start-color: var(--red); }

.page-enter { animation: enter .45s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.skeleton { background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 50%, var(--panel) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; min-height: 160px; }
@keyframes sk { to { background-position: -200% 0; } }

.login-box { max-width: 440px; margin: 40px auto; }
.provider { width: 100%; justify-content: flex-start; padding: 13px 16px; gap: 12px; white-space: normal; text-align: start; }
.provider svg { flex: none; }
.provider svg { width: 20px; height: 20px; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); z-index: 150; display: grid; place-items: center; padding: 16px; animation: enter .2s; }
.modal { width: min(560px, 100%); max-height: 90vh; overflow: auto; }
