/* KirioTV – Pixel-Nachthimmel & Lava (passend zum Logo) */
:root {
  --sky-0: #060b1c;
  --sky-1: #0b1430;
  --sky-2: #1c2c56;
  --panel: rgba(10, 16, 38, 0.82);
  --panel-2: rgba(22, 32, 66, 0.9);
  --line: #2a3d72;
  --lava-red: #f03412;
  --lava: #fa7a14;
  --gold: #ffc43c;
  --text: #eef1fb;
  --soft: #c3cbe6;
  --muted: #8a96bd;
  --tiktok: #fe2c55;
  --twitch: #9146ff;
  --youtube: #ff0000;
  --discord: #5865f2;
  --ok: #2ecc71;
  --px: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--text);
  background: var(--sky-0);
  overflow-x: hidden;
}
html { background: var(--sky-0); }
a { color: var(--gold); }
img { image-rendering: auto; }
.pixel { font-family: "Press Start 2P", monospace; letter-spacing: 1px; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* Sterne + Lava */
#sky { position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: linear-gradient(180deg, var(--sky-0) 0%, var(--sky-1) 45%, var(--sky-2) 100%); }
#sky i { position: absolute; display: block; background: #fff; animation: twinkle 3s infinite steps(2); }
#sky i.g { background: var(--gold); }
#sky i.b { background: #c8d7ff; }
@keyframes twinkle { 50% { opacity: .35; } }
#lava {
  position: fixed; left: 0; right: 0; bottom: 0; height: 160px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 120%, rgba(240,52,18,.55), rgba(250,122,20,.18) 45%, transparent 70%);
}

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(6, 11, 28, .78); backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--lava-red);
  box-shadow: 0 3px 0 var(--gold);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-size: 14px; }
.brand-logo { width: 40px; height: 40px; border: 3px solid var(--lava-red); outline: 2px solid var(--gold); background: var(--sky-1); }
.nav-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav-links a[data-link] { color: var(--soft); text-decoration: none; font-weight: 600; font-size: 14px; }
.nav-links a[data-link].active, .nav-links a[data-link]:hover { color: var(--gold); }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--soft); }
.user-chip img { width: 28px; height: 28px; border: 2px solid var(--lava); }
.user-chip button { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; }

/* Buttons im Pixel-Look */
.btn {
  --c: var(--lava-red);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border: 0; cursor: pointer; text-decoration: none;
  font-family: "Press Start 2P", monospace; font-size: 12px; color: #fff; line-height: 1.4;
  background: var(--c);
  box-shadow: inset -4px -4px 0 rgba(0,0,0,.35), inset 4px 4px 0 rgba(255,255,255,.25), 0 6px 0 rgba(0,0,0,.45);
  transition: transform .08s, filter .15s;
}
.btn:hover { filter: brightness(1.12); transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: inset -4px -4px 0 rgba(0,0,0,.35), inset 4px 4px 0 rgba(255,255,255,.2); }
.btn-sm { padding: 10px 14px; font-size: 10px; }
.btn-discord { --c: var(--discord); }
.btn-gold { --c: var(--gold); color: #3a1800; }
.btn-ghost { --c: var(--panel-2); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Layout */
main { width: min(1120px, 100% - 32px); margin: 0 auto; padding: 32px 0 80px; }
section { margin-top: 56px; }
.section-title { font-family: "Press Start 2P", monospace; font-size: clamp(14px, 2.4vw, 18px); color: var(--gold);
  margin: 0 0 20px; text-shadow: 3px 3px 0 #000; }

.card {
  background: var(--panel);
  border: 3px solid var(--line);
  box-shadow: 6px 6px 0 rgba(0,0,0,.45);
  padding: 20px;
}
.card.lava { border-color: var(--lava-red); box-shadow: 6px 6px 0 rgba(0,0,0,.45), inset 0 0 0 2px var(--gold); }

/* Hero */
.hero { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 48px); align-items: center; margin-top: 16px; }
.hero-logo {
  width: clamp(140px, 22vw, 230px); aspect-ratio: 1; display: block;
  border: 8px solid var(--lava-red); outline: 4px solid var(--gold); outline-offset: -12px;
  box-shadow: 10px 10px 0 rgba(0,0,0,.5), 0 0 60px rgba(250,122,20,.35);
  background: var(--sky-1);
}
.hero h1 {
  font-family: "Press Start 2P", monospace; margin: 0 0 14px;
  font-size: clamp(28px, 6vw, 64px); line-height: 1.15;
  background: linear-gradient(180deg, var(--gold) 0%, var(--lava) 45%, var(--lava-red) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(5px 5px 0 #000);
}
.hero p { margin: 0 0 22px; color: var(--soft); font-size: clamp(15px, 1.8vw, 18px); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.live-badge {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px;
  padding: 8px 12px; background: #e61e32; font-family: "Press Start 2P", monospace; font-size: 11px;
  box-shadow: 4px 4px 0 #000;
}
.live-badge::before { content: ""; width: 10px; height: 10px; background: #fff; animation: blink 1s infinite steps(2); }
.offline-badge { display: inline-block; margin-bottom: 16px; padding: 8px 12px; background: var(--panel-2);
  font-family: "Press Start 2P", monospace; font-size: 10px; color: var(--muted); box-shadow: 4px 4px 0 #000; }
@keyframes blink { 50% { opacity: 0; } }

/* Socials */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.social {
  --c: var(--lava);
  position: relative; display: flex; flex-direction: column; gap: 10px;
  text-decoration: none; color: var(--text); border-color: var(--c);
  transition: transform .1s;
}
.social:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 rgba(0,0,0,.5); }
.social .top { display: flex; align-items: center; justify-content: space-between; }
.social .name { font-family: "Press Start 2P", monospace; font-size: 13px; color: var(--c); }
.social .handle { font-weight: 700; font-size: 18px; }
.social .cta { color: var(--soft); font-size: 14px; }
.social.tiktok { --c: var(--tiktok); }
.social.twitch { --c: var(--twitch); }
.social.youtube { --c: var(--youtube); }
.tag-live { font-family: "Press Start 2P", monospace; font-size: 9px; padding: 6px 8px; background: #e61e32; color: #fff; }
.tag-off { font-family: "Press Start 2P", monospace; font-size: 9px; padding: 6px 8px; background: var(--panel-2); color: var(--muted); }
.icon { width: 34px; height: 34px; }

/* Stats */
.stat { text-align: center; }
.stat .num { font-family: "Press Start 2P", monospace; font-size: clamp(18px, 3vw, 26px); color: var(--gold); text-shadow: 3px 3px 0 #000; }
.stat .lbl { margin-top: 10px; color: var(--soft); font-size: 14px; }

/* Discord-CTA */
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  background: linear-gradient(90deg, rgba(88,101,242,.25), rgba(10,16,38,.85)); border-color: var(--discord); }
.cta-band h3 { margin: 0 0 6px; font-family: "Press Start 2P", monospace; font-size: 14px; color: #fff; }
.cta-band p { margin: 0; color: var(--soft); }

/* Giveaways */
.gw { display: flex; flex-direction: column; gap: 10px; }
.gw .btn { align-self: flex-start; margin-top: 6px; }
.gw .prize { font-weight: 800; font-size: 18px; }
.gw .meta { color: var(--soft); font-size: 14px; display: flex; flex-wrap: wrap; gap: 14px; }
.countdown { font-family: "Press Start 2P", monospace; font-size: 12px; color: var(--gold); }

/* Leaderboard */
.lb { list-style: none; margin: 0; padding: 0; }
.lb li { display: grid; grid-template-columns: 44px 44px 1fr auto; align-items: center; gap: 14px;
  padding: 10px 6px; border-bottom: 2px dashed rgba(255,255,255,.07); }
.lb li:last-child { border-bottom: 0; }
.lb .pos { font-family: "Press Start 2P", monospace; font-size: 12px; color: var(--muted); text-align: center; }
.lb li:nth-child(1) .pos { color: var(--gold); }
.lb li:nth-child(2) .pos { color: #d7dbe8; }
.lb li:nth-child(3) .pos { color: #e09a5a; }
.lb img { width: 40px; height: 40px; border: 2px solid var(--lava); background: var(--sky-1); }
.lb .uname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb .lvl { font-family: "Press Start 2P", monospace; font-size: 10px; color: var(--lava); text-align: right; }
.lb .xp { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* Tickets */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-family: "Press Start 2P", monospace; font-size: clamp(16px, 3vw, 24px); color: var(--gold); text-shadow: 3px 3px 0 #000; }
.tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.tabs button { background: var(--panel-2); color: var(--soft); border: 2px solid var(--line); padding: 8px 12px; cursor: pointer; font: 600 13px "Poppins"; }
.tabs button.on { border-color: var(--lava); color: #fff; background: rgba(240,52,18,.25); }
.tlist { display: flex; flex-direction: column; gap: 12px; }
.trow { display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: center; cursor: pointer; text-decoration: none; color: inherit; }
.trow:hover { border-color: var(--lava); }
.trow .temoji { font-size: 28px; text-align: center; }
.trow .ttitle { font-weight: 700; }
.trow .tmeta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.status { font-family: "Press Start 2P", monospace; font-size: 9px; padding: 7px 9px; white-space: nowrap; }
.status.open { background: var(--ok); color: #062b14; }
.status.closed { background: var(--panel-2); color: var(--muted); }

.chat { display: flex; flex-direction: column; gap: 4px; max-height: 62vh; overflow-y: auto; padding-right: 6px; }
.msg { display: grid; grid-template-columns: 42px 1fr; gap: 12px; padding: 10px 8px; }
.msg:hover { background: rgba(255,255,255,.03); }
.msg img.av { width: 40px; height: 40px; border: 2px solid var(--line); }
.msg.team img.av { border-color: var(--lava); }
.msg .who { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.msg .who b { font-weight: 700; }
.msg .badge { font-family: "Press Start 2P", monospace; font-size: 8px; padding: 4px 6px; background: var(--lava-red); }
.msg .badge.bot { background: var(--discord); }
.msg .badge.web { background: var(--twitch); }
.msg .time { color: var(--muted); font-size: 12px; }
.msg .text { white-space: pre-wrap; word-wrap: break-word; color: var(--soft); margin-top: 2px; }
.msg .emb { margin-top: 8px; padding: 10px 12px; background: rgba(0,0,0,.25); border-left: 4px solid var(--lava); }
.msg .emb b { color: #fff; }
.msg .att a { display: inline-block; margin-top: 6px; font-size: 13px; }
.msg.pending { opacity: .6; }
.reply { display: flex; gap: 12px; margin-top: 16px; align-items: flex-end; }
.reply textarea {
  flex: 1; min-height: 52px; max-height: 200px; resize: vertical; padding: 12px; font: 15px "Poppins";
  background: rgba(0,0,0,.35); color: var(--text); border: 3px solid var(--line); outline: none;
}
.reply textarea:focus { border-color: var(--lava); }
.ticket-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.ticket-info div { background: rgba(0,0,0,.25); padding: 10px 12px; }
.ticket-info span { display: block; color: var(--muted); font-size: 12px; }
.answers { margin-bottom: 18px; }
.answers dt { color: var(--gold); font-weight: 600; font-size: 13px; margin-top: 8px; }
.answers dd { margin: 4px 0 0; color: var(--soft); white-space: pre-wrap; }

.empty { text-align: center; padding: 48px 20px; color: var(--soft); }
.empty .big { font-size: 46px; margin-bottom: 12px; }
.login-card { max-width: 520px; margin: 40px auto; text-align: center; }
.login-card h2 { font-family: "Press Start 2P", monospace; font-size: 16px; color: var(--gold); }
.notice { margin-bottom: 18px; padding: 12px 16px; border-left: 4px solid var(--gold); background: rgba(255,196,60,.08); color: var(--soft); }
.err { border-left-color: var(--lava-red); background: rgba(240,52,18,.12); }

.footer { position: relative; margin-top: 40px; padding: 24px clamp(16px, 4vw, 48px) 40px; background: rgba(6,11,28,.85); border-top: 3px solid var(--lava-red); }
.footer-inner { width: min(1120px, 100%); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.footer a { color: var(--soft); margin-right: 14px; text-decoration: none; }
.footer a:hover { color: var(--gold); }

.skeleton { height: 120px; background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.08), rgba(255,255,255,.03)); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .nav { flex-direction: column; align-items: flex-start; }
  .nav-links { gap: 12px; }
  .trow { grid-template-columns: 36px 1fr; }
  .trow .status { grid-column: 2; justify-self: start; }
  .lb li { grid-template-columns: 34px 40px 1fr; }
  .lb .lvl { grid-column: 3; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
