:root {
    --rules-bg: #07090d;
    --rules-panel: rgba(9, 13, 20, .92);
    --rules-panel-soft: rgba(15, 21, 31, .82);
    --rules-line: rgba(154, 187, 221, .22);
    --rules-line-hot: rgba(255, 99, 70, .54);
    --rules-gold: #ffd27a;
    --rules-cyan: #65d9ff;
    --rules-red: #ff6358;
    --rules-text: #f4f7fb;
    --rules-muted: #aeb9c9;
    --rules-green: #72d8a6;
}

* { box-sizing: border-box; }

html,
body.rules-page {
    min-width: 0;
    min-height: 100%;
    margin: 0;
    background: var(--rules-bg);
}

body.rules-page {
    position: relative;
    padding: 0 0 56px;
    overflow-x: hidden;
    color: var(--rules-text);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.65;
}

body.rules-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(6, 12, 19, .72), rgba(6, 10, 16, .42) 35%, rgba(16, 6, 6, .42)),
        radial-gradient(circle at 50% 10%, rgba(255, 58, 45, .19), transparent 25rem),
        url("/images/video/backround.webp?v=20260727-optimized1") center top / cover no-repeat fixed;
}

body.rules-page::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(4, 6, 10, .08), rgba(4, 6, 10, .72)),
        repeating-linear-gradient(90deg, rgba(255,255,255,.014) 0 1px, transparent 1px 90px);
}

.rules-page .header,
.rules-page .container {
    position: relative;
    z-index: 1;
    width: min(1420px, calc(100vw - 48px));
    margin-inline: auto;
}

.rules-page .header {
    min-height: 190px;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr);
    align-items: center;
    gap: 28px;
    padding: 20px 28px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    background:
        linear-gradient(90deg, transparent, rgba(101, 217, 255, .12), transparent),
        radial-gradient(circle at 50% 38%, rgba(255, 73, 60, .3), transparent 15rem);
}

.header-copy { max-width: 470px; }
.header-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 11px;
    color: var(--rules-cyan);
    background: rgba(4, 12, 22, .72);
    border: 1px solid rgba(101, 217, 255, .32);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.rules-page .header h1 {
    margin: 13px 0 8px;
    color: #fff8e6;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(29px, 3vw, 46px);
    line-height: 1.05;
    text-shadow: 0 3px 16px rgba(0, 0, 0, .82);
}

.rules-page .header p {
    max-width: 44ch;
    margin: 0;
    color: #dce7f4;
    font-size: 14px;
}

.header-logo { display: block; line-height: 0; }
.header-logo img {
    width: 168px;
    height: auto;
    filter: drop-shadow(0 16px 26px rgba(0,0,0,.84)) drop-shadow(0 0 22px rgba(255,83,63,.46));
}

.header-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.header-actions a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    color: #fff1c7;
    background: rgba(33, 15, 11, .78);
    border: 1px solid rgba(255, 210, 122, .42);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .5px;
    text-decoration: none;
    text-transform: uppercase;
}

.header-actions a:hover { color: #fff; border-color: var(--rules-gold); background: rgba(90, 20, 18, .86); }

.rules-page .container {
    display: grid;
    grid-template-columns: 275px minmax(0, 1fr);
    align-items: start;
    gap: 22px;
    padding: 24px 0 0;
}

.rules-page .sidebar,
.rules-page .content {
    background: var(--rules-panel);
    border: 1px solid var(--rules-line);
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.035);
}

.rules-page .sidebar {
    position: sticky;
    top: 18px;
    padding: 17px;
}

.rules-page .sidebar h3 {
    margin: 0 0 14px;
    padding: 0 5px 12px;
    color: #fff8e6;
    border-bottom: 1px solid rgba(255,210,122,.3);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
}

.rules-page .sidebar ul { list-style: none; margin: 0; padding: 0; }
.rules-page .sidebar li { margin: 4px 0; }
.rules-page .sidebar a {
    display: grid;
    grid-template-columns: 31px 1fr;
    align-items: center;
    min-height: 42px;
    padding: 7px 9px;
    color: #c6d1df;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
}

.rules-page .sidebar a > span {
    color: #6f8299;
    font-size: 10px;
    letter-spacing: .5px;
}

.rules-page .sidebar a:hover,
.rules-page .sidebar a.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(101,217,255,.12), rgba(255,99,70,.06));
    border-color: rgba(101,217,255,.24);
}

.rules-page .sidebar a.active { box-shadow: inset 3px 0 0 var(--rules-cyan); }
.rules-page .sidebar a.nav-link-featured { color: #f6dfb1; }
.rules-page .sidebar a.nav-link-featured.active { box-shadow: inset 3px 0 0 var(--rules-red); }

.sidebar-divider { padding: 15px 8px 5px; }
.sidebar-divider > span { color: var(--rules-red); font-size: 9px; font-weight: 900; letter-spacing: 1.4px; }

.rules-page .content { min-width: 0; padding: clamp(22px, 4vw, 48px); }
.content-section { display: none; }
.content-section.active { display: block; }
.legacy-content { display: none !important; }

.rules-page .content h2,
.rules-modal .content-section h2 {
    margin: 0 0 8px;
    padding: 0;
    color: #fff8e6;
    border: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(28px, 4vw, 43px);
    line-height: 1.14;
}

.rules-page .content h3,
.rules-modal .content-section h3 {
    margin: 34px 0 12px;
    padding-left: 13px;
    color: var(--rules-gold);
    border-left: 3px solid var(--rules-red);
    font-size: 20px;
    line-height: 1.3;
}

.rules-page .content h4,
.rules-modal .content-section h4 {
    margin: 22px 0 9px;
    color: #dce7f4;
    font-size: 16px;
}

.rules-page .content p,
.rules-page .content li,
.rules-page .content td,
.rules-modal .content-section p,
.rules-modal .content-section li,
.rules-modal .content-section td {
    color: #d5deea;
    font-size: 14px;
    line-height: 1.7;
}

.rules-page .content p,
.rules-modal .content-section p { margin: 0 0 15px; }
.rules-page .content ul,
.rules-page .content ol,
.rules-modal .content-section ul,
.rules-modal .content-section ol { margin: 0 0 18px; padding-left: 22px; }
.rules-page .content li,
.rules-modal .content-section li { margin: 6px 0; }
.rules-page .content strong,
.rules-modal .content-section strong { color: #fff0c7; }
.rules-page .content a,
.rules-modal .content-section a { color: var(--rules-cyan); }
.rules-page .content code,
.rules-modal .content-section code { padding: 2px 5px; color: #bdefff; background: rgba(101,217,255,.08); border: 1px solid rgba(101,217,255,.15); border-radius: 3px; }

.rules-lead { max-width: 78ch; color: #e8eef7 !important; font-size: 16px !important; }
.rules-meta { color: var(--rules-muted) !important; font-size: 12px !important; letter-spacing: .4px; text-transform: uppercase; }

.rule-callout,
.payment-callout,
.definition-box,
.process-box {
    margin: 22px 0;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(17,27,41,.96), rgba(24,13,16,.92));
    border: 1px solid rgba(101,217,255,.22);
    border-left: 4px solid var(--rules-cyan);
    border-radius: 6px;
}

.payment-callout { border-color: rgba(255,210,122,.34); border-left-color: var(--rules-gold); }
.rule-callout--danger { border-color: rgba(255,99,88,.34); border-left-color: var(--rules-red); }
.rule-callout--safe { border-color: rgba(114,216,166,.3); border-left-color: var(--rules-green); }
.rule-callout > :last-child,
.payment-callout > :last-child,
.definition-box > :last-child,
.process-box > :last-child { margin-bottom: 0 !important; }

.quick-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0 28px;
    padding: 0 !important;
    list-style: none;
}
.quick-nav li { margin: 0 !important; }
.quick-nav a {
    display: inline-flex;
    padding: 7px 10px;
    background: rgba(101,217,255,.07);
    border: 1px solid rgba(101,217,255,.2);
    border-radius: 4px;
    color: #c9eefe !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.table-wrap { width: 100%; margin: 18px 0 28px; overflow-x: auto; border: 1px solid var(--rules-line); border-radius: 6px; }
.rules-table { width: 100%; min-width: 700px; margin: 0 !important; border-collapse: collapse; background: rgba(6,10,16,.58); }
.rules-table th,
.rules-table td { padding: 12px 13px; border: 0; border-bottom: 1px solid rgba(154,187,221,.13); text-align: left; vertical-align: top; }
.rules-table th { color: #fff1c7; background: rgba(255,210,122,.08); font-size: 11px; letter-spacing: .6px; text-transform: uppercase; }
.rules-table tr:last-child td { border-bottom: 0; }
.rules-table tbody tr:hover { background: rgba(101,217,255,.04); }
.penalty-value { color: var(--rules-gold); font-weight: 800; white-space: nowrap; }
.severity { display: inline-flex; padding: 2px 7px; border: 1px solid rgba(255,99,88,.35); border-radius: 999px; color: #ffb4ad; font-size: 10px; font-weight: 800; text-transform: uppercase; }

.fine-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0 26px; }
.fine-card { padding: 15px; background: var(--rules-panel-soft); border: 1px solid var(--rules-line); border-radius: 6px; }
.fine-card b { display: block; margin-bottom: 5px; color: var(--rules-gold); font-size: 18px; }
.fine-card span { color: var(--rules-muted); font-size: 12px; }

.rules-page .back-link {
    display: inline-flex;
    margin-top: 30px;
    padding: 10px 16px;
    color: #fff1c7;
    background: linear-gradient(180deg, #861016, #3f070b);
    border: 1px solid #7d5a2d;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

body.rules-modal {
    margin: 0;
    padding: 20px;
    background: #0b1018;
    color: var(--rules-text);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}
.rules-modal .modal-content-wrapper { background: transparent; }
.rules-modal .content-section { display: none; }
.rules-modal .content-section.active { display: none; }
.rules-modal .legacy-content { display: none !important; }
.rules-modal .content-section h2 { text-align: left; border: 0; }
.rules-modal .content-section h3 { text-align: left; }

@media (max-width: 980px) {
    .rules-page .header { grid-template-columns: 1fr auto; }
    .header-copy { grid-column: 1; }
    .header-logo { grid-column: 2; grid-row: 1 / span 2; }
    .header-actions { grid-column: 1; justify-content: flex-start; }
    .rules-page .container { grid-template-columns: 1fr; }
    .rules-page .sidebar { position: static; }
    .rules-page .sidebar ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .sidebar-divider { grid-column: 1 / -1; }
    .fine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    body.rules-page { padding-bottom: 22px; }
    .rules-page .header,
    .rules-page .container { width: min(100% - 20px, 1420px); }
    .rules-page .header { min-height: 0; grid-template-columns: 1fr; gap: 15px; padding: 22px 8px; text-align: center; }
    .header-copy { grid-column: 1; max-width: none; }
    .header-logo { grid-column: 1; grid-row: 1; justify-self: center; }
    .header-logo img { width: 120px; }
    .header-actions { grid-column: 1; justify-content: center; }
    .rules-page .container { padding-top: 12px; }
    .rules-page .sidebar { padding: 10px; }
    .rules-page .sidebar h3 { font-size: 16px; }
    .rules-page .sidebar ul { grid-template-columns: 1fr 1fr; }
    .rules-page .sidebar a { min-height: 38px; font-size: 11px; }
    .rules-page .content { padding: 21px 16px; }
    .rules-page .content h3,
    .rules-modal .content-section h3 { font-size: 18px; }
    .fine-grid { grid-template-columns: 1fr; }
    .rule-callout, .payment-callout, .definition-box, .process-box { padding: 15px; }
    body.rules-modal { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media print {
    body.rules-page { color: #111; background: #fff; }
    body.rules-page::before,
    body.rules-page::after,
    .rules-page .header,
    .rules-page .sidebar,
    .rules-page .back-link { display: none !important; }
    .rules-page .container { display: block; width: 100%; padding: 0; }
    .rules-page .content { padding: 0; color: #111; background: #fff; border: 0; box-shadow: none; }
    .rules-page .content p,
    .rules-page .content li,
    .rules-page .content td { color: #111; }
    .content-section { display: none !important; }
    .content-section.active { display: block !important; }
}
