.rules-container {
    min-height: calc(100vh - 200px);
    padding: 42px 20px 70px;
    display: flex;
    gap: 22px;
    max-width: 1320px;
    margin: 0 auto;
    position: relative;
}

.rules-container::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 28%;
    width: 760px;
    height: 520px;
    background:
        radial-gradient(ellipse at 30% 10%, rgba(74, 163, 255, 0.09) 0%, transparent 48%),
        radial-gradient(ellipse at 82% 32%, rgba(16, 185, 129, 0.06) 0%, transparent 42%);
    pointer-events: none;
}

/* SIDEBAR NAVIGATION */
.rules-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    z-index: 1;
}

.sidebar-card {
    background:
        radial-gradient(ellipse at 16% 0%, rgba(74, 163, 255, 0.11) 0%, transparent 44%),
        linear-gradient(180deg, rgba(10, 15, 25, 0.64), rgba(7, 12, 22, 0.54));
    backdrop-filter: blur(16px) saturate(130%);
    border: 1px solid rgba(125, 175, 255, 0.14);
    border-radius: 18px;
    padding: 24px 20px;
    box-shadow: 0 18px 44px rgba(0,0,0,0.24);
}

.sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7a94;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 4px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #8a9bbd;
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 10px;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.sidebar-nav a:hover {
    color: #4aa3ff;
    background: rgba(74,163,255,0.1);
    border-color: rgba(74,163,255,0.2);
}

.sidebar-nav a.active {
    color: #4aa3ff;
    background: rgba(74,163,255,0.15);
    border-color: rgba(74,163,255,0.3);
    font-weight: 600;
}

.sidebar-nav-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

/* MAIN CONTENT */
.rules-main {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.legal-card {
    width: 100%;
    background:
        radial-gradient(ellipse at 18% 0%, rgba(74, 163, 255, 0.10) 0%, transparent 42%),
        linear-gradient(180deg, rgba(10, 15, 25, 0.58), rgba(7, 12, 22, 0.52));
    backdrop-filter: blur(16px) saturate(130%);
    border: 1px solid rgba(125, 175, 255, 0.14);
    border-radius: 18px;
    padding: 40px;
    box-shadow: 0 18px 44px rgba(0,0,0,0.25);
    color: #cfe7ff;
    position: relative;
    overflow: hidden;
}

.legal-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(125, 175, 255, 0.42), transparent);
}

/* TITLE */
.rules-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: start;
    margin-bottom: 22px;
}

.legal-title {
    font-size: 2.35rem;
    font-weight: 900;
    text-align: left;
    color: #f4f8ff;
    margin-bottom: 10px;
}

.legal-subtitle {
    text-align: left;
    color: #9fb2ce;
    font-size: 1.05rem;
    margin-bottom: 24px;
    line-height: 1.7;
    max-width: 760px;
}

.rules-updated-pill {
    min-width: 150px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(125, 175, 255, 0.16);
    background: rgba(255, 255, 255, 0.045);
}

.rules-updated-pill span,
.rules-results-meta {
    display: block;
    color: #8fa5c4;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.rules-updated-pill strong {
    display: block;
    margin-top: 5px;
    color: #f4f8ff;
    font-size: 0.95rem;
}

.rules-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.rules-summary-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(125, 175, 255, 0.12);
    background: rgba(255, 255, 255, 0.045);
}

.rules-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 10px;
    color: #7bb4ff;
    background: rgba(74, 163, 255, 0.13);
}

.rules-summary-title {
    color: #eaf2ff;
    font-size: 0.9rem;
    font-weight: 900;
    margin-bottom: 4px;
}

.rules-summary-text {
    color: #95a8c4;
    font-size: 0.82rem;
    line-height: 1.5;
}

.rules-search {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    max-width: 520px;
    min-height: 44px;
    padding: 0 14px;
    margin-bottom: 10px;
    border-radius: 999px;
    border: 1px solid rgba(125, 175, 255, 0.16);
    background: rgba(3, 7, 14, 0.34);
}

.rules-search i {
    color: #7bb4ff;
}

.rules-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #eaf2ff;
    background: transparent;
}

.rules-results-meta {
    margin-bottom: 18px;
}

/* IMPORTANT WARNING BOX */
.warning-box {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.warning-box::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #ef4444, #dc2626);
}

.warning-box-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    color: #fca5a5;
}

.warning-box-content {
    flex: 1;
}

.warning-box-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fecaca;
    margin-bottom: 6px;
}

.severity-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.severity-card {
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.045);
}

.severity-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: #eaf2ff;
    font-size: 0.88rem;
    font-weight: 900;
    text-transform: uppercase;
}

.severity-card-title::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--severity-color);
    box-shadow: 0 0 10px var(--severity-color);
}

.severity-card-text {
    color: #95a8c4;
    font-size: 0.82rem;
    line-height: 1.5;
}

.severity-card.low {
    --severity-color: #22c55e;
}

.severity-card.medium {
    --severity-color: #eab308;
}

.severity-card.high {
    --severity-color: #ef4444;
}

.warning-box-text {
    font-size: 0.9rem;
    color: #a8a8b0;
    margin: 0;
    line-height: 1.6;
}

/* SECTION HEADINGS */
.legal-section-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #f4f8ff;
    margin-top: 44px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    scroll-margin-top: 100px;
}

.rules-section[hidden],
.rule-item[hidden],
.legal-divider[hidden] {
    display: none;
}

.rules-section-anchor {
    margin-left: auto;
    color: #7bb4ff;
    font-size: 0.95rem;
    text-decoration: none;
    opacity: 0.75;
}

.rules-section-anchor:hover {
    opacity: 1;
}

.legal-section-title:first-of-type {
    margin-top: 0;
}

.section-icon {
    font-size: 1.3rem;
    color: #4aa3ff;
}

/* RULE ITEMS */
.rule-item {
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
    overflow: hidden;
}

.rule-item::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--severity-color, rgba(125, 175, 255, 0.32));
}

.rule-item:hover {
    background: rgba(74,163,255,0.08);
    border-color: rgba(74,163,255,0.25);
    transform: translateY(-1px);
}

.rule-item.severity-low {
    --severity-color: #22c55e;
}

.rule-item.severity-medium {
    --severity-color: #eab308;
}

.rule-item.severity-high {
    --severity-color: #ef4444;
}

.rule-item:last-child {
    margin-bottom: 0;
}

.rule-item-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
    margin-top: 2px;
    color: #4aa3ff;
}

.rule-item-content {
    flex: 1;
}

.rule-item-text {
    font-size: 0.95rem;
    color: #8a9bbd;
    line-height: 1.65;
}

.rule-item-text strong {
    color: #e4ecff;
    font-weight: 600;
}

/* SEVERITY INDICATORS */
.severity-badge {
    display: none;
}

.rule-severity {
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-bottom: 8px;
    color: var(--severity-color);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rule-severity::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 10px currentColor;
}


/* DIVIDER */
.legal-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin: 40px 0;
    position: relative;
}

.legal-divider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74, 163, 255, 0.3), transparent);
}

/* REPORT BUTTON */
.btn-report-player {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 320px;
    margin: 40px auto 0 auto;
    padding: 16px 24px;
    border-radius: 14px;
    border: 1px solid rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: #fff;
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    font-size: 1.05rem;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.3);
    transition: all 0.3s ease;
}

.btn-report-player:hover {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(220, 38, 38, 0.45);
}

/* LAST UPDATED */
.last-updated {
    text-align: center;
    color: #6b7a94;
    font-size: 0.85rem;
    margin-top: 32px;
    font-style: italic;
}

/* INFO BOX */
.info-box {
    background: rgba(74, 163, 255, 0.06);
    border: 1px solid rgba(74, 163, 255, 0.15);
    border-radius: 14px;
    padding: 20px 24px;
    margin-top: 32px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.info-box-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    color: #60a5fa;
}

.info-box-content {
    flex: 1;
}

.info-box-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #93c5fd;
    margin-bottom: 6px;
}

.info-box-text {
    font-size: 0.88rem;
    color: #6b7a94;
    margin: 0;
    line-height: 1.6;
}

.info-box-text a {
    color: #4aa3ff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.info-box-text a:hover {
    color: #7bb4ff;
    text-decoration: underline;
}

.rules-empty {
    padding: 32px 18px;
    text-align: center;
    color: #8fa5c4;
}

.rules-empty i {
    display: block;
    margin-bottom: 10px;
    color: #7bb4ff;
    font-size: 1.8rem;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .rules-container {
        flex-direction: column;
    }

    .severity-guide {
        grid-template-columns: 1fr;
    }

    .rules-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rules-sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }

    .sidebar-card {
        padding: 20px;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .sidebar-nav li {
        margin: 0;
    }

    .sidebar-nav a {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .rules-hero {
        grid-template-columns: 1fr;
    }

    .legal-card {
        padding: 32px 24px;
    }

    .legal-title {
        font-size: 2rem;
    }

    .legal-section-title {
        font-size: 1.3rem;
    }

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

    .warning-box-icon {
        margin: 0 auto;
    }

    .rule-item {
        flex-direction: column;
        gap: 10px;
    }

    .rule-item-icon {
        margin: 0;
    }
}

@media (max-width: 576px) {
    .rules-container {
        padding: 20px 12px 40px;
    }

    .legal-card {
        padding: 24px 18px;
    }

    .legal-title {
        font-size: 1.7rem;
    }

    .legal-section-title {
        font-size: 1.15rem;
    }

    .rules-summary {
        grid-template-columns: 1fr;
    }

    .btn-report-player {
        max-width: 100%;
    }
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

