/* CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* CSS Variables — DarkGlassUI (siehe DarkGlassUI.md): EINE Akzentfarbe #4a9eff */
:root {
    --primary: #4a9eff;
    --primary-dark: #3a86e0;
    --bg: #0a0a0a;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-light: rgba(255, 255, 255, 0.08);
    --text: rgba(255, 255, 255, 1);
    --text-muted: rgba(255, 255, 255, 0.55);
    --accent: #4a9eff;
    --border: rgba(255, 255, 255, 0.12);
    --max-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --transition: 0.3s ease;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

.landingbody {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);

    /* BACKGROUND IMAGE PLACEHOLDER - Replace YOUR_BACKGROUND.jpg with your image path */
    background-image:
            linear-gradient(to bottom, rgba(10, 10, 10, 0.35), rgba(10, 10, 10, 0.65)),
            url("../img/bg.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Voll-Höhen-Hintergrund für schlichte PublicLayout-Seiten (z. B. /account/reset-request):
   identisch zum .landingbody-Look, statt einer opaken Fläche, die auf Seiten mit eigenem
   .landingbody-Markup (z. B. /regeln) das Body-Hintergrundbild verdecken würde. */
.public-shell {
    min-height: 100vh;
    background-color: var(--bg);
    background-image:
            linear-gradient(to bottom, rgba(10, 10, 10, 0.35), rgba(10, 10, 10, 0.65)),
            url("../img/bg.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: var(--spacing-sm) 0;
}

.header__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.header__logo {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header__nav {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.nav__link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color var(--transition);
    padding: 0.5rem 0;
}

.nav__link:hover,
.nav__link:focus {
    color: var(--primary);
    outline: none;
}

/* Hero Section */
.hero {
    padding: var(--spacing-xl) 0;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero__content {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.hero__badge {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    width: 100%;
    margin-bottom: 25px;
    margin-top: -25px;
}

.hero__title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    color: var(--text);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.hero__description {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
}

.hero__cta {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

.btn--primary {
    background: var(--primary);
    color: white;
}

.btn--primary:hover,
.btn--primary:focus {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    outline: none;
}

.btn--secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.btn--secondary:hover,
.btn--secondary:focus {
    border-color: var(--primary);
    color: var(--primary);
    outline: none;
}

.btn--large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

/* Section Base */
.section {
    padding: var(--spacing-xl) 0;
}

.section__title {
    font-size: clamp(2rem, 5vw, 2.75rem);
    margin-bottom: var(--spacing-sm);
    text-align: center;
    font-weight: 700;
}

.section__intro {
    text-align: center;
    color: var(--text-muted);
    font-size: clamp(1rem, 2vw, 1.125rem);
    margin-bottom: var(--spacing-lg);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Features Section */
.features {
    background: var(--surface);
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.card {
    background: var(--surface-light);
    padding: var(--spacing-md);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.15);
}

.card__icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.card__title {
    font-size: 1.375rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.card__text {
    color: var(--text-muted);
    line-height: 1.7;
}

.card__list {
    list-style: none;
    margin-top: var(--spacing-sm);
    color: var(--text-muted);
}

.card__list li {
    padding: 0.375rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.card__list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary);
}

.card--accent {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
}

/* Einreise Section */
.steps {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
}

.step {
    display: flex;
    gap: var(--spacing-md);
    background: var(--surface);
    padding: var(--spacing-md);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: border-color var(--transition);
}

.step:hover {
    border-color: var(--primary);
}

.step__number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.step__content {
    flex: 1;
}

.step__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.step__text {
    color: var(--text-muted);
    line-height: 1.7;
}

.einreise__note {
    background: var(--surface);
    padding: var(--spacing-md);
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Wege Section */
.wege {
    background: var(--surface);
}

.wege__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

/* Community Section */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.stat {
    text-align: center;
    padding: var(--spacing-md);
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.stat__icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.stat__label {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat__text {
    color: var(--text-muted);
}

/* Kontakt Section */
.kontakt {
    background: var(--surface);
}

.kontakt__links {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.kontakt__info {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.kontakt__info p {
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.kontakt__methods {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.kontakt__link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition);
}

.kontakt__link:hover,
.kontakt__link:focus {
    color: var(--accent);
    outline: none;
}

/* Footer */
.footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: var(--spacing-md) 0;
    text-align: center;
}

.footer__text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer__hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header__nav {
        width: 100%;
        justify-content: center;
        gap: var(--spacing-sm);
    }

    .nav__link {
        font-size: 0.875rem;
    }

    .hero {
        padding: var(--spacing-lg) 0;
        min-height: auto;
    }

    .section {
        padding: var(--spacing-lg) 0;
    }

    .features__grid,
    .wege__grid {
        grid-template-columns: 1fr;
    }

    .step {
        flex-direction: column;
        text-align: center;
    }

    .step__number {
        margin: 0 auto;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .hero__cta,
    .kontakt__links {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .header__logo {
        font-size: 1.125rem;
    }

    .card {
        padding: var(--spacing-sm);
    }
}

/* Focus Styles for Accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.thead .mud-table-head {
    border-bottom: 2px solid var(--mud-palette-primary) !important;
}

/* ============================================================
   Regelwerk-Seite (/regeln) — nutzt das DarkGlass-System oben
   ============================================================ */

/* Kompakter Hero (Regelwerk-Kopf, nicht 90vh wie die Startseite) */
.hero--compact {
    min-height: auto;
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

/* Anker-Offset, damit Sprungmarken nicht unter dem Sticky-Header landen */
.rules__section {
    scroll-margin-top: 90px;
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
}

/* Inhaltsverzeichnis / Sprungmarken */
.toc {
    max-width: 900px;
    margin: 0 auto var(--spacing-lg);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: var(--spacing-md);
}

.toc__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text);
}

.toc__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-xs) var(--spacing-md);
}

.toc__link {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.4rem 0;
    transition: color var(--transition);
}

.toc__link:hover,
.toc__link:focus {
    color: var(--primary);
    outline: none;
}

.toc__num {
    flex-shrink: 0;
    color: var(--primary);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Regel-Liste innerhalb einer Kategorie-Card */
.rules__list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.rule {
    display: flex;
    gap: var(--spacing-sm);
    align-items: baseline;
}

.rule__num {
    flex-shrink: 0;
    min-width: 2.75rem;
    color: var(--primary);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.rule__text {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

.rule__text strong {
    color: var(--text);
}

/* Aufzählung innerhalb einer Regel (z. B. Roleplay 14) */
.rule__sublist {
    list-style: none;
    margin-top: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rule__sublist li {
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.rule__sublist li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* "Nach oben"-Link am Ende jeder Kategorie */
.rules__top {
    display: inline-block;
    margin-top: var(--spacing-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.rules__top:hover,
.rules__top:focus {
    color: var(--primary);
    outline: none;
}

@media (max-width: 768px) {
    .rule__num {
        min-width: 2.25rem;
    }

    .toc__grid {
        grid-template-columns: 1fr;
    }
}

/* Dunklere, deckendere Flächen für bessere Lesbarkeit der Regeltexte
   (statt der hellen Glas-Card var(--surface-light) über dem BG-Bild). */
.rules__section .card,
.features__grid .card,
.wege__grid .card,
.steps .step,
.stats .stat,
.toc {
    background: rgba(8, 8, 8, 0.78);
}

.rules__section .card:hover,
.features__grid .card:hover,
.wege__grid .card:hover,
.steps .step:hover,
.stats .stat:hover {
    background: rgba(8, 8, 8, 0.85);
}
/* Ticket-Kategorien: Drag-&-Drop-Reihenfolge */
.cat-drag-row {
    border-radius: 6px;
    transition: background-color 120ms ease;
}

.cat-drag-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Trenner zwischen den Zeilen, letzte Zeile ohne Linie */
.mud-drop-item:not(:last-child) .cat-drag-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Platzhalter-/Vorschau-Styling beim Ziehen */
.mud-drop-item-preview .cat-drag-row {
    background: rgba(255, 255, 255, 0.08);
    opacity: 0.7;
}
