/* FinalClaus - Weihnachtsdesign */
:root {
  --bg: #0b1426;
  --bg2: #101d36;
  --card: rgba(20, 34, 62, 0.82);
  --card-line: rgba(159, 232, 255, 0.14);
  --text: #eaf4ff;
  --muted: #9fb3cc;
  --red: #e8423f;
  --red-dark: #a3191f;
  --green: #3fbf5f;
  --green-dark: #1f6b3a;
  --gold: #f2c14e;
  --ice: #9fe8ff;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(ellipse at top, #1b2f57 0%, var(--bg) 55%) fixed, var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}
#snow { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.wrap { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 0 16px 60px; }

/* Kopf */
header {
  position: relative; z-index: 2;
  background: linear-gradient(180deg, rgba(10, 18, 34, 0.95), rgba(10, 18, 34, 0.6));
  border-bottom: 1px solid var(--card-line);
  backdrop-filter: blur(6px);
}
.garland { height: 14px; background:
  radial-gradient(circle at 10px 4px, var(--red) 4px, transparent 5px) 0 0 / 40px 14px repeat-x,
  radial-gradient(circle at 30px 6px, var(--gold) 4px, transparent 5px) 0 0 / 40px 14px repeat-x,
  radial-gradient(circle at 20px 9px, var(--green) 4px, transparent 5px) 0 0 / 40px 14px repeat-x;
  animation: twinkle 2.4s infinite alternate; opacity: .9; }
@keyframes twinkle { from { filter: brightness(.8); } to { filter: brightness(1.35); } }
.head-inner { max-width: 1180px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.logo { font-family: "Mountains of Christmas", "Nunito", serif; font-weight: 700; font-size: 34px; letter-spacing: .5px;
  background: linear-gradient(90deg, var(--red), #fff 50%, var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-decoration: none; white-space: nowrap; }
.logo small { display: block; font-family: "Nunito", sans-serif; font-size: 12px; letter-spacing: 3px; color: var(--ice); -webkit-text-fill-color: var(--ice); text-transform: uppercase; }
nav { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; font-weight: 700; padding: 9px 16px; border-radius: 999px; border: 1px solid transparent; transition: .2s; }
nav a:hover { color: var(--text); border-color: var(--card-line); }
nav a.active { color: #fff; background: linear-gradient(135deg, var(--red), var(--red-dark)); box-shadow: 0 4px 18px rgba(232, 66, 63, .35); }

/* Hero */
.hero { text-align: center; padding: 44px 0 26px; }
.hero h1 { font-family: "Mountains of Christmas", serif; font-size: clamp(36px, 6vw, 60px); margin: 0; color: #fff;
  text-shadow: 0 0 22px rgba(159, 232, 255, .35); }
.hero p { color: var(--muted); margin: 8px 0 0; font-size: 17px; }
.countdown { display: inline-flex; gap: 10px; margin-top: 18px; align-items: center; padding: 10px 20px; border-radius: 999px;
  background: rgba(242, 193, 78, .12); border: 1px solid rgba(242, 193, 78, .35); color: var(--gold); font-weight: 800; }

/* Server-Adresse zum Kopieren */
.address { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 22px;
  padding: 10px 10px 10px 18px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid var(--card-line); }
.address[hidden], .opening[hidden] { display: none; }
.address .lbl { color: var(--muted); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.address .lbl svg.ico { width: 18px; height: 18px; color: var(--ice); }
.address code { font-size: 20px; padding: 6px 14px; background: rgba(242, 193, 78, .14); }
.address button { font: inherit; font-weight: 800; color: #fff; cursor: pointer; border: 0; border-radius: 12px; padding: 10px 16px;
  display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, var(--green), var(--green-dark)); transition: .2s; }
.address button:hover { filter: brightness(1.15); }
.address button.done { background: linear-gradient(135deg, var(--gold), #b8891f); color: #3b2a00; }
.address button svg.ico { width: 18px; height: 18px; }
.opening { margin: 18px auto 0; max-width: 560px; padding: 16px 20px; border-radius: 16px; color: var(--text);
  background: rgba(159, 232, 255, .08); border: 1px solid rgba(159, 232, 255, .3); font-size: 17px; }
.opening svg.ico { width: 20px; height: 20px; color: var(--ice); vertical-align: -4px; margin-right: 6px; }
.opening .clock { display: flex; justify-content: center; gap: 12px; margin-top: 12px; }
.opening .clock span { min-width: 74px; padding: 10px 6px; border-radius: 12px; background: rgba(0,0,0,.25); color: var(--muted); font-size: 13px; }
.opening .clock b { display: block; font-size: 30px; color: #fff; font-weight: 900; }

/* Karten */
.section-title { display: flex; align-items: center; gap: 10px; font-family: "Mountains of Christmas", serif; font-size: 30px; margin: 34px 0 14px; }
.section-title .pill { font-family: "Nunito", sans-serif; font-size: 14px; font-weight: 800; padding: 4px 12px; border-radius: 999px;
  background: rgba(63, 191, 95, .16); color: var(--green); border: 1px solid rgba(63, 191, 95, .4); }
.card { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25); position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: repeating-linear-gradient(90deg, var(--red) 0 14px, #fff 14px 28px); opacity: .85; }

/* Online */
.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.player { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--card-line); min-width: 0; }
.player > div { min-width: 0; }
.player .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player img { width: 40px; height: 40px; border-radius: 8px; image-rendering: pixelated; box-shadow: 0 0 0 2px rgba(255,255,255,.08); }
.player .n { font-weight: 800; }
.player .s { font-size: 13px; color: var(--muted); }
.tag { font-weight: 800; margin-right: 4px; }
.empty { color: var(--muted); text-align: center; padding: 18px; }

/* Ranglisten */
.boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.board h3 { margin: 6px 0 12px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.board h3 .ico { font-size: 22px; }
.board ol { list-style: none; margin: 0; padding: 0; }
.board li { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px dashed rgba(159, 232, 255, .1); font-size: 15px; }
.board li:last-child { border-bottom: 0; }
.board .r { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px;
  background: rgba(255,255,255,.07); color: var(--muted); flex: none; }
.board li:nth-child(1) .r { background: var(--gold); color: #3b2a00; }
.board li:nth-child(2) .r { background: #d7dde6; color: #2a2f38; }
.board li:nth-child(3) .r { background: #cd7f32; color: #2e1a05; }
.board li img { width: 22px; height: 22px; border-radius: 4px; image-rendering: pixelated; }
.board .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .v { font-weight: 800; color: var(--ice); white-space: nowrap; }
.updated { color: var(--muted); font-size: 13px; text-align: right; margin-top: 10px; }

/* Guide */
.guide details { background: var(--card); border: 1px solid var(--card-line); border-radius: 14px; margin-bottom: 10px; overflow: hidden; }
.guide summary { cursor: pointer; list-style: none; padding: 16px 18px; font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 12px; }
.guide summary::-webkit-details-marker { display: none; }
.guide summary .ico { font-size: 24px; width: 32px; text-align: center; }
.guide summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2.5px solid var(--ice); border-bottom: 2.5px solid var(--ice);
  transform: rotate(45deg) translate(-3px, -3px); transition: transform .3s; }
.guide details[open] summary::after { transform: rotate(225deg); border-color: var(--gold); }
.guide summary .ico { width: 26px; height: 26px; color: var(--red); flex: none; }
.guide details:nth-child(even) summary .ico { color: var(--green); }
.guide details[open] summary { border-bottom: 1px solid var(--card-line); background: rgba(232, 66, 63, .08); }
.guide .body { padding: 14px 20px 18px; color: #d7e6f7; line-height: 1.6; }
.guide .body p { margin: 6px 0; }
.cmds { display: grid; gap: 8px; margin-top: 10px; }
.cmd { display: grid; grid-template-columns: minmax(150px, max-content) 1fr; gap: 12px; align-items: baseline; }
code { font-family: "JetBrains Mono", Consolas, monospace; background: rgba(242, 193, 78, .12); color: var(--gold); padding: 2px 8px; border-radius: 6px; font-size: 14px; white-space: nowrap; }

/* Performance */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { text-align: center; }
.stat .big { font-size: 34px; font-weight: 900; }
.stat .lbl { color: var(--muted); font-size: 14px; }
.status { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; font-weight: 800; }
.status.ok { background: rgba(63, 191, 95, .15); color: var(--green); border: 1px solid rgba(63, 191, 95, .4); }
.status.warn { background: rgba(242, 193, 78, .14); color: var(--gold); border: 1px solid rgba(242, 193, 78, .4); }
.status.bad { background: rgba(232, 66, 63, .15); color: var(--red); border: 1px solid rgba(232, 66, 63, .4); }
.tabs { display: inline-flex; gap: 6px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--card-line); }
.tabs button { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 800; padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.tabs button.active { background: var(--green-dark); color: #fff; }
.chart { width: 100%; height: 220px; display: block; }
.chart .grid line { stroke: rgba(159, 232, 255, .1); }
.chart text { fill: var(--muted); font-size: 11px; font-family: "Nunito", sans-serif; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-top: 8px; }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--c); }
.lags li { padding: 6px 0; border-bottom: 1px dashed rgba(159, 232, 255, .1); }
/* Performance: Kacheln + getrennte Diagramme */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.tile { display: flex; align-items: center; gap: 14px; padding: 18px; }
.tile > svg.ico { width: 34px; height: 34px; flex: none; color: var(--green); }
.tile.warn > svg.ico { color: var(--gold); }
.tile.bad > svg.ico { color: var(--red); }
.tile .lbl { color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.tile .big { font-size: 28px; font-weight: 900; line-height: 1.15; }
.tile.ok .big { color: #fff; } .tile.warn .big { color: var(--gold); } .tile.bad .big { color: var(--red); }
.tile .sub { color: var(--muted); font-size: 13px; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); gap: 16px; margin-top: 18px; }
.charts .wide { grid-column: 1 / -1; }
.chart-card { padding-bottom: 12px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 10px; }
.chart-head h3 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.chart-head h3 svg.ico { width: 22px; height: 22px; color: var(--c); }
.mini { display: flex; gap: 14px; }
.mini span { text-align: right; }
.mini small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; }
.mini b { font-size: 16px; }
.perf .chart { height: 190px; }
.lags { list-style: none; margin: 0; padding: 0; }
.lags li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chip { font-size: 12px; font-weight: 900; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; }
.chip.warn { background: rgba(242,193,78,.16); color: var(--gold); }
.chip.bad { background: rgba(232,66,63,.18); color: var(--red); }
.muted { color: var(--muted); }
.explain { margin-top: 18px; color: #d7e6f7; line-height: 1.6; }
.explain h3 { margin: 4px 0 8px; display: flex; align-items: center; gap: 10px; }
.explain h3 svg.ico { width: 22px; height: 22px; color: var(--gold); }
.explain p { margin: 6px 0; }
@media (max-width: 640px) { .charts { grid-template-columns: 1fr; } }

footer { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 0 10px; }
.demo-badge { position: fixed; right: 14px; bottom: 14px; z-index: 5; background: var(--gold); color: #3b2a00; font-weight: 900; padding: 6px 12px; border-radius: 999px; font-size: 13px; }

/* Icons (Linien-SVG) */
svg.ico { width: 1em; height: 1em; vertical-align: -0.15em; flex: none; }
.logo .logo-ico { width: 30px; height: 30px; color: var(--ice); margin-right: 8px; vertical-align: -4px; filter: drop-shadow(0 0 6px rgba(159,232,255,.5)); }
nav a svg.ico { width: 17px; height: 17px; margin-right: 7px; vertical-align: -3px; }
.section-title svg.ico { width: 30px; height: 30px; color: var(--gold); }
.board h3 svg.ico { width: 24px; height: 24px; color: var(--ice); }
.boards .board:nth-child(3n+1) h3 svg.ico { color: var(--red); }
.boards .board:nth-child(3n+2) h3 svg.ico { color: var(--green); }
.countdown svg.ico { width: 18px; height: 18px; }
.player .s svg.ico { width: 13px; height: 13px; vertical-align: -2px; }
.status svg.ico { width: 20px; height: 20px; }
.lags svg.ico { color: var(--ice); vertical-align: -3px; }

@media (max-width: 640px) {
  .logo { font-size: 28px; }
  nav { margin-left: 0; }
  .cmd { grid-template-columns: 1fr; gap: 2px; }
}
