/* Spieleauswahl (Startseite) – nur fuer diese Seite, die Spiele haben ihr eigenes CSS */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { background: #eef0f6; color: #1d2433; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); min-height: 100vh; }
#hub { position: relative; z-index: 1; margin: 0 auto; padding: 18px 0 28px; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
h1 { text-align: center; font: 800 28px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: -.5px; margin: 14px 0 4px; }
h1 .heart { color: #ff6b8b; }
.sub { color: #6b7385; text-align: center; margin: 0 0 18px; }

/* Karussell */
body { overflow: hidden; overscroll-behavior: none; }
.carousel { position: relative; width: 100%; margin: 0 auto; }
.games { position: relative; height: 380px; perspective: 1100px; transform-style: preserve-3d; touch-action: pan-y;
  user-select: none; -webkit-user-select: none; cursor: grab; }
.games.dragging, .games.dragging * { cursor: grabbing !important; }
.slide { position: absolute; left: 50%; top: 50%; width: min(74vw, 340px); display: flex; justify-content: center;
}
/* Am PC groesser per zoom (wird neu gezeichnet, bleibt scharf – scale() wuerde unscharf machen) */
@media (min-width: 900px) { .slide { width: 442px; } .slide > .float { zoom: 1.3; } }
.slide a, .slide img { -webkit-user-drag: none; user-select: none; }
.slide > .float { width: 100%; display: flex; justify-content: center; }
.slide.active > .float { animation: floaty 3.4s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(.6deg); } }
.slide::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -34px; height: 18px; border-radius: 50%;
  background: rgba(29, 36, 51, .22); filter: blur(8px); opacity: 0; transition: opacity .3s; pointer-events: none; }
.slide.active::after { opacity: 1; animation: shadowy 3.4s ease-in-out infinite; }
@keyframes shadowy { 50% { transform: scale(.9); opacity: .7; } }
.slide:not(.active) a { pointer-events: auto; }
.slide:not(.active) a:hover { transform: none; }
.nav { position: absolute; top: 50%; z-index: 200; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%;
  border: 2.5px solid #1d2433; background: #fff; box-shadow: 4px 4px 0 #1d2433; cursor: pointer; display: grid; place-items: center;
  transition: transform .12s ease, box-shadow .12s ease; padding: 0; }
.nav svg { width: 26px; height: 26px; fill: none; stroke: #1d2433; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.nav:hover { transform: translateY(-2px) scale(1.05); }
.nav:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #1d2433; }
#prev { left: 28px; }
#next { right: 28px; }
.dots { display: flex; justify-content: center; gap: 9px; margin-top: 18px; position: relative; z-index: 2; }
.dot { width: 10px; height: 10px; padding: 0; border-radius: 99px; border: 2px solid #1d2433; background: transparent; cursor: pointer;
  transition: width .35s cubic-bezier(.3, 1.5, .5, 1), background-color .25s; }
.dot.on { width: 30px; background: #1d2433; }
@media (max-width: 640px) {
  .nav { display: none; }
  .games { height: 270px; }
}
@media (prefers-reduced-motion: reduce) { .slide.active > .float, .slide.active::after { animation: none; } }

/* Activity-Knopf */
.actbtn { position: relative; display: block; width: min(100%, 340px); padding: 34px 18px 30px; text-decoration: none;
  background: #fff6df radial-gradient(#e9dcbc 1.2px, transparent 1.3px) 0 0 / 14px 14px; color: #1d2433;
  border: 3px solid #1d2433; border-radius: 16px 22px 14px 20px; box-shadow: 7px 8px 0 #1d2433;
  transform: rotate(-2deg); cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.actbtn:hover { transform: rotate(-1deg) translateY(-2px); }
.actbtn:active { transform: rotate(-2deg) translate(5px, 6px); box-shadow: 2px 2px 0 #1d2433; }
.ab-word { display: flex; justify-content: center; gap: 1px; font: 900 46px/1 "Arial Black", "Segoe UI Black", system-ui, sans-serif; }
.ab-word span { display: inline-block; -webkit-text-stroke: 2px #1d2433; paint-order: stroke fill; text-shadow: 3px 3px 0 #1d2433; }
.ab-tape { position: absolute; top: -14px; left: 50%; width: 92px; height: 26px; margin-left: -46px; transform: rotate(3deg);
  background: rgba(255, 224, 140, .85); border-left: 2px dashed rgba(29,36,51,.25); border-right: 2px dashed rgba(29,36,51,.25); }
.ab-stk { position: absolute; width: 50px; height: 50px; border-radius: 50%; border: 3px solid #1d2433; display: grid; place-items: center; box-shadow: 3px 3px 0 #1d2433; color: #1d2433; }
.ab-stk svg { width: 30px; height: 30px; }
.s-draw { background: #ffd8a8; left: -16px; bottom: -20px; transform: rotate(-12deg); }
.s-mime { background: #d0bfff; right: -18px; top: -20px; transform: rotate(10deg); }
.s-explain { background: #96f2d7; right: 26px; bottom: -24px; transform: rotate(-6deg); width: 44px; height: 44px; }
.s-explain svg { width: 26px; height: 26px; }
@media (max-width: 360px) { .ab-word { font-size: 38px; } }

/* "Wer bin ich?"-Knopf: dunkle Karte, kraeftige Farben, harter babyblauer Schatten */
.wbibtn { display: block; width: min(100%, 340px); border-radius: 22px; line-height: 0; cursor: pointer;
  box-shadow: 7px 8px 0 #8fd3ff; transform: rotate(1.5deg); transition: transform .12s ease, box-shadow .12s ease; }
.wbibtn img { width: 100%; height: auto; display: block; }
.wbibtn:hover { transform: rotate(.5deg) translateY(-2px); }
.wbibtn:active { transform: rotate(1.5deg) translate(5px, 6px); box-shadow: 2px 2px 0 #8fd3ff; }

/* "Imposter unter uns"-Knopf: Geheimakte mit hartem dunkelbraunem Schatten */
.impbtn { display: block; width: min(100%, 340px); border-radius: 10px; line-height: 0; cursor: pointer;
  box-shadow: 7px 8px 0 #2b2118; transform: rotate(-1.5deg); transition: transform .12s ease, box-shadow .12s ease; }
.impbtn img { width: 100%; height: auto; display: block; }
.impbtn:hover { transform: rotate(-.5deg) translateY(-2px); }
.impbtn:active { transform: rotate(-1.5deg) translate(5px, 6px); box-shadow: 2px 2px 0 #2b2118; }

/* "Blindes Duo"-Knopf: Karopapier mit Augenbinde, harter roter Schatten */
.bdbtn { display: block; width: min(100%, 340px); border-radius: 18px; line-height: 0; cursor: pointer;
  box-shadow: 7px 8px 0 #ff5a36; transform: rotate(-1deg); transition: transform .12s ease, box-shadow .12s ease; }
.bdbtn img { width: 100%; height: auto; display: block; }
.bdbtn:hover { transform: rotate(0deg) translateY(-2px); }
.bdbtn:active { transform: rotate(-1deg) translate(5px, 6px); box-shadow: 2px 2px 0 #ff5a36; }

/* "Orakel"-Knopf: dunkle Karte mit Farbkarten-Faecher, harter cyanfarbener Schatten */
.okbtn { display: block; width: min(100%, 340px); border-radius: 20px; line-height: 0; cursor: pointer;
  box-shadow: 7px 8px 0 #3ee6ff; transform: rotate(1.5deg); transition: transform .12s ease, box-shadow .12s ease; }
.okbtn img { width: 100%; height: auto; display: block; }
.okbtn:hover { transform: rotate(.5deg) translateY(-2px); }
.okbtn:active { transform: rotate(1.5deg) translate(5px, 6px); box-shadow: 2px 2px 0 #3ee6ff; }

/* "Fuenferpasch"-Knopf: rote Karte mit fuenf Wuerfeln, harter dunkler Schatten */
.fpbtn { display: block; width: min(100%, 340px); border-radius: 20px; line-height: 0; cursor: pointer;
  box-shadow: 7px 8px 0 #1d1a2e; transform: rotate(-1.5deg); transition: transform .12s ease, box-shadow .12s ease; }
.fpbtn img { width: 100%; height: auto; display: block; }
.fpbtn:hover { transform: rotate(-.5deg) translateY(-2px); }
.fpbtn:active { transform: rotate(-1.5deg) translate(5px, 6px); box-shadow: 2px 2px 0 #1d1a2e; }

/* "Schiffe versenken"-Knopf: marineblaue Karte, harter wasserblauer Schatten */
.shbtn { display: block; width: min(100%, 340px); border-radius: 20px; line-height: 0; cursor: pointer;
  box-shadow: 7px 8px 0 #4aa3df; transform: rotate(1deg); transition: transform .12s ease, box-shadow .12s ease; }
.shbtn img { width: 100%; height: auto; display: block; }
.shbtn:hover { transform: rotate(0deg) translateY(-2px); }
.shbtn:active { transform: rotate(1deg) translate(5px, 6px); box-shadow: 2px 2px 0 #4aa3df; }

/* "Poker"-Knopf: gruener Spieltisch, harter roter Schatten */
.pkbtn { display: block; width: min(100%, 340px); border-radius: 20px; line-height: 0; cursor: pointer;
  box-shadow: 7px 8px 0 #d62839; transform: rotate(-1deg); transition: transform .12s ease, box-shadow .12s ease; }
.pkbtn img { width: 100%; height: auto; display: block; }
.pkbtn:hover { transform: rotate(0deg) translateY(-2px); }
.pkbtn:active { transform: rotate(-1deg) translate(5px, 6px); box-shadow: 2px 2px 0 #d62839; }

/* "Turmbau"-Knopf: Himmel mit Bauklotz-Turm, harter gelber Schatten */
.tbbtn { display: block; width: min(100%, 340px); border-radius: 20px; line-height: 0; cursor: pointer;
  box-shadow: 7px 8px 0 #ffc531; transform: rotate(-1deg); transition: transform .12s ease, box-shadow .12s ease; }
.tbbtn img { width: 100%; height: auto; display: block; }
.tbbtn:hover { transform: rotate(0deg) translateY(-2px); }
.tbbtn:active { transform: rotate(-1deg) translate(5px, 6px); box-shadow: 2px 2px 0 #ffc531; }


/* Hintergrund: Punktraster + schwebende Kritzel */
body { background: #eef0f6 radial-gradient(rgba(29, 36, 51, .13) 1.3px, transparent 1.5px) 0 0 / 22px 22px; }
#bgwrap { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

/* Titel */
h1.title { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; margin: 4px auto 10px; width: fit-content; line-height: 1; }
.t-small { font: italic 800 22px/1 system-ui, -apple-system, "Segoe UI", sans-serif; color: #fff; background: #ff6b8b;
  padding: 6px 14px 7px; border: 2.5px solid #1d2433; border-radius: 10px; box-shadow: 3px 3px 0 #1d2433;
  transform: rotate(-4deg) translateX(-30%); margin-bottom: 8px; position: relative; z-index: 1; }
.t-big { display: flex; font: 900 clamp(36px, 10vw, 76px)/1 "Arial Black", "Segoe UI Black", system-ui, sans-serif; letter-spacing: 1px; }
.t-big span { display: inline-block; color: #fff; -webkit-text-stroke: 2.5px #1d2433; paint-order: stroke fill;
  text-shadow: 4px 4px 0 #1d2433; animation: wave 3.2s ease-in-out calc(var(--i) * .09s) infinite; }
.t-big span:nth-child(5n+1) { color: #7c4dff; } .t-big span:nth-child(5n+2) { color: #ffd43b; } .t-big span:nth-child(5n+3) { color: #12b886; }
.t-big span:nth-child(5n+4) { color: #3e7bfa; } .t-big span:nth-child(5n) { color: #ff6b8b; }
@keyframes wave { 0%, 60%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-10px) rotate(-4deg); } }
.t-heart { position: absolute; right: -8px; top: -14px; font-size: 38px; color: #ff6b8b; -webkit-text-stroke: 2px #1d2433;
  animation: beat 1.3s ease-in-out infinite; }
@keyframes beat { 0%, 40%, 100% { transform: scale(1) rotate(12deg); } 15% { transform: scale(1.25) rotate(12deg); } }
@media (max-width: 640px) { .t-big { -webkit-text-stroke-width: 2px; } .t-big span { text-shadow: 3px 3px 0 #1d2433; } .t-small { font-size: 17px; } .t-heart { font-size: 28px; right: -4px; } }
@media (prefers-reduced-motion: reduce) { .t-big span, .t-heart { animation: none; } }

/* Nichts auf der Startseite markier- oder kopierbar */
body { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

/* Szenen-Ebenen: nur die aktive ist sichtbar (Ueberblendung) */
#bgwrap { transition: transform .4s ease-out; inset: -30px; }
#bgwrap .kscene-layer { opacity: 0; transition: opacity .6s ease; }
#bgwrap .kscene-layer.on { opacity: 1; }
#bgwrap .kscene-layer:not(.on) .kdd { animation-play-state: paused; }
body { transition: background-color .6s; }
body.dark .dot { border-color: #fff; }
body.dark .dot.on { background: #fff; }
body.dark .slide::after { background: rgba(0, 0, 0, .5); }

/* Runder Profil-/Einstellungen-Knopf ueber dem Titel */
.profilebtn { position: relative; z-index: 3; align-self: center; width: 108px; height: 108px; border-radius: 50%; margin: -18px auto 18px;
  background: #fff; border: 3px solid #1d2433; box-shadow: 5px 6px 0 #1d2433; display: grid; place-items: center; color: #1d2433;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; flex: none; }
.profilebtn:hover { transform: translateY(-3px) scale(1.04); }
.profilebtn:active { transform: translate(3px, 4px); box-shadow: 1px 1px 0 #1d2433; }
.pb-icon { width: 62px; height: 62px; fill: #1d2433; }
#bgwrap.instant .kscene-layer { transition: none; }
@media (max-width: 640px) { .profilebtn { width: 92px; height: 92px; margin: -10px auto 12px; } .pb-icon { width: 52px; height: 52px; } }

/* Kopfzeile: Bestenliste | Profil | Patch Notes */
.toprow { display: flex; align-items: center; justify-content: center; gap: 18px; position: relative; z-index: 3; margin: 0 0 8px; }
.toprow .profilebtn { margin: 0 !important; }
.hubround { width: 58px; height: 58px; border-radius: 50%; background: #fff; border: 2.5px solid #1d2433; box-shadow: 3px 4px 0 #1d2433; color: #1d2433;
  display: grid; place-items: center; padding: 0; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.hubround svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hubround:hover { transform: translateY(-2px); }
.hubround:active { transform: translate(2px, 3px); box-shadow: 1px 1px 0 #1d2433; }
.hlb { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 15px; }
.hlb th { text-align: left; font-size: 12px; color: #6b7185; text-transform: uppercase; letter-spacing: .05em; padding: 4px 6px; }
.hlb td { padding: 7px 6px; border-top: 1px solid #eef0f5; }
.hlb tr:first-child td { border-top: 0; }
/* kompakter + mittig */
#hub { padding-top: 10px; padding-bottom: 14px; }
h1.title { margin: 2px auto 0 !important; }
.games { height: 330px !important; }
.dots { margin-top: 6px !important; }
@media (min-width: 900px) { .profilebtn { width: 92px !important; height: 92px !important; } .pb-icon { width: 54px !important; height: 54px !important; } }
@media (max-width: 640px) { .games { height: 250px !important; } .profilebtn { width: 80px !important; height: 80px !important; } .pb-icon { width: 46px !important; height: 46px !important; } .hubround { width: 50px; height: 50px; } .toprow { gap: 14px; } }
@media (max-height: 760px) and (min-width: 900px) { .games { height: 290px !important; } .slide > .float { zoom: 1.15 !important; } }

/* Beim Laden nichts zeigen, bis alles aufgebaut ist */
html.loading body { background: transparent !important; }
html.loading #hub { visibility: hidden; }

.hlb-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hlb-tabs button { border: 1.5px solid #e4e6ef; background: #fff; color: #1d2433; border-radius: 99px; padding: 6px 12px; font: 700 13px/1.2 system-ui, sans-serif; cursor: pointer; }
.hlb-tabs button.on { background: linear-gradient(135deg, #8b5cff, #5b4bff); color: #fff; border-color: transparent; }

/* Knopfreihe (Bestenliste | Profil | Patch Notes) mittig ganz oben am Rand (17.11.) */
.toprow { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); margin: 0; z-index: 20; }
.hlb-wrap { overflow-x: auto; margin-top: 4px; }
.hlb th, .hlb td { white-space: nowrap; }
.hlb-mode { margin: 12px 0 0; font: 800 13px/1.2 system-ui, sans-serif; color: #6b7185; text-transform: uppercase; letter-spacing: .05em; }
.hlb td small { display: block; font-size: 11px; color: #8a90a2; font-weight: 600; }
@media (max-width: 640px) { .hlb { font-size: 13.5px; } .hlb th { font-size: 10.5px; padding: 4px 4px; } .hlb td { padding: 7px 4px; } }

/* "Werwolf"-Knopf: Nachthimmel, harter goldener Schatten */
.wwbtn { display: block; width: min(100%, 340px); border-radius: 20px; line-height: 0; cursor: pointer;
  box-shadow: 7px 8px 0 #e88a1a; transform: rotate(1deg); transition: transform .12s ease, box-shadow .12s ease; }
.wwbtn img { width: 100%; height: auto; display: block; }
.wwbtn:hover { transform: rotate(0deg) translateY(-2px); }
.wwbtn:active { transform: rotate(1deg) translate(5px, 6px); box-shadow: 2px 2px 0 #e88a1a; }

/* "Kontrollverlust"-Knopf: Neon-Lila Karte, harter pinker Schatten */
.kvbtn { display: block; width: min(100%, 340px); border-radius: 20px; line-height: 0; cursor: pointer;
  box-shadow: 7px 8px 0 #ff4fa3; transform: rotate(-1.5deg); transition: transform .12s ease, box-shadow .12s ease; }
.kvbtn img { width: 100%; height: auto; display: block; }
.kvbtn:hover { transform: rotate(0deg) translateY(-2px); }
.kvbtn:active { transform: rotate(-1.5deg) translate(5px, 6px); box-shadow: 2px 2px 0 #ff4fa3; }

/* "Panzerduell"-Knopf: dunkle Arena, harter orangener Schatten */
.pzbtn { display: block; width: min(100%, 340px); border-radius: 20px; line-height: 0; cursor: pointer;
  box-shadow: 7px 8px 0 #ff7a1a; transform: rotate(-1deg); transition: transform .12s ease, box-shadow .12s ease; }
.pzbtn img { width: 100%; height: auto; display: block; }
.pzbtn:hover { transform: rotate(0deg) translateY(-2px); }
.pzbtn:active { transform: rotate(-1deg) translate(5px, 6px); box-shadow: 2px 2px 0 #ff7a1a; }

/* "Zauberer-Duell"-Knopf: Nachthimmel-Karte, harter goldener Schatten */
.zdbtn { display: block; width: min(100%, 340px); border-radius: 20px; line-height: 0; cursor: pointer;
  box-shadow: 7px 8px 0 #ffd34d; transform: rotate(-1deg); transition: transform .12s ease, box-shadow .12s ease; }
.zdbtn img { width: 100%; height: auto; display: block; border-radius: 20px; }
.zdbtn:hover { transform: rotate(0deg) translateY(-2px); }
.zdbtn:active { transform: rotate(-1deg) translate(5px, 6px); box-shadow: 2px 2px 0 #ffd34d; }
