/* TrizyWizyTTV Adventskalender – Farben zentral hier anpassen */
:root {
  --bg: #07130d;
  --bg-2: #0c1f15;
  --surface: #11291c;
  --surface-2: #163524;
  --line: #22492f;
  --green: #3ddc84;
  --green-2: #20a35a;
  --green-glow: rgba(61, 220, 132, .35);
  --gold: #f4c95d;
  --gold-2: #c9962a;
  --text: #e9f7ee;
  --muted: #9cbfa8;
  --radius: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(61,220,132,.16), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(32,163,90,.12), transparent 60%),
    var(--bg);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

#snow { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
header, main, footer { position: relative; z-index: 1; }

a { color: var(--green); }
code { background: var(--surface-2); padding: .1em .4em; border-radius: 6px; font-size: .92em; }
.accent { color: var(--green); }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px max(16px, calc((100vw - 1100px) / 2));
  background: rgba(7, 19, 13, .78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.1rem; }
.logo {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #04120a; font-weight: 900; letter-spacing: -.5px;
  box-shadow: 0 0 18px var(--green-glow);
}
.brand img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: .95rem; }
.nav a:hover { color: var(--text); background: var(--surface); }
@media (max-width: 720px) { .nav { display: none; } }

/* Hero */
.hero { max-width: 1100px; margin: 0 auto; padding: 72px 16px 40px; text-align: center; }
.eyebrow { color: var(--green); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; margin: 0 0 12px; }
.hero h1 { font-size: clamp(2.3rem, 7vw, 4.4rem); line-height: 1.05; margin: 0 0 18px; letter-spacing: -.02em; }
.lead { color: var(--muted); font-size: 1.12rem; max-width: 620px; margin: 0 auto 28px; }
.countdown {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 14px 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  margin-bottom: 28px;
}
.countdown-label { color: var(--muted); font-size: .85rem; }
.countdown-time { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--green); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn { display: inline-block; padding: 12px 22px; border-radius: 12px; font-weight: 700; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--green); color: #04120a; box-shadow: 0 6px 24px var(--green-glow); }
.btn-ghost { color: var(--text); border: 1px solid var(--line); background: var(--surface); }

/* Sections */
.section { max-width: 1100px; margin: 0 auto; padding: 48px 16px; }
.section h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 6px; }
.section-sub { color: var(--muted); margin: 0 0 24px; }
.badge-big { color: #2a1d00; background: var(--gold); padding: 1px 8px; border-radius: 6px; font-weight: 700; font-size: .85em; }
.note { color: var(--muted); font-size: .9rem; margin-top: 18px; }

/* Calendar */
.calendar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
@media (max-width: 900px) { .calendar { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) { .calendar { grid-template-columns: repeat(3, 1fr); gap: 10px; } }

.door {
  position: relative; aspect-ratio: 1 / 1.08;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  color: var(--text); font: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  overflow: hidden;
}
.door::before { /* Schleife */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent 46%, rgba(61,220,132,.13) 46% 54%, transparent 54%),
    linear-gradient(0deg, transparent 46%, rgba(61,220,132,.13) 46% 54%, transparent 54%);
  pointer-events: none;
}
.door-num { font-size: clamp(1.6rem, 4.5vw, 2.4rem); font-weight: 900; position: relative; }
.door-sub { font-size: .75rem; color: var(--muted); position: relative; }
.door.big { border-color: var(--gold-2); background: linear-gradient(160deg, #3a2e0e, #241c08); }
.door.big::before {
  background:
    linear-gradient(90deg, transparent 46%, rgba(244,201,93,.2) 46% 54%, transparent 54%),
    linear-gradient(0deg, transparent 46%, rgba(244,201,93,.2) 46% 54%, transparent 54%);
}
.door.big .door-num { color: var(--gold); }

.door.locked { cursor: not-allowed; }
.door.locked .door-num { opacity: .55; }
.door.available { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 0 26px var(--green-glow); animation: pulse 2.4s ease-in-out infinite; }
.door.big.available { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 26px rgba(244,201,93,.35); }
.door.available:hover, .door.opened:hover { transform: translateY(-4px) rotate(-1deg); }
.door.opened { background: linear-gradient(160deg, #0f3a24, #0b2a1a); }
.door.opened::before { opacity: .25; }
.door.shake { animation: shake .4s; }
@keyframes pulse { 50% { box-shadow: 0 0 0 1px var(--green), 0 0 40px var(--green-glow); } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .door, .door.available { animation: none; transition: none; } }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin: 0 0 10px; }
.card ul { margin: 0; padding-left: 18px; color: var(--muted); }
.card li { margin-bottom: 6px; }
.card li b { color: var(--text); }
.prize-tag { display: inline-block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--green); margin-bottom: 6px; }
.prize p { color: var(--muted); margin: 0; }
.prize-main { border-color: var(--gold-2); background: linear-gradient(160deg, #2e250c, var(--surface)); }
.prize-main .prize-tag { color: var(--gold); }

/* Leaderboard */
.leaderboard { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; max-width: 620px; }
.leaderboard li {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px;
}
.lb-rank { font-weight: 900; color: var(--muted); text-align: center; }
.leaderboard li:nth-child(1) .lb-rank { color: var(--gold); }
.leaderboard li:nth-child(2) .lb-rank { color: #d6dde3; }
.leaderboard li:nth-child(3) .lb-rank { color: #d39a62; }
.lb-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-points { font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; }

/* Minecraft */
.mc {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.mc-label { margin: 0 0 6px; color: var(--muted); font-size: .9rem; }
.mc-ip {
  display: inline-flex; align-items: center; gap: 12px; font: inherit; cursor: pointer;
  font-size: clamp(1.1rem, 4vw, 1.5rem); font-weight: 800; color: var(--text);
  background: var(--bg-2); border: 1px dashed var(--green-2); border-radius: 12px; padding: 10px 16px;
  max-width: 100%;
}
.mc-ip:hover { border-style: solid; }
.copy-hint { font-size: .8rem; color: var(--green); font-weight: 600; }
.mc-meta { color: var(--muted); margin: 8px 0 0; font-size: .9rem; }
.mc-status { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #6b7f72; flex: none; }
.mc-status.online .dot { background: var(--green); box-shadow: 0 0 10px var(--green); }

/* Dialog */
.door-dialog {
  border: 1px solid var(--line); border-radius: 20px; padding: 0;
  background: var(--bg-2); color: var(--text);
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
}
.door-dialog::backdrop { background: rgba(2, 8, 5, .72); backdrop-filter: blur(3px); }
.dialog-inner { padding: 28px; position: relative; }
.dialog-close {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px;
  border: 0; border-radius: 10px; background: var(--surface); color: var(--text); font-size: 1.4rem; cursor: pointer;
}
.dialog-day { margin: 0; color: var(--green); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; }
.dialog-inner h3 { font-size: 1.6rem; margin: 6px 0 12px; padding-right: 36px; }
#dialog-body p { color: var(--muted); }
#dialog-body .media { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 12px; background: var(--surface); }
.code-box { margin-top: 18px; text-align: center; background: var(--surface); border: 1px dashed var(--green-2); border-radius: 14px; padding: 16px; }
.code-label { margin: 0; color: var(--muted); font-size: .85rem; }
.code { margin: 4px 0; font-size: 1.7rem; font-weight: 900; letter-spacing: .1em; color: var(--green); font-family: ui-monospace, Consolas, monospace; }
.code-hint { margin: 0; font-size: .85rem; color: var(--muted); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  padding: 12px 18px; border-radius: 12px; z-index: 50; transition: .25s; pointer-events: none;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Footer */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 16px 40px; text-align: center; color: var(--muted); font-size: .9rem; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin-bottom: 10px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--green); }

/* Rechtsseiten */
.legal { max-width: 760px; margin: 0 auto; padding: 48px 16px; }
.legal h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.legal h2 { font-size: 1.2rem; margin-top: 28px; }
.legal p, .legal li { color: var(--muted); }
.legal .todo { background: rgba(244,201,93,.15); color: var(--gold); padding: 0 4px; border-radius: 4px; }
.legal .warn { border: 1px solid var(--gold-2); background: rgba(244,201,93,.08); border-radius: 12px; padding: 12px 16px; color: var(--gold); }
