/* ================================================
   Theme System (WCAG AAA – Light & Dark)
================================================ */

:root {
  color-scheme: light;

/* --- NEU: Radien und Animationen hinzufügen --- */
  --radius-sm: 8px;           /* Der Wert für deine Standard-Buttons */
  --radius-lg: 12px;          /* Optional für größere Elemente */
  --transition-fast: 0.2s ease;

  /* Backgrounds (Light Mode) */
  --bg-main: #eef3fb;
  --bg-footer: rgba(13, 27, 42, 0.08);
  --bg-game: #0a1220;

  /* Text (Light Mode – AAA) */
  --text-main: #0d1b2a;
  --text-muted: #5b6f8a;
  --text-heading: #0a1220;

  /* UI */
  --border-main: #0d1b2a;
  --accent: #3b82f6;
  --accent-contrast: #ffffff;
  --focus-ring: #60a5fa;
}

/* =================================================
   Dark Mode – WCAG AAA
================================================= */

html[data-theme="dark"] {
  color-scheme: dark;

  --bg-main: #0d1b2a;
  --bg-footer: rgba(13, 27, 42, 0.35);
  --bg-game: #0a1220;

  --text-main: #ffffff;
  --text-muted: #c7d2e6;
  --text-heading: #ffffff;

  --border-main: #e6f0ff;

  --accent: #82caff;
  --accent-contrast: #0d1b2a;
}

/* System Dark Mode fallback */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    color-scheme: dark;

    --bg-main: #0d1b2a;
    --bg-footer: rgba(13, 27, 42, 0.35);
    --bg-game: #0a1220;

    --text-main: #ffffff;
    --text-muted: #c7d2e6;
    --text-heading: #ffffff;

    --border-main: #e6f0ff;

    --accent: #82caff;
    --accent-contrast: #0d1b2a;
  }
}

/* =================================================
   Base / Reset (CLS-safe)
================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;

  background-color: var(--bg-main);
  color: var(--text-main);

  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Media defaults */
img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =================================================
   Typography
================================================= */

h1, h2, h3 {
  margin: 1.2rem 0 0.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-heading);
}

h4, h5, h6 {
  margin: 1.2rem 0 0.4rem;
  font-weight: 700;
  letter-spacing: normal;
  color: var(--text-heading);
}

h1 { font-size: clamp(1.6rem, 2.5vw + 1rem, 2rem); }
h2 { font-size: clamp(1.3rem, 2vw + 0.9rem, 1.6rem); }
h3 { font-size: clamp(1.1rem, 1.5vw + 0.8rem, 1.3rem); }
h4, h5, h6 { font-size: 1rem; }

p {
  margin: 0 0 0.6rem;
  font-size: clamp(0.98rem, 1vw + 0.85rem, 1.1rem);
  line-height: 1.6;
  color: var(--text-muted);
}

/* =================================================
   Layout
================================================= */

header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

header a {
  display: inline-flex;
}

header a:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
}

header img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

/*.title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}*/

.title {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.subtitle {
  font-size: 0.5em; /* Deutlich kleiner */
  font-weight: 400;
  color: var(--text-muted); /* Ein dezenteres Grau/Grün */
  margin-top: 4px;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  margin-bottom: 2rem; /* Oder ein Wert, der für dein Layout passt */
}

footer {
  padding: 1rem;
  background-color: var(--bg-footer);
  border-top: 1px solid var(--border-main);
}

/* =================================================
   Game Container
================================================= */

.game-wrapper {
  width: 100%;
  max-width: 960px;
}

.game-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-game);
  border: 1px solid var(--accent); 
  border-radius: 2px;
  overflow: hidden;
}

.game-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* =================================================
    Buttons & Action-Links
================================================= */

/* Gemeinsame Basis für Buttons und den Vollbild-Link */
button, 
.fullscreen-btn {
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
  border-radius: var(--radius-sm);
  transition: 
    background-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

/* --- Theme Toggle (Dezent gehalten) --- */
.theme-toggle {
  min-inline-size: 44px;
  min-block-size: 44px;
  padding: 0.5rem;
  margin-inline-start: auto;
  border: 1px solid var(--accent);
  background-color: transparent;
  color: var(--accent);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background-color: var(--accent);
  color: var(--accent-contrast);
  outline: none;
}

/* --- Vollbild-Button (Der primäre Eyecatcher) --- */
.fullscreen-btn {
  margin-top: 1.25rem;
  padding: 0.8rem 2rem;
  min-inline-size: 200px; /* Etwas breiter für mehr Präsenz */
  min-block-size: 48px;
  white-space: nowrap;
  
  /* Gold-Orange Look */
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #ffffff; /* Weißer Text für maximalen Kontrast */
  border: none; /* Kein Rand nötig bei Gradient-Füllung */
  
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  
  /* Sanfter Schatten für Tiefe */
  box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
}

.fullscreen-btn:hover,
.fullscreen-btn:focus-visible {
  /* Beim Hover wird er noch etwas leuchtender */
  background: linear-gradient(135deg, #ffb133, #f39c12);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(230, 126, 34, 0.5);
  outline: none;
}

/* Aktiver Zustand beim Klicken (haptisches Feedback) */
.fullscreen-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(230, 126, 34, 0.4);
}

/* Responsive Optimierung: Auf kleinen Handys volle Breite */
@media (max-width: 480px) {
  .fullscreen-btn {
    display: flex;
    width: 100%;
  }
}

/* =================================================
   Share Buttons & Trigger
================================================= */

.share-section {
    text-align: left;
    margin: 50px 0;
}

#share-heading {
    font-size: 1.5rem; /* Passend zu den anderen Unterüberschriften */
    margin-bottom: 15px;
    color: var(--text-color); /* Nutzt deine bestehende Variable */
}

.share-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; 
    gap: 0.75rem; 
    margin-top: 1.5rem;
}

/* Wir wenden das Design auf <a> und <button> an */
.share-buttons a,
.share-buttons .share-trigger {
    inline-size: 44px;
    block-size: 44px;

    border: 1px solid var(--accent);
    border-radius: 50%;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    /* Wichtig für den Button: Standard-Styles entfernen */
    background-color: transparent;
    cursor: pointer;
    padding: 0;
    font-family: inherit;

    color: var(--accent);

    transition:
        background-color var(--transition-fast),
        transform var(--transition-fast),
        color var(--transition-fast);
}

.share-buttons a:hover,
.share-buttons a:focus-visible,
.share-buttons .share-trigger:hover,
.share-buttons .share-trigger:focus-visible {
    background-color: var(--accent);
    color: var(--accent-contrast);
    transform: scale(1.1);
    outline: none; /* Verhindert doppelten Fokus-Rahmen bei Buttons */
}

/* SVG Anpassung: stroke für den Share-Button, fill für die Social-Icons */
.share-buttons svg {
    inline-size: 22px;
    block-size: 22px;
    fill: currentColor; /* Für Facebook, X, etc. */
}

/* Der native Share-Button nutzt meist Pfade mit Stroke statt Fill */
.share-buttons .share-trigger svg {
    fill: none; 
    stroke: currentColor;
}

.share-buttons .icon-success {
    stroke: #2ecc71; /* Ein schönes Billard-Grün */
}


/* =================================================
   Footer Content
================================================= */

.footer-content {
  max-width: 960px;
  margin: 0 auto 1rem;
}

.footer-link {
  color: var(--accent);
  font-size: 0.95rem;
  text-decoration: none;
}

.footer-link:hover,
.footer-link:focus-visible {
  text-decoration: underline;
}

/* =================================================
   Accessibility
================================================= */

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

@media (forced-colors: active) {
  .footer-link {
    color: LinkText;
  }

  .share-buttons a {
    border-color: ButtonText;
    color: ButtonText;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* =================================================
   Page Voting
================================================= */

.page-voting {
  max-width: 960px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-main);
  text-align: center;
}

.vote-buttons {
  display: inline-flex;
  gap: 1rem;
}

.vote-buttons button {
  min-inline-size: 44px;
  min-block-size: 44px;
  padding: 0.5rem 1.25rem;

  border: 1px solid var(--accent);
  border-radius: 999px;

  background-color: transparent;
  color: var(--accent);

  font-weight: 600;
}

.vote-buttons button:hover,
.vote-buttons button:focus-visible {
  background-color: var(--accent);
  color: var(--accent-contrast);
}

.vote-buttons button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.vote-buttons button span {
  font-size: 1.2rem;
}

#vote-result {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);

  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

#vote-result.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =================================================
   Voting Success Animation
================================================= */

@keyframes vote-success {
  0% { transform: scale(1); }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 6px rgba(13, 27, 42, 0.15);
  }
  100% { transform: scale(1); }
}

.vote-buttons button.is-success {
  animation: vote-success 0.45s ease-out;
}

/* =================================================
   Optimiertes FAQ-System mit Grid-Animation
================================================= */

.faq {
  max-width: 960px;
  margin: 3rem auto 0;
}

.faq-item {
  border-bottom: 1px solid var(--border-main);
  padding: 0; 
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  color: var(--text-heading);
  padding: 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none; /* Verhindert Markierung bei Doppelklick */
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "▸";
  font-size: 1.2rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--accent); /* Nutzt deine Akzentfarbe für den Pfeil */
}

.faq-item[open] summary::after {
  transform: rotate(90deg);
}

/* Der Grid-Container */
.faq-item > div {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.faq-item[open] > div {
  grid-template-rows: 1fr;
}

/* Der Inhalts-Wrapper sorgt für das korrekte Padding */
.faq-item-content {
  min-height: 0;
}

.faq-item p {
  margin: 0;
  padding-bottom: 1rem;
  color: var(--text-muted);
}


.rules-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.rules-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.rules-list li::before {
  content: "•"; /* Oder ein Icon/Accent-Punkt */
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
  font-size: 1.2rem;
}

.rules-list strong {
  color: var(--text-heading);
  display: block; /* Macht die Überschrift zum eigenständigen Block für bessere Scannbarkeit */
  margin-bottom: 0.2rem;
}


html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem; /* Verhindert, dass Überschriften am Rand "kleben" */
}

/* Sprunglink standardmäßig außerhalb des Sichtfelds schieben */
.skip-link {
    position: absolute;
    top: -100px;
    left: 10px;
    background: #2a7f62; /* Nutze eine deiner Branding-Farben */
    color: white;
    padding: 10px 20px;
    z-index: 1000;
    text-decoration: none;
    border-radius: 0 0 5px 5px;
    font-weight: bold;
    transition: top 0.2s;
}

/* Nur anzeigen, wenn der Link mit der Tab-Taste fokussiert wird */
.skip-link:focus {
    top: 0;
    outline: 3px solid #ff9800; /* Auffälliger Fokus-Rahmen */
}

.impressum-wrapper {
  max-width: 960px;
  width: 100%;
}

/* Galerie Container */
.game-screenshots {
    margin: 2rem 0;
    padding: 1rem 0;
}

.game-screenshots h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Grid-System: Passt sich automatisch an */
.game-screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Bilder stylen */
.game-screenshots img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    display: block;
    background-color: #f0f0f0; /* Platzhalter bei Ladevorgang */
}

/* Kleiner Hover-Effekt */
.game-screenshots img:hover {
    transform: scale(1.02);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


/* =================================================
  Empfehlung anderer Seiten
================================================= */

.recommendations {
    padding: 2rem 0;
    /* Nutzt eine transparente Linie, die auf hell UND dunkel funktioniert */
    border-top: 1px solid rgba(128, 128, 128, 0.2); 
    margin-top: 2rem;
}

/* Die Container-Sektion für die Empfehlungen */
.game-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem; /* Gleicher Abstand wie bei deinen Share-Buttons */
    margin-top: 1rem;
    justify-content: center; /* Zentriert die "Buttons" wie eine Button-Leiste */
}
.game-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    transition: transform 0.2s;
    width: 60px; /* Feste Breite für die gesamte "Einheit" */
}
.game-card:hover {
    transform: translateY(-3px);
}
.game-card img {
    /* GRÖSSE: Hier an deine Share-Buttons anpassen (meist 40-48px) */
    width: 44px; 
    height: 44px;
    
    /* FORM: Macht sie rund oder leicht abgerundet wie die Buttons */
    border-radius: 50%; /* Oder 50% für kreisrund */
    
    /* STYLING */
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid rgba(128, 128, 128, 0.1);
}
.game-card span {
    display: block;
    font-size: 0.75rem; /* Kleinerer Text, damit er unter den Button passt */
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
/* Genre ausblenden, wenn es wie eine Button-Leiste wirken soll */
.game-card small {
    display: none; 
}

/* Optional: Ein subtiler Glow-Effekt im Dark Mode für die Bilder */
@media (prefers-color-scheme: dark) {
    .game-card img {
        box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    }
}

/* =================================================
   Reaction Buttons (Angepasst an Share-Design)
================================================= */

.reactions {
    text-align: left;
    margin: 50px 0;
}

.reactions h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.reaction-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem; /* Etwas mehr Platz für die Zähler-Badges */
    margin-top: 1.5rem;
}

.reaction-buttons button {
    position: relative; /* Wichtig für die Positionierung des Zählers */
    inline-size: 50px;
    block-size: 50px;

    background-color: transparent;
    border: 1px solid var(--accent);
    border-radius: 50%;
    
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
    font-size: 1.5rem; /* Emoji Größe */
    cursor: pointer;
    transition: 
        background-color var(--transition-fast), 
        transform var(--transition-fast),
        border-color var(--transition-fast);
}

.reaction-buttons button:hover,
.reaction-buttons button:focus-visible {
    background-color: var(--accent);
    transform: scale(1.1);
    outline: none;
}

/* Aktiver Status (wenn der User geklickt hat) */
.reaction-buttons button.active {
    background-color: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

/* Der Zähler als kleines Badge oben rechts am Button */
.reaction-buttons .count {
    position: absolute;
    top: -5px;
    right: -10px;
    
    /* ERKLÄRUNG FÜR AAA: 
       Im Light Mode: Dunkler Text auf hellem Hintergrund (--bg-main)
       Im Dark Mode: Weißer Text auf sehr dunklem Blau (--bg-main)
       Beide Kombinationen nutzen deine AAA-geprüften Basisfarben.
    */
    background-color: var(--bg-main); 
    color: var(--text-main);
    
    /* Ein deutlicher Rahmen sorgt für die Trennung vom Button */
    border: 1.5px solid var(--accent);
    border-radius: 10px;
    
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 800; /* Extra fett für bessere Lesbarkeit bei kleiner Schrift */
    min-width: 20px;
    pointer-events: none;
    
    /* Verhindert Text-Smoothing Probleme auf dunklen Hintergründen */
    -webkit-font-smoothing: antialiased;
}

/* Wenn der Button gehovert wird oder aktiv ist */
.reaction-buttons button:hover .count,
.reaction-buttons button:focus-visible .count,
.reaction-buttons button.active .count {
    /* Invertierung: Der Akzent wird Hintergrund, Contrast-Farbe wird Text */
    background-color: var(--accent);
    color: var(--accent-contrast);
    border-color: var(--accent-contrast);
}
