:root {
  --primary: #0a66c2;
  --primary-dark: #084b8e;
  --accent: #f0b400;
  --bg: #f9fafb;
  --fg: #1f2937;
  --border: #e5e7eb;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
}
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
       background: var(--bg); color: var(--fg); line-height: 1.6; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video, iframe { max-width: 100%; display: block; }

/* ==================== Header ==================== */
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top:0; z-index: 100; }
.header-inner { display:flex; justify-content:space-between; align-items:center; padding:12px 20px; }
.logo { display:flex; gap:10px; align-items:center; font-weight:700; font-size:1.3rem; color: var(--fg); }
.logo img { height:48px; width:auto; }
.main-nav { display:flex; gap:22px; align-items:center; }
.main-nav a { color: var(--fg); font-weight:500; }
.nav-donate { color: #e11d48 !important; font-weight:600; }

/* ==================== Buttons ==================== */
.btn { display:inline-block; padding:10px 18px; border-radius: var(--radius); border:1px solid var(--border);
       background:#fff; cursor:pointer; font-weight:500; text-decoration:none; color: var(--fg); }
.btn-primary { background: var(--primary); color:#fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-link { border:none; background:none; color: var(--primary); }

/* ==================== Blog ==================== */
.post-list, .downloads-grid, .live-grid { display:grid; gap:24px; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); margin: 24px 0; }
.post-card, .download-card, .live-card { background:#fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow:hidden; padding:0 0 16px; }
.post-card h2, .download-card h2, .live-card h2,
.post-card h3, .download-card h3, .live-card h3 { padding: 0 16px; }
.post-card p, .download-card p, .live-card p { padding: 0 16px; }
.post-thumb { width:100%; height:180px; object-fit:cover; }
.post-content { margin: 24px 0; font-size: 1.05rem; }
.ad-block { margin: 24px 0; border:1px dashed var(--border); border-radius: var(--radius); }
figure { margin: 16px 0; }
figcaption { font-size:.9rem; color:#6b7280; margin-top:6px; }

/* ==================== Hero ==================== */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  background: linear-gradient(135deg, #0a66c2 0%, #084b8e 100%);
  color: #fff;
  padding: 60px 40px;
  border-radius: 16px;
  margin: 32px 0;
  box-shadow: 0 10px 40px rgba(10,102,194,.25);
}
.hero-content h1 { font-size: 3rem; margin: 0 0 8px; }
.hero-sub { font-size: 1.2rem; opacity: .9; margin: 0 0 16px; font-weight: 500; }
.hero-desc { font-size: 1.05rem; opacity: .95; margin: 0 0 28px; max-width: 640px; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.hero-actions .btn:hover { background: rgba(255,255,255,.25); }
.hero-actions .btn-primary { background: #fff; color: var(--primary); border-color: #fff; }
.hero-actions .btn-primary:hover { background: #f0f6ff; }
.hero-stats { display: flex; flex-direction: column; gap: 20px; text-align: right; }
.hero-stats > div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 2.2rem; font-weight: 700; line-height: 1; }
.hero-stats span { font-size: .9rem; opacity: .85; }

/* ==================== Sections ==================== */
.home-section { margin: 48px 0; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.section-header h2 { margin: 0; font-size: 1.6rem; }
.link-more { font-weight: 500; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.top-list { list-style: none; padding: 0; counter-reset: top; }
.top-list li { counter-increment: top; display: flex; justify-content: space-between; gap: 12px;
               padding: 10px 0; border-bottom: 1px solid var(--border); }
.top-list li::before { content: counter(top) "."; color: var(--primary); font-weight: 700; margin-right: 8px; }
.top-list li a { flex: 1; }
.top-list li span { color: #6b7280; font-size: .9rem; }
.donate-teaser { background: #fff; border-radius: var(--radius); padding: 28px;
                 box-shadow: var(--shadow); border-left: 4px solid #e11d48; }
.donate-teaser h2 { margin-top: 0; color: #e11d48; }
.ad-block-home { margin: 40px 0; padding: 0; border-radius: var(--radius); overflow: hidden; }

/* ==================== Download Countdown ==================== */
#download-counter { background:#fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin: 24px 0; }
.ad-container { min-height: 120px; display:flex; align-items:center; justify-content:center; margin-bottom: 16px; }
.countdown-text { font-size: 1.15rem; text-align:center; }
.progress-bar { height: 8px; background: var(--border); border-radius: 4px; overflow:hidden; }
.progress-bar > div { height:100%; background: var(--primary); width:0; transition: width 1s linear; }

/* ==================== Cookie Banner ==================== */
.cookie-banner { position: fixed; inset: 0; background: rgba(0,0,0,.55); display:flex; align-items:flex-end; justify-content:center; z-index: 9999; }
.cookie-inner { background:#fff; padding: 24px; max-width: 720px; width: 100%; border-radius: var(--radius) var(--radius) 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.2); }
.cookie-inner h2 { margin-top:0; }
.cookie-details { margin: 12px 0; padding: 12px; background:#f3f4f6; border-radius: var(--radius); }
.cookie-details label { display:block; margin:8px 0; }
.cookie-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top: 12px; }
.cookie-reopen { position: fixed; bottom:16px; right:16px; background:#fff; border:1px solid var(--border); border-radius:50%; width:44px; height:44px; cursor:pointer; box-shadow: var(--shadow); z-index: 999; }

/* ==================== Footer ==================== */
.site-footer { background:#111827; color: #d1d5db; margin-top: 60px; padding: 40px 0 0; }
.footer-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 24px; }
.site-footer a { color: #93c5fd; }
.site-footer ul { list-style: none; padding:0; margin:0; }
.footer-bottom { text-align:center; padding: 16px; border-top:1px solid #1f2937; margin-top: 24px; font-size:.9rem; }
.small { font-size:.85rem; color:#6b7280; }

/* ==================== Spenden ==================== */
.donate-form { display:none; gap:14px; max-width: 480px; background:#fff; padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); }
.donate-form label { display:none; flex-direction:column; gap:6px; font-weight:500; }
.donate-form input, .donate-form textarea { padding:10px; border:1px solid var(--border); border-radius: var(--radius); font: inherit; }

/* ==================== 404 ==================== */
.error-page { text-align: center; padding: 80px 20px; }
.error-page h1 { font-size: 6rem; margin: 0; color: var(--primary); line-height: 1; }
.error-page p { font-size: 1.15rem; margin: 16px 0 32px; }

/* ======================================================
   LIVE-ANWENDUNG – Vollbild ohne Header/Footer
   ====================================================== */
body.live-mode {
  background: #000;
  overflow-x: hidden;
}

/* ==================== Live-Modus: Footer komplett killen ==================== */
body.live-mode .site-footer,
body.live-mode footer {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  overflow: hidden !important;
  visibility: hidden !important;
  line-height: 0 !important;
  font-size: 0 !important;
}

body.live-mode main,
body.live-mode main.container {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  min-height: 98% !important;
}

body.live-mode .container {
  min-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Wrapper füllt gesamten Viewport */
#live-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Countdown-Bildschirm */
.live-countdown {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  color: #fff;
  text-align: center;
  padding: 24px;
}
.live-countdown-inner h1 {
  margin: 0 0 12px;
  font-size: 1.8rem;
  color: #fff;
}
.live-countdown-inner p {
  font-size: 1.1rem;
  color: #d1d5db;
  margin: 0;
}
#lc-num {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.4rem;
}

/* Frame-Container füllt gesamten Wrapper */
#live-frame-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}
#live-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
  display: block;
}

/* ==================== Dezente Toolbar oben rechts ==================== */
.live-toolbar {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 20;
  display: flex;
  gap: 6px;
  opacity: 0.35;
  transition: opacity 0.2s ease;
}
#live-frame-container:hover .live-toolbar,
.live-toolbar:focus-within {
  opacity: 1;
}
.live-icon-btn {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px;
  min-height: 34px;
  padding: 0 !important;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  text-decoration: none;
  box-shadow: none;
  flex-shrink: 0;
}
/* SVG in Buttons immer klein halten */
.live-icon-btn svg,
.btn svg {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  flex-shrink: 0;
  display: block;
}

.live-icon-btn:hover {
  background: rgba(0, 0, 0, 0.75);
  transform: scale(1.08);
  text-decoration: none;
  color: #fff;
}
.live-icon-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ==================== Fullscreen-Modus ==================== */
#live-wrapper.fullscreen-active {
  position: fixed;
  inset: 0;
  z-index: 9998;
}
#live-wrapper.fullscreen-active .live-toolbar {
  opacity: 0.25;
}
#live-wrapper.fullscreen-active .live-toolbar:hover {
  opacity: 1;
}

/* ==================== Slide-Ad ==================== */
.slide-ad {
  position: fixed;
  top: 50%;
  right: -400px;
  width: 340px;
  max-width: 90vw;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(-50%);
  transition: right 0.4s ease-in-out;
  z-index: 9999;
  border-top: 4px solid var(--accent);
}
.slide-ad.show { right: 16px; }
.slide-ad-close {
  position: absolute;
  top: 6px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
}
.slide-ad-inner { padding: 24px 20px; }

/* ==================== Cookie-Banner über Live ==================== */
body.live-mode .cookie-banner { z-index: 100000; }
body.live-mode .cookie-reopen { z-index: 99999; }

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; padding: 40px 24px; text-align: center; }
  .hero-content h1 { font-size: 2.2rem; }
  .hero-actions { justify-content: center; }
  .hero-stats { flex-direction: row; justify-content: center; gap: 32px; text-align: center; }
  .two-columns { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .main-nav { gap: 14px; font-size: .9rem; }
}

/* ==================== Spenden-Links & Teaser ausblenden ==================== */
.nav-donate,
.donate-teaser,
a[href="/spende.php"] {
  display: none !important;
}