.rules-page {
    padding-top: 120px;
    padding-bottom: 70px;
    min-height: 100vh;
}

.rules-tabs-shell {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    gap: 26px;
}

.rules-tabs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    padding: 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.36);
    border: 1px solid rgba(197, 160, 89, 0.28);
}

.rules-tab {
    border: 1px solid transparent;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    padding: 10px 18px;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rules-tab:hover {
    color: #fff;
}

.rules-tab.is-active {
    color: #17120a;
    border-color: rgba(235, 213, 160, 0.65);
    background: linear-gradient(180deg, #edd8a8 0%, #c5a059 100%);
    box-shadow: 0 8px 24px rgba(197, 160, 89, 0.25);
}

.rules-tab-panel[hidden] {
    display: none;
}

.rules-content,
.rules-legal {
    background: rgba(10, 10, 12, 0.82);
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: 14px;
    padding: 36px;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.45);
}

.rule-block {
    margin-bottom: 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 18px;
}

.rule-block:last-child {
    border-bottom: none;
}

.rule-block h2 {
    color: var(--gold-primary);
    font-family: 'Cinzel', serif;
    font-size: 1.45rem;
    margin-bottom: 10px;
}

.rule-block p {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.65;
    font-size: 1.03rem;
}

.rules-footer {
    text-align: center;
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid rgba(197, 160, 89, 0.3);
}

.rules-footer p {
    color: #fff;
    margin-bottom: 20px;
}

.rules-legal {
    position: relative;
    overflow: hidden;
}

.rules-legal::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at top right, rgba(197, 160, 89, 0.26), transparent 38%),
        radial-gradient(circle at bottom left, rgba(197, 160, 89, 0.16), transparent 42%);
}

.rules-legal__header {
    position: relative;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(197, 160, 89, 0.3);
}

.rules-legal__eyebrow {
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(235, 213, 160, 0.9);
    margin-bottom: 8px;
}

.rules-legal__header h2 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 10px;
}

.rules-legal__header p {
    color: rgba(255, 255, 255, 0.72);
}

.rules-legal__list {
    list-style: none;
    counter-reset: legal-step;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
    position: relative;
}

.rules-legal__list > li {
    position: relative;
    counter-increment: legal-step;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 16px 16px 16px 52px;
}

.rules-legal__list > li::before {
    content: counter(legal-step);
    position: absolute;
    top: 16px;
    left: 16px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.78rem;
    color: #111;
    background: linear-gradient(180deg, #e9cd8a, #c5a059);
}

.rules-legal__list h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 1rem;
    line-height: 1.4;
}

.rules-legal__list p {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.55;
    margin: 0;
}

.rules-legal__sublist {
    margin: 12px 0 0;
    padding-left: 18px;
    color: rgba(255, 255, 255, 0.8);
    display: grid;
    gap: 8px;
}

.rules-legal__sublist li {
    list-style: disc;
    line-height: 1.5;
}

.rules-legal__actions {
    margin-top: 24px;
    text-align: right;
}

@media (max-width: 768px) {
    .rules-content,
    .rules-legal {
        padding: 24px 18px;
    }

    .rules-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        border-radius: 16px;
        gap: 6px;
        padding: 6px;
    }

    .rules-tab {
        border-radius: 10px;
        padding: 10px 8px;
        font-size: 0.84rem;
    }

    .rule-block h2 {
        font-size: 1.25rem;
    }

    .rules-legal__header h2 {
        font-size: 1.5rem;
    }

    .rules-legal__list > li {
        padding: 15px 14px 15px 46px;
    }

    .rules-legal__actions {
        text-align: left;
    }
}
