/* ===== Just-Creators Wrapped – Season 2 ===== */

:root {
  --bg: #0b0e14;
  --text: #e8ecf1;
  --muted: #8b93a3;
  --green: #55c655;
  --brand: #f5d63a;
  --brand-light: #fae878;
  --brand-dark: #cfae1f;
  --purple: #b24bf3;
  --red: #ff5c5c;
  --panel: #151920;
  --panel-border: #000;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
}

.pixel { font-family: 'Silkscreen', monospace; font-weight: 700; line-height: 1.3; }

.mc-panel {
  background: var(--panel);
  border: 2px solid var(--panel-border);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.07), inset -2px -2px 0 rgba(0,0,0,.5);
}

/* ===== Hintergrund ===== */
.bg { position: fixed; inset: 0; z-index: -1; background: radial-gradient(ellipse at 50% 0%, #131822 0%, var(--bg) 65%); }
.bg-layer { position: absolute; inset: -10%; }
.bg-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%); }

.star {
  position: absolute; background: #fff;
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: .12; } 50% { opacity: .6; } }

.cube {
  position: absolute; opacity: .08;
  animation: floaty linear infinite;
  image-rendering: pixelated;
}
@keyframes floaty {
  from { transform: translateY(110vh); }
  to   { transform: translateY(-20vh); }
}

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ===== Login ===== */
.login { min-height: 100svh; display: grid; place-items: center; padding: 24px; }
.login-box {
  width: min(400px, 100%);
  text-align: center;
  animation: cardIn .8s cubic-bezier(.2, .9, .3, 1.1) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(26px); } }

.logo-h1 { margin: 0; }
.logo-img {
  width: min(360px, 92%);
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .5));
}
.outro-logo { width: min(340px, 90%); margin-bottom: 26px; }
.logo-sub {
  margin-top: 14px;
  letter-spacing: .5em;
  text-indent: .5em;
  font-size: 18px;
  color: var(--brand);
  font-family: 'Silkscreen', monospace;
  font-weight: 700;
  text-shadow: 2px 2px 0 #000;
}
.login-lead { margin-top: 24px; font-size: 13px; color: var(--muted); font-weight: 600; }

#loginForm { margin-top: 28px; display: grid; gap: 12px; }
#loginForm input {
  background: #000;
  border: 2px solid #4a5163;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  padding: 14px;
  outline: none;
  transition: border-color .15s;
}
#loginForm input::placeholder { color: #59627a; font-weight: 600; }
#loginForm input:focus { border-color: var(--brand); }
#codeInput { letter-spacing: .45em; text-indent: .45em; font-family: 'Silkscreen', monospace; font-weight: 700; font-size: 16px; }

/* Minecraft-Button */
.mc-btn {
  margin-top: 6px;
  font-family: 'Silkscreen', monospace;
  font-weight: 700;
  font-size: 15px;
  color: #2b2205;
  background: linear-gradient(var(--brand-light) 0%, var(--brand) 45%, var(--brand-dark) 100%);
  border: 2px solid #000;
  box-shadow: inset -3px -4px 0 rgba(0,0,0,.22), inset 3px 3px 0 rgba(255,255,255,.35);
  padding: 14px 18px;
  cursor: pointer;
  transition: filter .15s, transform .1s;
}
.mc-btn:hover { filter: brightness(1.08); }
.mc-btn:active { transform: translateY(2px); box-shadow: inset -2px -2px 0 rgba(0,0,0,.22), inset 2px 2px 0 rgba(255,255,255,.3); }
.mc-btn:disabled { filter: grayscale(.6) brightness(.8); cursor: wait; }

.login-error { color: var(--red); font-size: 13px; min-height: 18px; }
.login-hint { margin-top: 24px; font-size: 12px; color: var(--muted); }

.legal { margin-top: 18px; display: flex; gap: 10px; justify-content: center; align-items: center; font-size: 12px; }
.legal a { color: var(--muted); text-decoration: none; }
.legal a:hover { color: var(--brand); text-decoration: underline; }
.legal span { color: #3a4356; }

/* ===== Wrapped-Slides ===== */
.slide {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 48px 24px;
  position: relative;
}
.slide-inner { text-align: center; max-width: 820px; width: 100%; }

.anim {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .3, 1);
}
.slide.active .anim { opacity: 1; transform: none; }
.slide.active .anim:nth-child(1) { transition-delay: .05s; }
.slide.active .anim:nth-child(2) { transition-delay: .2s; }
.slide.active .anim:nth-child(3) { transition-delay: .38s; }
.slide.active .anim:nth-child(4) { transition-delay: .56s; }
.slide.active .anim:nth-child(5) { transition-delay: .74s; }

.kicker {
  font-family: 'Silkscreen', monospace;
  font-weight: 700;
  font-size: 14px;
  color: var(--brand);
  letter-spacing: .25em;
  margin-bottom: 30px;
  text-shadow: 2px 2px 0 #000;
}
.big { font-size: clamp(26px, 5.5vw, 46px); text-shadow: 3px 3px 0 #000; }
.huge { font-size: clamp(42px, 10vw, 96px); color: #fff; text-shadow: 4px 4px 0 #000; }
.huge .unit { font-size: .3em; margin-left: 12px; color: var(--brand); }

.slide-label {
  margin-top: 24px;
  font-size: clamp(15px, 2.2vw, 18px);
  color: var(--muted);
  font-weight: 600;
}
.outro-sign { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* Info-Karten */
.statgrid { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.statcard {
  min-width: 170px;
  flex: 0 1 auto;
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 20px 24px;
  background: var(--panel);
  border: 2px solid var(--panel-border);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.07), inset -2px -2px 0 rgba(0,0,0,.5);
}
.statnum { font-family: 'Silkscreen', monospace; font-weight: 700; font-size: 19px; color: #fff; line-height: 1.3; text-shadow: 2px 2px 0 #000; }
.statlabel { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }

.rankcard .statnum { color: var(--brand); }
.rankcard.top3 { background: #241f0d; }
.rankcard.top3 .statnum { color: var(--brand-light); }

/* Herzen */
.hearts { display: flex; gap: 6px; justify-content: center; margin-bottom: 26px; flex-wrap: wrap; }
.heart { width: 26px; height: 26px; animation: heartbeat 1.6s ease-in-out infinite; }
.heart svg { width: 100%; height: 100%; image-rendering: pixelated; }
.heart:nth-child(odd) { animation-delay: .35s; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.18); } 24% { transform: scale(1); } }

/* XP-Bar */
.xpbar {
  width: min(440px, 90%);
  height: 20px;
  margin: 34px auto 0;
  background: #101318;
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,.6), 0 0 0 2px #3a4356;
}
.xpfill {
  height: 100%; width: 0%;
  background: repeating-linear-gradient(90deg, #7fe63a 0 10px, #62c62d 10px 20px);
  transition: width 1.6s cubic-bezier(.2, .8, .2, 1) .5s;
}

/* Top-10-Bestenliste */
.lb-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.lb-tab {
  font-family: 'Silkscreen', monospace;
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
  background: var(--panel);
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.07), inset -2px -2px 0 rgba(0,0,0,.5);
  padding: 9px 14px;
  cursor: pointer;
  transition: color .15s;
}
.lb-tab:hover { color: var(--text); }
.lb-tab.active {
  color: #2b2205;
  background: linear-gradient(var(--brand-light), var(--brand));
  box-shadow: inset -2px -2px 0 rgba(0,0,0,.25), inset 2px 2px 0 rgba(255,255,255,.35);
}
.lb-list {
  list-style: none;
  margin: 26px auto 0;
  max-width: 560px;
  display: grid;
  gap: 6px;
}
.lb-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 16px;
  background: var(--panel);
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.07), inset -2px -2px 0 rgba(0,0,0,.5);
  text-align: left;
  animation: lbIn .45s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes lbIn { from { opacity: 0; transform: translateY(14px); } }
.lb-row.me { background: #241f0d; }
.lb-row.me .lb-name { color: var(--brand); }
.lb-rank {
  font-family: 'Silkscreen', monospace;
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
  width: 36px;
  flex-shrink: 0;
  text-shadow: 1px 1px 0 #000;
}
.lb-row:nth-child(1) .lb-rank { color: var(--brand); }
.lb-row:nth-child(2) .lb-rank { color: #c9d1dd; }
.lb-row:nth-child(3) .lb-rank { color: #cd8a4f; }
.lb-head { width: 28px; height: 28px; image-rendering: pixelated; flex-shrink: 0; }
.lb-name { font-size: 14px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-value { font-family: 'Silkscreen', monospace; font-weight: 700; font-size: 13px; color: var(--brand); flex-shrink: 0; text-shadow: 1px 1px 0 #000; }

/* Skin-Viewer */
.skin-wrap { margin: 12px auto 0; display: grid; place-items: center; }
#skinCanvas { max-width: 100%; }

/* Fortschritt + Scroll-Hinweis */
.progressbar { position: fixed; top: 0; left: 0; right: 0; height: 4px; background: rgba(255,255,255,.06); z-index: 10; }
.progress-fill { height: 100%; width: 0%; background: var(--brand); }
.scroll-hint {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 4px;
  color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  z-index: 10; transition: opacity .5s;
}
.scroll-hint .arrow { animation: bob 1.4s ease-in-out infinite; color: var(--brand); }
.scroll-hint.hidden { opacity: 0; pointer-events: none; }

/* Rechtstexte (Impressum / Datenschutz) */
.legal-page { max-width: 760px; margin: 0 auto; padding: 48px 24px 80px; }
.legal-back {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600;
  margin-bottom: 28px;
}
.legal-back:hover { color: var(--brand); }
.legal-page .legal-logo { width: 220px; height: auto; display: block; margin-bottom: 30px; }
.legal-page h1 {
  font-family: 'Silkscreen', monospace; font-weight: 700;
  font-size: clamp(22px, 5vw, 32px); color: var(--brand);
  text-shadow: 3px 3px 0 #000; margin-bottom: 6px;
}
.legal-page .legal-date { color: var(--muted); font-size: 13px; margin-bottom: 30px; }
.legal-page h2 {
  font-size: 18px; color: #fff; margin: 34px 0 10px;
  padding-bottom: 6px; border-bottom: 2px solid #222835;
}
.legal-page h3 { font-size: 15px; color: var(--brand-light); margin: 22px 0 8px; }
.legal-page p { color: #c4ccd8; line-height: 1.7; margin: 10px 0; font-size: 15px; }
.legal-page ul { margin: 10px 0 10px 22px; color: #c4ccd8; line-height: 1.7; font-size: 15px; }
.legal-page li { margin: 4px 0; }
.legal-page a { color: var(--brand); text-decoration: none; }
.legal-page a:hover { text-decoration: underline; }
.legal-page address { font-style: normal; color: #c4ccd8; line-height: 1.7; font-size: 15px; margin: 8px 0; }

@media (max-width: 560px) {
  .statgrid { gap: 10px; }
  .statcard { min-width: 0; flex: 1 1 44%; padding: 16px 12px; }
  .statnum { font-size: 15px; }
  .logo-sub { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .anim, .xpfill { transition: none; }
  .cube, .heart, .scroll-hint .arrow { animation: none; }
}
