:root {
    --primary: #2a6ce5;
    --secondary: #d53d95;
    --text-dark: #333;
    --text-light: #fff;
    --footer-bg: #000000;
    --border-color: rgba(0,0,0,0.1);
}

/* --- HINTERGRUND-LAYER --- */
.fixed-background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    /* Bild wird aus Performance-Gründen via JS nur auf der Startseite geladen */
    background-color: #ffffff; /* Fallback für Light Mode */
    background-size: cover;
    background-position: center;
    z-index: -1;
    transform: translateZ(0);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: transparent;
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.6;
    box-sizing: border-box;
    position: relative;
    overflow-x: hidden;
    /* Flex Layout für den Footer Stick-to-bottom Effekt */
    display: flex;
    flex-direction: column;
}

/* =========================
   HEADER (Tabbar)
   ========================= */
.top-header {
    position: fixed;
    top: 0;
    z-index: 100;
    background: transparent;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 20px 30px;
    width: 100%;
    box-sizing: border-box;
    transition: background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 0;
}

/* ZUSTAND: GESCROLLT (Solid Background) */
.top-header.scrolled {
    background-color: #ffffff;
    padding-top: 15px;
    padding-bottom: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.top-header.scrolled .tab-btn { color: #333; text-shadow: none; }
.top-header.scrolled .logo img { filter: none; }
.top-header.scrolled .logo-text { color: #333; text-shadow: none; }
.top-header.scrolled .hamburger-icon span { background: #333; }
.top-header.scrolled .lang-picker select { color: #333; border-color: #ccc; }
.top-header.scrolled .tab-indicator { background: rgba(0,0,0,0.1); }

/* LOGO */
.logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 102;
    transition: transform 0.3s ease;
}
.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: filter 0.3s ease;
}
.logo-text {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-left: 10px;
    letter-spacing: -0.5px;
    transition: color 0.3s ease;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* TABS */
.nav-tabs {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    padding: 4px;
    background: transparent;
    border-radius: 999px;
}
.tab-indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    transition: transform 0.25s ease, opacity 0.2s ease, background-color 0.3s;
    z-index: 0;
}
.tab-btn {
    position: relative;
    z-index: 1;
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    color: #eee;
    border-radius: 999px;
    white-space: nowrap;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    transition: color 0.3s;
}
.tab-btn:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.2s ease;
}
.tab-btn.active::after, .tab-btn:has(+ .tab-btn.active)::after { opacity: 0 !important; }
.tab-btn.active { color: #fff; font-weight: 600; }
.tab-btn:focus { outline: none; }

/* LANG PICKER */
.lang-picker select {
    appearance: none;
    -webkit-appearance: none;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.3);
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: #fff;
    text-align: center;
    line-height: 1.2;
    transition: all 0.3s ease;
}
.lang-picker select option { color: #333; }

/* MOBILE MENU */
.hamburger-btn {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 10px;
    z-index: 200;
}
.hamburger-icon {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.hamburger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.mobile-menu-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: #fff;
    box-shadow: 5px 0 30px rgba(0,0,0,0.1);
    z-index: 199;
    padding-top: 100px;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.mobile-menu-overlay.show { transform: translateX(0); }
.mobile-menu-overlay button {
    display: block;
    width: 100%;
    padding: 20px 30px;
    text-align: left;
    background: transparent;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}
.mobile-menu-overlay button:hover { background: #f9f9f9; }
.menu-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 198;
    opacity: 0;
    transition: opacity 0.3s;
}
.menu-backdrop.show { display: block; opacity: 1; }

/* CONTENT & HERO */
.content-section {
    display: none;
    width: 100%;
    box-sizing: border-box;
    /* Wichtig damit Footer nach unten rutscht */
    flex: 1;
}
.fullscreen-hero {
    height: 100vh;
    width: 100%;
    background: transparent;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    padding: 40px;
    box-sizing: border-box;
    position: relative;
}
.hero-text-bottom-right {
    text-align: right;
    max-width: 800px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    margin-bottom: 40px;
}
.hero-text-bottom-right h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin: 0;
    font-weight: 800;
}
.white-content-wrapper {
    background-color: #fff;
    position: relative;
    z-index: 10;
    min-height: 100vh;
    padding: 120px 40px 60px 40px;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- HINGE STYLE GRID --- */
.hinge-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1100px;
    width: 100%;
    text-align: left;
    margin: 0 auto;
}
.hinge-left { display: flex; flex-direction: column; justify-content: flex-start; }
.hinge-headline {
    font-family: "Times New Roman", Times, serif;
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 400;
    margin: 0;
    letter-spacing: -1px;
}
.hinge-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 300px;
    gap: 20px;
}
.hinge-text { font-size: 1.1rem; line-height: 1.6; margin: 0; opacity: 0.9; }

/* DOWNLOAD BUTTON */
.download-pill-btn {
    display: inline-block;
    background-color: #fff;
    color: #000;
    text-decoration: none;
    padding: 16px 36px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 20px;
    width: fit-content;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
    text-align: center;
}
.download-pill-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

/* LEGAL TEXTE & TABELLEN */
#content-privacy, #content-terms, #content-imprint, #content-rules { padding-top: 0; }

.legal-text h2 { margin-top: 40px; margin-bottom: 20px; font-size: 2rem; }
.legal-text h3 { margin-top: 30px; margin-bottom: 15px; font-size: 1.4rem; }
.legal-text h4 { margin-top: 25px; margin-bottom: 10px; font-size: 1.1rem; }
.legal-text p, .legal-text ul { margin-bottom: 15px; line-height: 1.6; }
.legal-text ul { padding-left: 20px; }

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0 30px 0;
    font-size: 0.95rem;
    background-color: #fff;
}
.legal-table th, .legal-table td {
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    text-align: left;
    vertical-align: top;
}
.legal-table th {
    background-color: rgba(0,0,0,0.03);
    font-weight: 600;
}

/* --- HILFE TAB LAYOUT --- */
#content-help {
    /* Auto height, damit Footer erreichbar ist */
    height: auto;
    min-height: 100vh;
    padding-top: 0;
}

.help-wrapper {
    height: auto !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding: 120px 20px 60px 20px !important;
    box-sizing: border-box !important;
    background-color: #fff;
}

.help-scroll-container {
    width: 100%;
    max-width: 800px;
    margin-bottom: 40px;
}

/* FAQ STYLES */
.faq-container { width: 100%; text-align: left; }
.faq-item { border-bottom: 1px solid var(--border-color); }
.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: inherit;
    cursor: pointer;
    outline: none;
}
.faq-question:hover { opacity: 0.7; }
.faq-icon { font-size: 1.5rem; font-weight: 300; transition: transform 0.3s ease; line-height: 1; }
.faq-question.active .faq-icon { transform: rotate(45deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    opacity: 0;
}
.faq-answer p {
    margin: 0;
    padding-bottom: 20px;
    opacity: 0.8;
    font-size: 1rem;
    line-height: 1.5;
}
.faq-item.active .faq-answer { opacity: 1; }

/* GLOBAL FOOTER */
footer {
    position: relative;
    width: 100%;
    background-color: var(--footer-bg);
    /* Padding auf Minimum reduziert */
    padding: 30px 20px;
    text-align: center;
    font-size: 0.85rem;
    color: #fff;
    box-sizing: border-box;
    z-index: 10;
    margin-top: auto;
}
/* Verhindert dass das Hintergrundbild unter dem Footer durchscheint (Overscroll) */
footer::after {
    content: "";
    display: block;
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: var(--footer-bg);
}
.footer-content { display: flex; flex-direction: column; gap: 5px; }
.footer-title { font-weight: bold; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; color: #fff; }

/* Footer Links */
.footer-legal-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-legal-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s;
}
.footer-legal-links a:hover {
    color: #fff;
    text-decoration: underline;
}

/* MOBILE */
@media (max-width: 700px) {
    .top-header { display: flex; justify-content: space-between; padding: 15px 20px; }
    .hamburger-btn { display: block; order: 1; }
    .logo { order: 2; position: absolute; left: 50%; transform: translateX(-50%); }
    .logo img { height: 32px; }
    .logo-text { font-size: 1.3rem; margin-left: 8px; }
    .lang-picker { order: 3; display: block; }
    .nav-tabs { display: none; }
    .hero-text-bottom-right h1 { font-size: 2.2rem; }
    .fullscreen-hero { padding: 20px; }
    .white-content-wrapper { padding-top: 80px; padding-left: 20px; padding-right: 20px; }
    .hinge-grid { grid-template-columns: 1fr; gap: 150px; }
    .hinge-headline { font-size: 2.5rem; }
    .hinge-right { padding-top: 0; justify-content: flex-start; }
}

/* DARK MODE */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #eee;
        --footer-bg: #000;
        --border-color: rgba(255,255,255,0.15);
    }
    body { background: transparent; }
    .top-header.scrolled { background-color: #000000; }
    .top-header.scrolled .tab-btn { color: #fff; }
    .top-header.scrolled .logo img { filter: none; }
    .top-header.scrolled .hamburger-icon span { background: #fff; }
    .top-header.scrolled .lang-picker select { color: #fff; }
    .top-header.scrolled .logo-text { color: #fff; }

    /* FIX: Pille im Dark Mode sichtbar machen */
    .top-header.scrolled .tab-indicator { background: rgba(255,255,255,0.2); }

    .fixed-background-layer { background-color: #000000; }
    .white-content-wrapper { background-color: #000; box-shadow: 0 -10px 30px rgba(0,0,0,0.5); }
    .help-wrapper { background-color: #000 !important; }
    .mobile-menu-overlay { background: rgba(28, 28, 30, 0.95); border-right: 1px solid #333; }
    .mobile-menu-overlay button { color: #fff; border-bottom-color: #333; }
    .mobile-menu-overlay button:hover { background: #333; }

    .download-pill-btn { background-color: #fff; color: #000; border-color: transparent; }

    .legal-table { background-color: transparent; }
    .legal-table th { background-color: rgba(255,255,255,0.05); }
}
