/* Stylesheet der vier Spiele-Websites. Liegt über site.css (Grundlagen, Kopf- und Fußzeile, Galerie,
   Rechtsseiten) und gibt jeder Seite ihre Farbwelt und die spieltypischen Bausteine.
   Quelle: sites-src/games/assets/games.css

   Bewegung nach Apple HIG und Emil Kowalski:
   - Einblenden mit kräftigem Ausklang (--out), 200 bis 600 ms; nichts startet bei scale(0).
   - Häufige Bedienvorgänge (Registerkarten, Knöpfe) sind kurz (unter 250 ms) oder sofort.
   - Federn nur für Dinge, die "geworfen" wirken sollen (Logo, Einheiten-Icons beim Überfahren).
   - Alles über transform, opacity und filter; bei "Bewegung reduzieren" bleiben nur Überblendungen. */

.site-game {
  color-scheme: dark;
  --out: cubic-bezier(.23, 1, .32, 1);
  --in-out: cubic-bezier(.77, 0, .175, 1);
  --display: "Lilita", var(--system);
  --display-weight: 400;
  --display-track: .005em;
  --radius: 22px;
  --shadow: 0 2px 4px rgba(0, 0, 0, .35), 0 20px 48px rgba(0, 0, 0, .45);
  --on-accent: #1a1200;
}
/* Farbwelten; Textkontraste jeweils auf --bg-alt gemessen */
.game-crazy-monsters {
  --bg: #0e1a12; --bg-alt: #142519; --surface: #1b3022; --text: #f1f7ee; --muted: #b6c8ba; /* 9,6:1 */
  --border: #2d4636; --accent: #b8f53b; --accent-ink: #c8f76a; /* 13:1 */ --on-accent: #142005;
  --accent-soft: #223d1e; --glow: 147, 92, 246;
}
.game-tower-arena {
  --bg: #1a120d; --bg-alt: #251a12; --surface: #312218; --text: #fbf3ea; --muted: #d4bfab; /* 9,4:1 */
  --border: #4a3526; --accent: #ffb52e; --accent-ink: #ffc65c; /* 10,6:1 */ --on-accent: #2a1700;
  --accent-soft: #3b2714; --glow: 45, 212, 191;
}
.game-strategy-war {
  --bg: #0f1810; --bg-alt: #162317; --surface: #1d2e1f; --text: #f2f6ea; --muted: #bccab1; /* 9,5:1 */
  --border: #2e4531; --accent: #f7c843; --accent-ink: #f9d46c; /* 11,8:1 */ --on-accent: #241a00;
  --accent-soft: #2c3818; --glow: 95, 179, 74;
}
.game-battle-alliance {
  --bg: #0b1220; --bg-alt: #111a2d; --surface: #182439; --text: #eef3fb; --muted: #aebad0; /* 8,6:1 */
  --border: #283754; --accent: #ffb02e; --accent-ink: #ffc152; /* 10,2:1 */ --on-accent: #231400;
  --accent-soft: #2d2618; --glow: 255, 122, 47;
}
.site-game h1, .site-game h2, .site-game h3, .site-game h4 { font-family: var(--display); font-weight: 400; letter-spacing: .005em; }
.site-game h2 { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.6rem); line-height: 1; }
.site-game h3 { font-size: 1.45rem; line-height: 1.1; }
.site-game .eyebrow { color: var(--accent-ink); letter-spacing: .04em; text-transform: uppercase; font-size: .8rem; font-weight: 700; }
.site-game .lead { color: var(--muted); }
.site-game .button { box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 55%, #000); transition: transform .16s var(--out), box-shadow .16s var(--out), filter .2s; }
.site-game .button:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 55%, #000); }
.site-game .button.ghost { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--text) 45%, transparent); color: var(--text); }
.site-game .button.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--text); }
.site-game .button.ghost:active { transform: scale(.97); }
.site-game .site-header .get { margin-inline-start: 4px; flex: none; }
.site-game .site-header:not(.scrolled) { background: linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, 0)); }
.site-game .site-footer { --bg: color-mix(in srgb, var(--bg) 55%, #000); --border: color-mix(in srgb, var(--text) 14%, transparent); }
.site-game .small { font-size: .94rem; color: var(--muted); margin-top: 1em; }
@media (max-width: 560px) { .site-game .site-header .get { display: none; } }

/* ------------------------------------------------------------ Kopf: Schlüsselbild, Logo, HUD */
.hero-game { position: relative; isolation: isolate; min-height: min(100svh, 920px); margin-top: -60px;
  display: grid; align-content: end; overflow: hidden; padding-block: 140px clamp(32px, 5vw, 56px); }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-game .hero-bg { position: absolute; inset: -4% 0; width: 100%; height: 108%; object-fit: cover; }
.hero-game::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 80% at 50% 100%, var(--bg) 8%, transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, .15) 35%, color-mix(in srgb, var(--bg) 70%, transparent) 72%, var(--bg) 100%); }
.hero-inner { max-width: 760px; }
.game-logo { margin: 0 0 18px; line-height: 0; }
.game-logo img { width: min(78vw, 520px); height: auto; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .55)); }
.tagline { font-family: var(--display); font-size: clamp(1.7rem, 1.1rem + 2.4vw, 2.8rem); line-height: 1.05; margin: 0 0 .5em; text-shadow: 0 3px 0 rgba(0, 0, 0, .35); max-width: 18em; }
.hero-game .lead { color: color-mix(in srgb, var(--text) 88%, transparent); max-width: 34em; margin-bottom: 1.4em; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0 0; font-size: .9rem; color: color-mix(in srgb, var(--text) 80%, transparent); }
.hero-meta span + span::before { content: "·"; margin-inline-end: 18px; opacity: .6; }
/* HUD: Kennzahlen wie Anzeigen im Spiel, mit abgeschrägten Ecken */
.hud { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: clamp(32px, 5vw, 56px); }
.hud li { position: relative; padding: 16px 18px 14px; background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  border-top: 2px solid var(--accent); }
.hud b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem); line-height: 1; color: var(--accent-ink); }
.hud span { font-size: .86rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
@media (max-width: 720px) { .hud { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-transparency: reduce) { .hud li { background: var(--surface); backdrop-filter: none; } }

/* ------------------------------------------------------------ Geschichte, Erfolge: Text neben Bild */
.split-art { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.split-art figure:not(.phone) { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.split-art .phone { width: min(100%, 300px); }
.story-text p { color: var(--muted); font-size: 1.08rem; }
.story-text p:first-child { color: var(--text); font-size: 1.22rem; }
@media (max-width: 900px) { .split-art { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ Merkmale */
.feature-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: 16px; background: var(--surface); font-weight: 600; line-height: 1.4; }
.feature-list svg { flex: none; width: 26px; height: 26px; padding: 4px; border-radius: 50%; background: var(--accent); fill: none; stroke: var(--on-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------ Registerkarten mit gleitender Markierung */
.tabs { --ink-x: 0px; --ink-w: 0px; }
.tablist { position: relative; display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; border-radius: 999px; background: var(--surface); margin-bottom: 28px; max-width: 100%; }
.tablist button { position: relative; z-index: 1; font: inherit; font-weight: 700; font-size: .95rem; color: var(--muted); background: none; border: 0; border-radius: 999px; min-height: 42px; padding: 0 18px; cursor: pointer; transition: color .2s var(--out); }
.tablist button[aria-selected="true"] { color: var(--on-accent); }
.tablist button:hover:not([aria-selected="true"]) { color: var(--text); }
.tab-ink { position: absolute; z-index: 0; top: var(--ink-y, 5px); left: 0; height: var(--ink-h, 42px); width: var(--ink-w); border-radius: 999px; background: var(--accent);
  transform: translateX(var(--ink-x)); transition: transform .32s var(--out), width .32s var(--out); }
html:not(.js) .tab-ink { display: none; }
html:not(.js) .tablist button[aria-selected="true"] { background: var(--accent); }
.tabpanel[hidden] { display: none; }
.tabpanel.enter { animation: panel-in .28s var(--out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } }
@media (pointer: coarse) { .tablist button { min-height: 44px; } }

/* Spielsteuerung: Text links, Telefon rechts */
.ctrl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: clamp(28px, 5vw, 72px); align-items: center; }
.ctrl-text p { color: var(--muted); font-size: 1.08rem; }
.phone { margin: 0; justify-self: center; width: min(100%, 320px); padding: 10px; border-radius: 44px; background: #0a0a0c;
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--text) 18%, transparent), 0 30px 60px rgba(0, 0, 0, .5); }
.phone img { border-radius: 34px; width: 100%; }
@media (max-width: 760px) { .ctrl { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ Missionen und Gelände */
.missions, .terrains { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.mission, .terrain { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.mission img, .terrain img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 30%; transition: transform .6s var(--out); }
.terrain figure { margin: 0; overflow: hidden; }
.mission > div, .terrain h3, .terrain p { padding-inline: 20px; }
.mission > div { padding-block: 16px 20px; }
.terrain h3 { margin-top: 18px; }
.terrain p { padding-bottom: 20px; margin: 0; }
.mission p, .terrain p { color: var(--muted); font-size: .98rem; }
.site-game .mission .status { display: inline-block; margin: 0 0 8px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
@media (hover: hover) { .mission:hover img, .terrain:hover img { transform: scale(1.05); } }

/* ------------------------------------------------------------ Arsenal und Gegner */
.units { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.unit { display: flex; gap: 16px; align-items: flex-start; padding: 16px; border-radius: 18px; background: var(--surface);
  border: 1px solid transparent; transition: border-color .2s var(--out), transform .25s var(--out); }
.unit:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.unit-icon { flex: none; width: 76px; height: 76px; border-radius: 16px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(var(--glow), .35), transparent 70%), var(--bg); }
.unit-icon img { width: 64px; height: 64px; object-fit: contain; transition: transform .45s var(--spring); }
.unit:hover .unit-icon img { transform: scale(1.12) rotate(-4deg); }
.unit h4 { font-size: 1.2rem; margin: 2px 0 6px; line-height: 1.1; }
.unit p { color: var(--muted); font-size: .94rem; margin: 6px 0 0; line-height: 1.45; }
.tag-target { display: inline-block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.enemies-sec .unit-icon { background: radial-gradient(circle at 50% 40%, rgba(255, 70, 70, .28), transparent 70%), var(--bg); }

/* ------------------------------------------------------------ Galerie */
.site-game .strip-iphone { grid-auto-columns: min(46%, 236px); }
.site-game .strip-ipad { grid-auto-columns: min(78%, 420px); }
.site-game .shot { border-radius: 18px; }

/* ------------------------------------------------------------ Reihe: die anderen Spiele */
.series { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.series-card a { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: #fff; isolation: isolate; }
.series-card a > img:first-child { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .7s var(--out); }
.series-card a::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .6)); }
.series-logo { width: 66%; height: auto; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .5)); transition: transform .45s var(--spring); }
.series-card .go { position: absolute; bottom: 14px; inset-inline-start: 18px; font-weight: 700; font-size: .9rem; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
@media (hover: hover) {
  .series-card a:hover > img:first-child { transform: scale(1.06); }
  .series-card a:hover .series-logo { transform: scale(1.05) translateY(-4px); }
}
.series-card a:active { transform: scale(.985); transition: transform .12s var(--out); }

/* Abschluss */
.cta-final .app-icon.xl { box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 18px 40px rgba(0, 0, 0, .5), 0 0 80px rgba(var(--glow), .35); }

/* ------------------------------------------------------------ Bewegung */
@media (prefers-reduced-motion: no-preference) {
  /* Logo fällt mit einer Feder ins Bild, weil es "geworfen" wirken soll */
  [data-drop] { animation: drop .9s var(--spring) both; animation-delay: .08s; }
  @keyframes drop { from { opacity: 0; transform: translateY(-28px) scale(.92); } }
  .site-game [data-enter] { animation: enter-g .7s var(--out) both; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
  @keyframes enter-g { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } }
  .site-game.js [data-reveal], .js .site-game [data-reveal] { transform: translateY(18px); }
  @supports (animation-timeline: view()) {
    .hero-game .hero-bg { animation: hero-g linear both; animation-timeline: scroll(root); animation-range: 0 900px; }
    @keyframes hero-g { to { transform: translateY(10%) scale(1.07); } }
    .split-art figure img, .terrain img { animation: settle linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    @keyframes settle { from { transform: scale(1.12); } }
  }
}
@media (prefers-contrast: more) {
  .site-game { --muted: var(--text); }
  .hero-game::after { background: linear-gradient(180deg, rgba(0, 0, 0, .75), var(--bg)); }
}

/* Zahlen wie „40+“ bleiben auch in Rechts-nach-links-Sprachen in ihrer Reihenfolge */
.hud b { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .hud b { text-align: right; }
/* Lange Wörter (Finnisch, Deutsch …) in den Kennzahlen mit Silbentrennung statt hartem Umbruch */
.hud span { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
@media (max-width: 480px) { .hud span { font-size: .74rem; letter-spacing: .02em; } .hud li { padding: 14px 14px 12px; } }
/* Registerkarten auf schmalen Bildschirmen als wischbare Zeile statt Umbruch in mehrere Reihen */
@media (max-width: 760px) {
  .tablist { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  .tablist::-webkit-scrollbar { display: none; }
  .tablist button { flex: none; }
}
