:root {
  font-family: Inter, ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f8fbff;
  background: #0d1d32;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
#login-form > div:not(.login-actions) { display:grid; gap:8px; }
.admin-area { margin:24px 0; padding:24px; border-radius:20px; background:#183d46; }
#admin-content { display:grid; gap:12px; margin:16px 0; }
#admin-content article { padding:18px; border:1px solid #b5cbb755; border-radius:12px; }
#admin-content p { white-space:pre-wrap; overflow-wrap:anywhere; }
#admin-content pre { white-space:pre-wrap; overflow-wrap:anywhere; max-height:320px; overflow:auto; font-size:12px; }
#admin-content button, #admin-more { padding:10px 16px; }
#mail-confirmation { padding:16px; margin-top:16px; background:#e7eee8; border-radius:12px; }

html, body { min-height: 100%; margin: 0; }

body {
  background:
    radial-gradient(circle at 12% 12%, #53b3cb33 0 180px, transparent 360px),
    radial-gradient(circle at 88% 70%, #7fbf6640 0 190px, transparent 390px),
    linear-gradient(145deg, #0d1d32, #163548 55%, #244c38);
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.loading {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: #dce8ed;
  font-size: 13px;
  font-weight: 750;
}

body:not(.auth-pending) .loading { display: none; }

.brand-mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #55bad3, #477c50);
  border: 3px solid #ffffffdd;
  border-radius: 20px;
  box-shadow: 0 14px 36px #0007;
  font-size: 31px;
  font-weight: 950;
}

.brand-mark.small { width: 44px; height: 44px; border-width: 2px; border-radius: 13px; font-size: 22px; }

.login-view {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-view[hidden], .dashboard[hidden] { display: none; }

.login-card {
  width: min(430px, 100%);
  padding: 30px;
  color: #10213a;
  background: #f8fbf3;
  border: 2px solid #ffffffaa;
  border-radius: 26px;
  box-shadow: 0 26px 90px #0008;
}

.eyebrow { margin: 18px 0 2px; color: #72d5f2; font-size: 12px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.login-card .eyebrow { color: #557063; }
.login-card h1 { margin: 0 0 10px; font-size: 42px; letter-spacing: -.045em; }
.intro { margin: 0 0 20px; color: #415263; line-height: 1.5; }

form { display: grid; gap: 8px; }
#invite-fields { display: grid; gap: 8px; }
#invite-fields[hidden] { display: none; }
#invite-fields p { margin: 0; color: #68777f; font-size: 11px; line-height: 1.4; }
label { margin-top: 5px; font-size: 13px; font-weight: 800; }
input {
  width: 100%; min-height: 48px; padding: 11px 14px;
  color: #10213a; background: #fff; border: 2px solid #cad8d0; border-radius: 11px; outline: none;
}
input:focus { border-color: #53b3cb; box-shadow: 0 0 0 4px #53b3cb22; }

.login-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
button, .play-button {
  min-height: 46px; border: 0; border-radius: 11px; cursor: pointer; font-weight: 850;
}
.login-actions button { color: #fff; background: #315c3a; }
.login-actions .secondary { color: #10213a; background: #dce8ed; }
button:hover, .play-button:hover { filter: brightness(1.08); }
button:disabled { cursor: wait; opacity: .55; }
.message { min-height: 20px; margin: 3px 0 0; color: #a23643; font-size: 13px; font-weight: 750; }
.message.success { color: #315c3a; }
.privacy-note { margin: 12px 0 0; color: #68777f; font-size: 11px; line-height: 1.45; }

.dashboard { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 28px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand strong { display: block; font-size: 20px; letter-spacing: .06em; }
.brand small { display: block; margin-top: 1px; color: #a9bdca; font-size: 11px; }
.account { display: flex; align-items: center; gap: 12px; }
.account span { color: #dce8ed; font-size: 14px; font-weight: 750; }
.account button { min-height: 38px; padding: 7px 14px; color: #fff; background: #ffffff16; border: 1px solid #ffffff3d; }

.hero { padding: clamp(34px, 7vw, 76px) 0 34px; }
.hero .eyebrow { margin-top: 0; }
.hero h1 { max-width: 760px; margin: 4px 0 10px; font-size: clamp(35px, 6vw, 68px); line-height: .98; letter-spacing: -.055em; }
.hero p:last-child { max-width: 670px; margin: 0; color: #b8cad5; font-size: clamp(15px, 2vw, 18px); line-height: 1.55; }

.games-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .85fr); gap: 20px; }
.game-card { overflow: hidden; background: #f7faef; border: 1px solid #ffffff55; border-radius: 24px; box-shadow: 0 22px 70px #0005; }
.featured { display: grid; grid-template-columns: minmax(250px, .85fr) minmax(320px, 1.15fr); }
.game-art { position: relative; min-height: 390px; overflow: hidden; background: linear-gradient(#94d982, #73bc6d); }
.game-art::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 15% 24%, #fff3 0 3px, transparent 4px), radial-gradient(circle at 72% 70%, #fff2 0 4px, transparent 5px); background-size: 75px 68px, 110px 98px; }
.path { position: absolute; width: 145%; height: 82px; top: 44%; left: -22%; background: #e5cb91; border: 8px solid #977044; border-radius: 999px; transform: rotate(-18deg); box-shadow: 0 9px 0 #315c3a33; }
.tower { position: absolute; display: grid; width: 66px; height: 66px; place-items: center; color: #10213a; border: 7px solid #315c3a; border-radius: 50%; box-shadow: 0 10px 20px #17372455; font-size: 24px; font-weight: 950; }
.tower.air { top: 18%; left: 17%; background: #f2b84b; }
.tower.earth { right: 12%; bottom: 13%; background: #79a84b; }
.enemy { position: absolute; top: 46%; right: 35%; display: grid; width: 54px; height: 54px; place-items: center; color: #412b29; background: #e8b58d; border: 5px solid #e45756; border-radius: 50%; font-size: 25px; box-shadow: 0 8px 15px #0003; }
.game-copy { display: flex; flex-direction: column; padding: clamp(24px, 4vw, 42px); color: #10213a; }
.game-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.tag { color: #557063; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.game-card h2 { margin: 4px 0 12px; font-size: clamp(27px, 4vw, 42px); letter-spacing: -.04em; }
.game-copy > p { margin: 0; color: #4f6069; line-height: 1.55; }
.ready { flex: none; padding: 6px 9px; color: #24633b; background: #d9f0d6; border-radius: 999px; font-size: 11px; font-weight: 850; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.stat { padding: 8px 10px; color: #3c5360; background: #e5ece9; border-radius: 9px; font-size: 12px; font-weight: 780; }
.play-button { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: auto; padding: 0 18px; color: #fff; background: linear-gradient(110deg, #315c3a, #397c64); text-decoration: none; }
.play-button span { font-size: 23px; }
.frontier-card { display: flex; flex-direction: column; color: #eaf8ff; background: linear-gradient(155deg, #0b1d29, #102f3d 58%, #07131d); border-color: #42cbed55; }
.frontier-art { position: relative; min-height: 185px; overflow: hidden; background: radial-gradient(circle at 50% 50%, #163f50 0 17%, transparent 18%), radial-gradient(circle at 20% 10%, #24d6ff33 0 1px, transparent 2px), radial-gradient(circle at 80% 70%, #ffffff33 0 1px, transparent 2px), #07131d; background-size: auto, 37px 37px, 51px 51px; }
.frontier-art::after { content: ""; position: absolute; inset: auto 0 0; height: 42%; background: linear-gradient(168deg, transparent 0 24%, #16303b 25% 54%, #0d2029 55%); border-top: 1px solid #315566; }
.frontier-orbit { position: absolute; width: 210px; height: 72px; left: 50%; top: 49%; border: 1px solid #27d3ffaa; border-radius: 50%; transform: translate(-50%, -50%) rotate(-16deg); box-shadow: 0 0 22px #27d3ff2b; }
.frontier-core { position: absolute; z-index: 2; left: 50%; top: 49%; display: grid; width: 62px; height: 62px; place-items: center; color: #061018; background: #27d3ff; border: 7px solid #bff5ff; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 35px #27d3ff; font-weight: 950; }
.frontier-scan { position: absolute; width: 13px; height: 13px; background: #ff5b53; border: 3px solid #ffd4cf; border-radius: 50%; box-shadow: 0 0 13px #ff5b53; }
.frontier-scan.one { left: 22%; top: 35%; }
.frontier-scan.two { right: 18%; top: 23%; }
.frontier-copy { display: flex; flex: 1; flex-direction: column; padding: 25px; }
.frontier-card h2 { margin-bottom: 10px; color: #fff; font-size: 30px; }
.frontier-card .tag { color: #27d3ff; }
.frontier-card .ready { color: #123727; background: #81edac; }
.frontier-card p { margin: 0; color: #a9c1cc; font-size: 14px; line-height: 1.5; }
.feature-list { display: grid; gap: 6px; margin: 16px 0 20px; padding: 0; list-style: none; color: #c5d8e1; font-size: 12px; }
.feature-list li::before { content: "◆"; margin-right: 8px; color: #27d3ff; font-size: 8px; }
.frontier-play { margin-top: auto; background: linear-gradient(110deg, #158cb0, #15677f); }
.coming-soon { display: flex; min-height: 300px; flex-direction: column; justify-content: center; align-items: center; padding: 30px; color: #dce8ed; text-align: center; background: #ffffff0b; border: 2px dashed #ffffff30; box-shadow: none; }
.coming-soon .plus { display: grid; width: 62px; height: 62px; margin-bottom: 20px; place-items: center; color: #8be8ff; background: #ffffff0d; border: 1px solid #ffffff2b; border-radius: 20px; font-size: 37px; font-weight: 300; }
.coming-soon .tag { color: #8be8ff; }
.coming-soon h2 { margin-bottom: 5px; font-size: 27px; }
.coming-soon p { margin: 0; color: #9fb3bf; }
footer { padding: 28px 0 0; color: #8197a4; font-size: 11px; text-align: center; }

@media (max-width: 820px) {
  .games-grid { grid-template-columns: 1fr; }
  .featured { grid-template-columns: 1fr; }
  .game-art { min-height: 250px; }
  .coming-soon { min-height: 220px; }
  .frontier-art { min-height: 220px; }
}

@media (max-width: 520px) {
  .login-view { padding: 14px; }
  .login-card { padding: 22px; border-radius: 20px; }
  .login-actions { grid-template-columns: 1fr; }
  .dashboard { width: min(100% - 20px, 1180px); }
  .site-header { align-items: flex-start; }
  .brand small { display: none; }
  .account { flex-direction: column; align-items: flex-end; gap: 5px; }
  .account button { min-height: 34px; }
  .hero { padding-top: 28px; }
  .game-heading { display: block; }
  .ready { display: inline-block; margin-bottom: 8px; }
}

/* Einheitliches Spiele-Raster: alle Einträge haben dieselbe visuelle Gewichtung. */
.games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.game-card,.featured,.frontier-card { display: flex; min-height: 570px; flex-direction: column; }
.game-art,.frontier-art,.arcade-art { flex: 0 0 220px; min-height: 220px; }
.game-copy,.frontier-copy { flex: 1; padding: 30px; }
.game-card h2,.frontier-card h2 { font-size: clamp(28px, 3.5vw, 38px); }
.arcade-card { color: #effbff; background: linear-gradient(155deg,#071523,#10283a); border-color: #54cfe455; }
.arcade-card .game-copy { color: #effbff; }
.arcade-card .tag { color: #65f6e3; }
.arcade-card .game-copy>p { color: #a9c1cc; }
.arcade-card .ready { color:#123727;background:#81edac; }
.arcade-art { position: relative; overflow: hidden; background: #050a13; }
.maze-art { background: radial-gradient(circle at 25% 45%,#173d61,transparent 35%),#030812; }
.maze-lines { position:absolute;inset:25px;background:repeating-linear-gradient(90deg,#1a88c7 0 5px,transparent 5px 49px),repeating-linear-gradient(#1a88c7 0 5px,transparent 5px 49px);border:5px solid #1a88c7;box-shadow:0 0 22px #1a88c777;opacity:.75 }
.maze-hero,.maze-guard { position:absolute;z-index:2;width:42px;height:42px;border-radius:50%;box-shadow:0 0 24px currentColor }
.maze-hero { left:24%;top:43%;color:#65f6e3;background:conic-gradient(from 35deg,#65f6e3 0 82%,transparent 83%); }
.maze-guard { border-radius:50% 50% 12px 12px;background:currentColor; }
.maze-guard.g1 { right:27%;top:27%;color:#ff5b75 }.maze-guard.g2 { right:16%;bottom:22%;color:#55dfff }
.maze-play { background:linear-gradient(110deg,#1cae9f,#187fa4); }
.river-art { background:linear-gradient(#0d6079 0 45%,#284a38 45% 54%,#292f38 54%); }
.river-lane { position:absolute;left:0;right:0;height:34px;border-top:2px dashed #d9f3ff77;border-bottom:2px dashed #d9f3ff77;background:#252b35 }.river-lane.one{bottom:60px}.river-lane.two{bottom:12px}
.river-raft { position:absolute;left:15%;top:48px;width:190px;height:32px;border-radius:18px;background:#a6764c;box-shadow:0 7px 0 #4b3929 }
.river-car { position:absolute;right:15%;bottom:63px;width:105px;height:36px;border-radius:11px;background:#ed6d5d;box-shadow:inset 22px 0 #ffd0ca55 }
.river-hero { position:absolute;left:48%;bottom:13px;display:grid;width:38px;height:38px;place-items:center;color:#17241d;background:#ffdb63;border:5px solid #fff0a5;border-radius:9px;transform:rotate(45deg);box-shadow:0 0 22px #ffdb63 }
.river-play { background:linear-gradient(110deg,#b98b24,#4a9b79); }
.flap-art { background:linear-gradient(#59c4e5 0 72%,#9ad274 72%); }
.flap-cloud { position:absolute;width:90px;height:28px;background:#efffffaa;border-radius:30px;box-shadow:28px -13px 0 -3px #efffffaa,55px 0 0 -6px #efffffaa }
.flap-cloud.one { left:9%;top:24% }.flap-cloud.two { right:12%;top:48%;transform:scale(.7) }
.flap-pipe { position:absolute;right:20%;width:62px;background:linear-gradient(90deg,#16776e,#67df9a 45%,#11665f);border:4px solid #0d5d57 }
.flap-pipe::after { content:"";position:absolute;left:-9px;width:72px;height:24px;background:#50cf8a;border:4px solid #0d5d57;border-radius:6px }
.flap-pipe.top { top:0;height:65px }.flap-pipe.top::after { bottom:-22px }.flap-pipe.bottom { bottom:0;height:64px }.flap-pipe.bottom::after { top:-22px }
.flap-bird { position:absolute;left:34%;top:45%;display:grid;width:52px;height:42px;place-items:center;color:#6a351b;background:#ffd84c;border:5px solid #fff3a0;border-radius:50% 58% 50% 45%;box-shadow:0 0 22px #ffd84c;font-size:1.4rem;transform:rotate(-8deg) }
.flap-play { background:linear-gradient(110deg,#167c87,#41a66e); }

@media(max-width:820px){.games-grid{grid-template-columns:1fr}.game-card,.featured,.frontier-card{min-height:540px}.game-art,.frontier-art,.arcade-art{flex-basis:220px}}

.language-picker { display:flex; gap:12px; align-items:center; justify-content:space-between; margin:12px 0; }
.language-picker select { padding:8px 10px; min-height:40px; border:2px solid #b5c7bd; border-radius:9px; background:#fff; color:#18332b; font:inherit; }
.account .language-picker { font-size:12px; }
#admin-content article > button { margin:4px 8px 4px 0; }
