/* ---------------------------------- */
/* --- 1. GRUNDEINSTELLUNGEN & VARIABLEN --- */
/* ---------------------------------- */
:root {
    --bg-main: #1a1d23;
    --bg-secondary: #242831;
    --bg-tertiary: #2d3139;
    --bg-card-rgb: 36, 40, 49;
    --bg-input: rgba(26, 29, 35, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #b8bec8;
    --text-muted: #6c7380;
    --accent-blue: #1e88e5;
    --accent-cyan: #00d4ff;
    --dark-gray: #4b5563;
    --status-green: #10B981;
    --status-yellow: #F59E0B;
    --status-red: #EF4444;
    --alert-green: rgba(16, 185, 129, 0.2);
    --alert-red: rgba(239, 68, 68, 0.2);
    --bg-footer: #0f1116;
    --bg-footer-bottom: #0a0c10;
}

html {
    background-color: var(--bg-main);
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---------------------------------- */
/* --- 2. LAYOUT & HINTERGRUND --- */
/* ---------------------------------- */
body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-wrapper {
    padding: 2rem;
    flex-grow: 1;
}

.main-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ---------------------------------- */
/* --- 3. GLASSMORPHISM CONTAINER --- */
/* ---------------------------------- */
.glass-container {
    background: rgba(var(--bg-card-rgb), 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ---------------------------------- */
/* --- 4. TYPOGRAFIE & BASIS-ELEMENTE --- */
/* ---------------------------------- */
h1,
h2,
h3,
h4 {
    font-weight: 600;
    color: var(--text-primary);
}

h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

p {
    color: var(--text-secondary);
    line-height: 1.6;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-cyan);
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ---------------------------------- */
/* --- 5. NAVIGATION (exakt wie Ticketsystem) --- */
/* ---------------------------------- */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(26, 29, 35, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    height: 36px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--text-primary);
}

/* --- Page Header (wie Ticketsystem) --- */
.page-header h1 {
    margin-bottom: 0.25rem;
}

/* ---------------------------------- */
/* --- 6. BUTTONS (wie Ticketsystem) --- */
/* ---------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #1e88e5, #1565c0);
    color: var(--text-primary);
    box-shadow: 0 4px 16px rgba(30, 136, 229, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2196f3, #1e88e5);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(30, 136, 229, 0.4);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--dark-gray);
    transform: translateY(-2px);
}

/* ---------------------------------- */
/* --- 7. STATS-KARTEN (wie Ticketsystem) --- */
/* ---------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    border-color: rgba(30, 136, 229, 0.3);
}

.stat-card .icon {
    font-size: 1.5rem;
    color: var(--accent-blue);
    margin-bottom: 1rem;
}

.stat-card .value {
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-card .label {
    color: var(--text-secondary);
}

/* ---------------------------------- */
/* --- 8. ANIMATIONEN (wie Ticketsystem) --- */
/* ---------------------------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated-component {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.animated-component:nth-child(1) {
    animation-delay: 0.1s;
}

.animated-component:nth-child(2) {
    animation-delay: 0.2s;
}

.animated-component:nth-child(3) {
    animation-delay: 0.3s;
}

.animated-component:nth-child(4) {
    animation-delay: 0.4s;
}

/* IntersectionObserver-basierte Animationen */
.animate-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------------------------------- */
/* --- 9. HAUPT-FOOTER (wie Ticketsystem) --- */
/* ---------------------------------- */
.main-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    margin-top: 2rem;
    background: var(--bg-footer);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.main-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* ---------------------------------- */
/* --- 10. DATEN-TABELLEN (wie Ticketsystem) --- */
/* ---------------------------------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th,
.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table thead {
    background-color: rgba(0, 0, 0, 0.2);
}

.data-table th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.data-table tbody tr {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.data-table tbody tr:hover {
    transform: translateY(-2px);
    background-color: var(--bg-tertiary);
    cursor: pointer;
}

/* ---------------------------------- */
/* --- 11. RESPONSIVE (wie Ticketsystem) --- */
/* ---------------------------------- */
@media (max-width: 768px) {
    .page-wrapper {
        padding: 1rem;
    }

    .main-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .main-container {
        gap: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}


/* =================================================================== */
/* ===== REGELWERK SPEZIFISCH (Erweiterung des Ticketsystem-Designs) === */
/* =================================================================== */

/* --- Zwei-Spalten-Layout (wie Ticket-Detailansicht) --- */
.regelwerk-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: flex-start;
}

/* --- Sidebar Navigation --- */
.sidebar-nav-card {
    position: sticky;
    top: 80px;
}

.sidebar-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.sidebar-nav li a i {
    font-size: 0.8rem;
    width: 18px;
    text-align: center;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.sidebar-nav li a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar-nav li a:hover i {
    color: var(--accent-blue);
}

.sidebar-nav li a.active {
    background: rgba(30, 136, 229, 0.15);
    color: var(--text-primary);
    font-weight: 600;
}

.sidebar-nav li a.active i {
    color: var(--accent-blue);
}

.sidebar-nav .nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.sidebar-nav .nav-section-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 0.4rem 0.85rem 0.15rem;
    margin-top: 0.25rem;
}

/* --- Sidebar System Status (wie Ticketsystem Admin-Dashboard) --- */
.sidebar-info-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-info-card h3 i {
    color: var(--accent-blue);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    font-size: 0.85rem;
}

.info-row .label {
    color: var(--text-secondary);
}

.info-row .value {
    font-weight: 600;
}

.info-row .value.green {
    color: var(--status-green);
}

.info-row .value.yellow {
    color: var(--status-yellow);
}

/* --- Rechte Seite: Regelsektionen --- */
.rules-main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* --- Section Cards --- */
.rule-section {
    scroll-margin-top: 90px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    color: #fff;
}

.section-badge.allgemein {
    background: linear-gradient(135deg, #1e88e5, #1565c0);
}

.section-badge.roleplay {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.section-badge.failrp {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.section-badge.metagaming {
    background: linear-gradient(135deg, #10b981, #059669);
}

.section-badge.sonstiges {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.section-badge.fraktionen {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.section-badge.discord {
    background: linear-gradient(135deg, #5865F2, #4752c4);
}

.section-badge.ingame {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.section-badge.civilian {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.section-badge.berechtigungen {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
}

.section-badge.vorschriften {
    background: linear-gradient(135deg, #e11d48, #be123c);
}

.section-header h2 {
    margin-bottom: 0;
    font-size: 1.3rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

/* --- Regellisten --- */
.rule-list {
    list-style: none;
    counter-reset: rule-counter;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rule-list>li {
    counter-increment: rule-counter;
    display: flex;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s ease;
    line-height: 1.7;
    color: var(--text-secondary);
}

.rule-list>li:hover {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(30, 136, 229, 0.15);
    transform: translateX(4px);
}

.rule-list>li::before {
    content: counter(rule-counter) ".";
    font-weight: 700;
    color: var(--accent-blue);
    font-size: 0.95rem;
    min-width: 26px;
    padding-top: 1px;
}

.rule-list>li .sub-note {
    display: block;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.rule-list>li .sub-list {
    list-style: disc;
    margin-top: 0.5rem;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.rule-list>li .sub-list li {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Info Box --- */
.info-box {
    padding: 1.15rem 1.5rem;
    border-radius: 10px;
    background: rgba(30, 136, 229, 0.08);
    border: 1px solid rgba(30, 136, 229, 0.15);
}

.info-box p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* --- Disclaimer Box --- */
.disclaimer-box {
    padding: 1.25rem 1.75rem;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    text-align: center;
}

.disclaimer-box i {
    color: var(--status-yellow);
    margin-right: 0.5rem;
}

.disclaimer-box p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.disclaimer-box strong {
    color: var(--status-yellow);
}

/* --- Subsection Titles --- */
.subsection-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.75rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.subsection-title i {
    color: var(--accent-blue);
    margin-right: 0.5rem;
}

.section-intro {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* --- CIV-Stufen Karten --- */
.civ-stufe-card {
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s ease;
}

.civ-stufe-card:hover {
    border-color: rgba(30, 136, 229, 0.15);
}

.civ-stufe-card .stufe-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.civ-stufe-card .stufe-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
}

.civ-stufe-card .stufe-number.stufe-1 {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.civ-stufe-card .stufe-number.stufe-2 {
    background: linear-gradient(135deg, #1e88e5, #1565c0);
}

.civ-stufe-card .stufe-number.stufe-3 {
    background: linear-gradient(135deg, #10b981, #059669);
}

.civ-stufe-card .stufe-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.civ-stufe-card .stufe-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.civ-stufe-card .stufe-col h4 {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.civ-stufe-card .stufe-col p,
.civ-stufe-card .stufe-col ul {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.civ-stufe-card .stufe-col ul {
    padding-left: 1.15rem;
    list-style: disc;
}

.civ-stufe-card .stufe-col ul li {
    margin-bottom: 0.2rem;
}

/* --- Bewerbungsprozess Steps --- */
.process-steps {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.process-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.85rem 1.15rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s ease;
}

.process-step:hover {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(30, 136, 229, 0.15);
}

.process-step .step-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}

.process-step .step-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.process-step .step-content p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* --- Responsive: Regelwerk-Layout --- */
@media (max-width: 1024px) {
    .regelwerk-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-nav-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .civ-stufe-card .stufe-grid {
        grid-template-columns: 1fr;
    }

    .rule-list>li {
        padding: 0.75rem 0.85rem;
    }
}

/* --- Changelog Link im Footer (wie Ticketsystem) --- */
.changelog-link {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.changelog-link:hover {
    color: var(--accent-cyan);
}

.changelog-link svg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-left: 2px;
}