/* =========================================
   MAIN THEME CSS (Fixed Background & Scroll)
   ========================================= */

:root{
  /* Farben */
  --bg: #0b1220;
  --surface: #121e38;   /* Etwas heller als BG */
  --surface-hover: #172645;
  --text: #e2e8f0;      /* Kühles Weiß */
  --text-muted: #94a3b8;
  --brand: #1e293b;
  
  /* Akzente */
  --gold: #f5d671;
  --gold-glow: rgba(245, 214, 113, 0.4);
  --accent-blue: #38bdf8;

  /* Struktur */
  --line: rgba(255,255,255, 0.08);
  --line-light: rgba(255,255,255, 0.15);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 30px -5px rgba(0,0,0,0.4);
  --radius: 16px;
  --max: 1140px;
  
  /* Transitions */
  --ease: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }

html { 
    height: 100%; 
    scroll-behavior: smooth; 
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  z-index: 0;
}

/* --- BACKGROUND FIX --- */
/* Statt background-attachment: fixed auf body, nutzen wir ein separates Element.
   Das verhindert Flackern und Darstellungsfehler beim Scrollen. */
body::before {
    content: "";
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    z-index: -1; /* Hinter dem Inhalt */
    background-image: 
      radial-gradient(circle at 15% 10%, rgba(56, 189, 248, 0.08), transparent 40%),
      radial-gradient(circle at 85% 30%, rgba(245, 214, 113, 0.05), transparent 40%);
    background-repeat: no-repeat;
    background-size: cover;
    pointer-events: none; /* Klicks gehen durch */
}

/* --- CUSTOM SCROLLBAR (Chrome/Safari/Edge) --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { 
    background: var(--surface-hover); 
    border-radius: 5px; 
    border: 2px solid var(--bg); 
}
::-webkit-scrollbar-thumb:hover { background: var(--line-light); }

a { 
  color: inherit; 
  text-decoration: none; 
  transition: var(--ease); 
}
a:hover { color: var(--gold); }

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }

/* Container */
.container {
  width: min(var(--max), 100% - 48px);
  margin: 0 auto;
}

/* Screenreader Utilities */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }
.skip-link { position:absolute; left:-999px; top:20px; background:var(--gold); color:#000; padding:12px 20px; border-radius:8px; z-index:9999; font-weight:bold; }
.skip-link:focus { left:20px; }

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

/* Brand */
.brand-link { display: flex; align-items: center; gap: 14px; }
.brand-logo { 
  width: 65px; height: 65px; 
  border-radius: 10px; 
}
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -0.5px; color: #fff; }
.brand-tagline { color: var(--text-muted); font-size: 12px; font-weight: 400; }

/* Navigation */
.primary-nav .menu {
  list-style: none; padding: 0; margin: 0; display: flex; gap: 8px;
}
.primary-nav .menu a {
  display: block;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}
.primary-nav .menu a:hover, 
.primary-nav .menu .current-menu-item > a {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* Mobile Toggle */
.nav-toggle { display: none; background: none; border: none; color: #fff; cursor: pointer; }

/* --- Hero Section --- */
.hero { padding: 100px 0 60px; }
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(245, 214, 113, 0.1);
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid rgba(245, 214, 113, 0.2);
}

.hero-title {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  font-weight: 800;
  margin: 0 0 20px;
  letter-spacing: -1px;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 32px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--ease);
  border: none;
}

.btn-primary {
  background: var(--gold);
  color: #0f1b33;
  box-shadow: 0 4px 14px rgba(245, 214, 113, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 214, 113, 0.4);
  background: #ffe082;
  color: #0f1b33;
}

.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: #fff;
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}

/* Stats */
.hero-stats { display: flex; gap: 16px; margin-top: 40px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 12px 20px;
  border-radius: 12px;
  min-width: 100px;
}
.stat-v { display: block; font-size: 20px; font-weight: 700; color: #fff; }
.stat-k { display: block; font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.card::before {
  content:""; position:absolute; top:0; left:0; right:0; height:1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li {
  display: flex; gap: 12px; margin-bottom: 16px; color: var(--text-muted);
}
.checklist li::before {
  content: "✓"; color: var(--gold); font-weight: bold;
}

/* --- Sections --- */
.section { padding: 100px 0; }
.section-head { margin-bottom: 48px; }
.h2 { font-size: 32px; font-weight: 700; color: #fff; margin: 0 0 10px; }

/* Grid Posts */
.grid.posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.section-actions {
  margin-top: 60px;
  display: flex;
  justify-content: center;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: var(--ease);
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-light);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}
.post-card-thumb { position: relative; padding-top: 60%; overflow: hidden; }
.post-card-thumb img {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 0; transition: transform 0.5s ease;
}
.post-card:hover .post-card-thumb img { transform: scale(1.05); }

.post-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.post-card-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.post-card-title { font-size: 20px; font-weight: 700; margin: 0 0 12px; line-height: 1.3; color: #fff; }
.post-card-excerpt { font-size: 15px; color: var(--text-muted); flex: 1; margin-bottom: 0; }

/* --- Single Page / Prose --- */
.page-header { text-align: center; margin-bottom: 60px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.page-title { font-size: clamp(32px, 4vw, 48px); font-weight: 800; color: #fff; margin-bottom: 20px; }
.page-intro { font-size: 20px; color: var(--text-muted); max-width: 700px; margin: 0 auto; }
.page-thumb { margin: -30px auto 60px; box-shadow: var(--shadow-lg); max-width: 900px; }

.page-content { max-width: 800px; margin: 0 auto; font-size: 18px; line-height: 1.8; color: #cbd5e1; }
.page-content p { margin-bottom: 24px; }
.page-content h2 { color: #fff; margin: 48px 0 24px; font-size: 28px; }
.page-content h3 { color: #fff; margin: 32px 0 16px; font-size: 22px; }
.page-content a { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }

/* --- Forms --- */
input[type="text"], input[type="email"], input[type="url"], input[type="password"], textarea, select {
  width: 100%;
  background: rgba(11, 18, 32, 0.6);
  border: 1px solid var(--line);
  color: #fff;
  padding: 14px 18px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  transition: var(--ease);
  outline: none;
}

input:focus, textarea:focus {
  border-color: var(--gold);
  background: rgba(11, 18, 32, 0.9);
  box-shadow: 0 0 0 4px rgba(245, 214, 113, 0.1);
}

/* --- Comments --- */
.comments-area {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  max-width: 800px;
  margin-left: auto; margin-right: auto;
}

.comment-list { list-style: none; padding: 0; margin: 0 0 40px; }
.comment-body {
  background: var(--surface);
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  position: relative;
}

.comment-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.fn { font-weight: bold; font-style: normal; font-size: 16px; color: #fff; }
.comment-metadata a { color: var(--text-muted); font-size: 12px; }

.comment-content p { margin: 0 0 16px; font-size: 15px; }
.reply a {
  font-size: 12px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--gold);
}

.comment-respond {
  background: var(--surface);
  padding: 32px;
  border-radius: 20px;
  border: 1px solid var(--line);
}
.comment-reply-title { font-size: 24px; font-weight: 700; display: block; margin-bottom: 24px; color: #fff; }
.comment-form p { margin-bottom: 20px; }
.comment-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }

.form-submit .submit {
  background: var(--gold);
  color: #0b1220;
  border: none;
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  transition: var(--ease);
}
.form-submit .submit:hover {
  background: #ffe082;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(245, 214, 113, 0.3);
}

/* --- Footer --- */
.site-footer {
  margin-top: 120px;
  border-top: 1px solid var(--line);
  background: #050910; 
  padding: 80px 0 0;
  font-size: 15px;
  position: relative; 
  z-index: 1; /* Über dem Background */
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.widget-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.widget-title::before {
  content:""; display:block; width:20px; height:2px; background:var(--gold); border-radius:2px;
}

.footer-menu { list-style: none; padding: 0; margin: 0; }
.footer-menu li { margin-bottom: 14px; }
.footer-menu a {
  color: var(--text-muted);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}
.footer-menu a:hover {
  color: var(--gold);
  transform: translateX(5px);
}

.footer-brand-text {
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 320px;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  padding: 30px 0;
  margin-top: 0;
}
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}
.footer-bottom a { color: inherit; text-decoration: underline; }
.footer-bottom a:hover { color: var(--gold); }

/* --- Mobile --- */
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-actions, .hero-sub, .pill { margin-left: auto; margin-right: auto; justify-content: center; }
  .grid.posts, .footer-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .primary-nav { display: none; }
}

/* =========================================
   PAGE TEMPLATE: RULES (Regeln)
   ========================================= */

/* --- Hero Section --- */
.rules-hero {
    background: linear-gradient(to bottom, var(--surface) 0%, var(--bg) 100%);
    padding: 80px 0 40px;
    text-align: center;
    border-bottom: 1px solid var(--line);
}

.rules-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.rules-hero .page-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.rules-meta {
    font-size: 14px;
    color: var(--text-muted);
    font-family: monospace;
    background: rgba(255,255,255,0.05);
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
}
.meta-date { color: var(--gold); font-weight: 700; margin-left: 5px; }

/* --- Content Area --- */
.rules-body {
    padding: 60px 0 100px;
}

.rules-content-wrapper {
    max-width: 800px; /* Optimale Lesebreite */
    margin: 0 auto;
    font-size: 17px;
    color: var(--text);
}

/* --- Automatische Styles für Editor-Inhalte --- */

/* 1. Einleitungstext (Paragraphs) */
.rules-content-wrapper p {
    margin-bottom: 24px;
    line-height: 1.7;
}

/* 2. Sektions-Überschriften (H2) */
.rules-content-wrapper h2 {
    font-size: 24px;
    color: var(--gold);
    margin-top: 60px;
    margin-bottom: 24px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Kleines Icon vor H2 (Optional, rein dekorativ) */
.rules-content-wrapper h2::before {
    content: "§";
    background: rgba(245, 214, 113, 0.1);
    color: var(--gold);
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
    font-size: 18px;
}

/* 3. Die Regeln (Geordnete Liste <ol>) */
.rules-content-wrapper ol {
    list-style: none; /* Standard-Nummern ausblenden */
    counter-reset: rule-counter; /* Zähler starten */
    padding: 0;
    margin: 0 0 40px 0;
    display: grid;
    gap: 16px;
}

.rules-content-wrapper ol li {
    counter-increment: rule-counter;
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 20px 24px 20px 60px; /* Platz links für die Nummer */
    border-radius: 12px;
    position: relative;
    transition: all 0.2s ease;
}

.rules-content-wrapper ol li:hover {
    border-color: var(--gold);
    background: rgba(255,255,255,0.03);
    transform: translateX(5px);
}

/* Die Nummer (1, 2, 3...) als schickes Badge */
.rules-content-wrapper ol li::before {
    content: counter(rule-counter);
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-weight: 800;
    font-size: 14px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line);
}

.rules-content-wrapper ol li:hover::before {
    background: var(--gold);
    color: #0b1220;
    border-color: var(--gold);
}

/* Verschachtelte Listen (z.B. 1.1, 1.2) - einfacher Style */
.rules-content-wrapper ol ul, .rules-content-wrapper ol ol {
    margin-top: 12px;
    gap: 8px;
    display: flex;
    flex-direction: column;
}
.rules-content-wrapper ol li ul li {
    background: transparent;
    border: none;
    padding: 0 0 0 20px;
    font-size: 15px;
    color: var(--text-muted);
}
.rules-content-wrapper ol li ul li::before {
    content: "•";
    background: none; border: none;
    color: var(--gold);
    left: 0;
    width: auto;
}

/* Wichtige Hinweise (Boxen) */
.rules-content-wrapper .has-background {
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--line);
}

.rules-footer-actions {
    text-align: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--line);
}

/* Styles für Rechtliches / Impressum Template */
.page-template-page-impressum .card.prose {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.legal-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--text-muted);
}