#page-container {
    min-height: 100vh !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
}

#page-content {
    flex: 1 !important;
    display: block !important;
    position: relative !important;
    /* ENTFERNEN: min-height: calc(100vh - var(--header-height) - var(--footer-height)) !important; */
}

.rules-header-section {
    min-height: 100vh; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 var(--page-padding);
    gap: 3rem;
    box-sizing: border-box;
}


.rules-header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.header-icon {
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.header-icon i {
    font-size: 3rem;
    color: var(--accent-color);
    animation: pulse 2s ease-in-out infinite;
}

.header-text .info-title {
    font-size: 3.5rem; /* Gleich wie im Quiz */
    font-weight: 700;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.header-subtitle {
    font-size: 1.5rem;
    color: var(--second-text-color);
    font-weight: 300;
}

.header-description {
    max-width: 800px;
}

.description-text {
    font-size: 1.2rem;
    color: var(--second-text-color);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.warning-box {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
}

.warning-box i {
    color: #f87171;
    font-size: 1.5rem;
    margin-top: 0.2rem;
}

.warning-content strong {
    color: #fca5a5;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.warning-content p {
    color: #fecaca;
    margin: 0;
    line-height: 1.6;
}

/* --- MODIFIZIERT --- */
.rules-content-section {
    height: 100vh;
    padding: 4rem var(--page-padding) 2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* --- MODIFIZIERT --- */
.rules-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 0.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.5) rgba(255, 255, 255, 0.1);
    flex-shrink: 0; /* Stellt sicher, dass die Tabs nicht schrumpfen */
}

.rules-tabs::-webkit-scrollbar {
    height: 8px;
}

.rules-tabs::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.rules-tabs::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--second-text-color);
    white-space: nowrap;
    min-width: fit-content;
    flex-shrink: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
    color: var(--main-text-color);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-color-darker));
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tab-btn i {
    font-size: 1rem;
    flex-shrink: 0;
}

/* --- NEU --- */
#tab-contents {
    flex-grow: 1; /* Nimmt den restlichen Platz ein */
    overflow-y: auto; /* Aktiviert das Scrollen nur für diesen Container */
    min-height: 0; /* Verhindert ein bekanntes Flexbox-Layoutproblem */
}

/* Optional: Scrollbar-Styling für den neuen scrollbaren Bereich */
#tab-contents::-webkit-scrollbar {
    width: 8px;
}

#tab-contents::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#tab-contents::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
    position: relative; /* Normaler Dokumentenfluss */
    width: 100%;
}

.tab-content.active {
    display: block;
    position: relative; /* Normaler Dokumentenfluss */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rules-category {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 2rem; /* Abstand zwischen Kategorien */
    position: relative; /* Normal positioning */
}

.category-header {
    padding: 2rem;
    color: white;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-color-darker));
}

.category-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-style: italic;
}

.category-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.rules-container {
    padding: 2rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
}

.rule-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border-left: 4px solid var(--accent-color);
    backdrop-filter: blur(10px);
}

.rule-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-left-color: var(--accent-color-darker);
    background: rgba(255, 255, 255, 0.08);
}

.rule-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1.5rem;
}

.rule-number {
    display: inline-block;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-family: "Courier New", monospace;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.rule-number:hover {
    background: rgba(59, 130, 246, 0.3);
    transform: scale(1.05);
}

.rule-header h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
    flex: 1;
    font-style: italic;
}

.rule-item:hover .rule-header h4 {
    color: var(--accent-color);
}

.severity-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.severity-indicator.low {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.severity-indicator.medium {
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.severity-indicator.high {
    background: #f97316;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
}

.severity-indicator.extreme {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.rule-description {
    color: var(--second-text-color);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.rule-penalty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 0.5rem;
    color: #fca5a5;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.rule-penalty i {
    color: #ef4444;
}

/* Footer positioning - ÜBERSCHREIBT HAUPT-CSS */
footer {
    position: relative !important;
    margin-top: 0 !important; /* Entfernt margin-top */
    padding-top: 2rem !important;
    clear: both !important;
    z-index: 1000 !important;
    width: 100% !important;
    flex-shrink: 0 !important;
    /* Behält die ursprünglichen Flexbox-Eigenschaften bei */
    display: flex !important;
    flex-direction: row !important;
    height: var(--footer-height) !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Stellt sicher, dass Footer-Inhalte korrekt angezeigt werden */
footer .copyright {
    width: 30% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
}

footer .copyright .copyright-text {
    color: var(--second-text-color) !important;
    font-size: 0.75rem !important;
}

footer .image {
    margin-left: -5rem !important;
    max-height: 100% !important;
    opacity: 0.75 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rules-header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-text .info-title {
        font-size: 2.5rem;
    }

    .rules-tabs {
        flex-direction: column;
    }

    .rule-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .rules-content-section {
        padding: 2rem 1rem;
    }

    .header-text .info-title {
        font-size: 2rem;
    }

    .rule-item {
        padding: 1rem;
    }
}