.rt-rules-page { padding-bottom: 80px; }

.rt-rules-hero {
    width: 100%;
    padding: 84px 20px 110px;
    margin-bottom: -48px;
    text-align: center;
    color: #fff;
    background-color: #0F1F2E;
    background-image: linear-gradient(to right, rgba(15, 31, 46, .93), rgba(15, 31, 46, .88)), url('/assets/images/banner/banner.webp');
    background-size: cover;
    background-position: center;
}

[data-theme="dark"] .rt-rules-hero {
    background-color: #050505;
    background-image: linear-gradient(to right, rgba(0, 0, 0, .9), rgba(0, 0, 0, .86)), url('/assets/images/banner/banner-dark.webp');
}

.rt-rules-hero h1 { margin: 0 0 12px; font-size: clamp(28px, 5vw, 44px); font-weight: 800; line-height: 1.3; color: #fff; }
.rt-rules-hero h1 .rt-hl { color: #4ADE80; }
.rt-rules-hero p { max-width: 680px; margin: 0 auto; font-size: 15px; line-height: 1.8; color: #E2E8F0; }

.rt-rules-search { position: relative; z-index: 10; max-width: 700px; margin: 0 auto 25px; padding: 0 20px; }

.rt-rules-search-box {
    display: flex;
    align-items: center;
    padding: 6px 18px;
    background: var(--rt-card-bg);
    border: 1px solid var(--rt-border);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 31, 46, .08);
    transition: var(--rt-ease, all .3s ease);
}

.rt-rules-search-box:focus-within { border-color: var(--rt-accent); box-shadow: 0 15px 35px rgba(22, 163, 74, .15); }
.rt-rules-search-box i { margin-inline-end: 12px; font-size: 16px; color: var(--rt-accent); }
.rt-rules-search-box input { width: 100%; padding: 10px 5px; border: none; outline: none; background: transparent; font-family: inherit; font-size: 14.5px; color: var(--rt-text-main); }
.rt-rules-search-box input::placeholder { color: var(--rt-text-muted); opacity: 1; }

.rt-rules-cats { display: flex; gap: 10px; max-width: 1140px; margin: 0 auto 32px; padding: 0 32px; overflow-x: auto; scrollbar-width: none; }
.rt-rules-cats::-webkit-scrollbar { display: none; }

.rt-rules-cat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: var(--rt-card-bg);
    border: 1px solid var(--rt-border);
    border-radius: 30px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--rt-text-main);
    white-space: nowrap;
    cursor: pointer;
    transition: var(--rt-ease, all .3s ease);
}

.rt-rules-cat i { font-size: 13px; color: var(--rt-accent); }
.rt-rules-cat em { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 8px; color: var(--rt-accent); background: var(--rt-tint); border-radius: 20px; }
.rt-rules-cat:hover, .rt-rules-cat.active { color: #fff; background: var(--rt-accent); border-color: var(--rt-accent); }
.rt-rules-cat:hover i, .rt-rules-cat.active i { color: #fff; }
.rt-rules-cat:hover em, .rt-rules-cat.active em { color: #fff; background: rgba(255, 255, 255, .22); }

.rt-rules-container { max-width: 1140px; margin: 0 auto; padding: 0 32px; }

.rt-rules-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }

.rt-rule {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: var(--rt-card-bg);
    border: 1px solid var(--rt-border);
    border-radius: 18px;
    box-shadow: var(--rt-card-shadow, 0 4px 15px rgba(15, 31, 46, .04));
    cursor: pointer;
    transition: var(--rt-ease, all .25s ease);
}

.rt-rule:hover { transform: translateY(-3px); border-color: var(--rt-accent); box-shadow: 0 12px 30px rgba(22, 163, 74, .12); }
.rt-rule:focus-visible { outline: 2px solid var(--rt-accent); outline-offset: 2px; }

.rt-rule-icon { flex-shrink: 0; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; font-size: 19px; color: var(--rt-accent); background: var(--rt-tint); border-radius: 14px; }

.rt-rule-head { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rt-rule-cat { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--rt-accent); }
.rt-rule-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--rt-text-main); }
.rt-rule-short { font-size: 13.5px; line-height: 1.65; color: var(--rt-text-muted); }

.rt-rule-chev { flex-shrink: 0; align-self: center; font-size: 13px; color: var(--rt-text-muted); transition: var(--rt-ease, all .25s ease); }
.rt-rule:hover .rt-rule-chev { color: var(--rt-accent); transform: translateX(3px); }
[dir="rtl"] .rt-rule-chev { transform: scaleX(-1); }

.rt-rule-fine {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 14px;
    padding: 11px 14px;
    font-size: 13.5px;
    line-height: 1.6;
    color: #991B1B;
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    border-radius: 12px;
}

.rt-rule-fine i { margin-top: 3px; color: #DC2626; }
[data-theme="dark"] .rt-rule-fine { color: #FECACA; background: rgba(220, 38, 38, .14); border-color: rgba(248, 113, 113, .45); }

.rt-pop {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .75);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity .3s ease;
}

[data-theme="dark"] .rt-pop { background: rgba(0, 0, 0, .85); }
.rt-pop.active { display: flex; opacity: 1; }

.rt-pop-box {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 640px;
    max-height: 88vh;
    overflow: hidden;
    background: var(--rt-card-bg);
    border: 1px solid var(--rt-border);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .3);
    transform: scale(.95);
    transition: transform .3s ease;
}

.rt-pop.active .rt-pop-box { transform: scale(1); }

.rt-pop-close {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--rt-accent);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: .3s;
}

.rt-pop-close:hover { background: #DC2626; transform: rotate(90deg); }

.rt-pop-head {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 26px 62px 18px 26px;
    background: var(--bg);
    border-bottom: 1px solid var(--rt-border);
}

[dir="rtl"] .rt-pop-head { padding: 26px 26px 18px 62px; }

.rt-pop-icon { flex-shrink: 0; width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; background: var(--rt-accent); border-radius: 16px; }
.rt-pop-titles { min-width: 0; }
.rt-pop-cat { display: inline-block; margin-bottom: 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--rt-accent); }
.rt-pop-title { margin: 0 0 6px; font-size: 1.4rem; font-weight: 800; line-height: 1.3; color: var(--rt-text-main); }
.rt-pop-short { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.6; color: var(--rt-text-muted); }

.rt-pop-scroll { flex: 1 1 auto; min-height: 0; padding: 22px 26px; overflow-y: auto; }
.rt-pop-scroll::-webkit-scrollbar { width: 4px; }
.rt-pop-scroll::-webkit-scrollbar-thumb { background: var(--rt-border); border-radius: 10px; }

.rt-pop-long { margin: 0 0 18px; font-size: 14.5px; line-height: 1.85; color: var(--rt-text-muted); }
.rt-pop-h { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--rt-text-main); }
.rt-pop-list { margin: 0 0 18px; padding-inline-start: 20px; }
.rt-pop-list li { margin-bottom: 7px; font-size: 14px; line-height: 1.75; color: var(--rt-text-muted); }

.rt-pop-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 14px;
    padding: 12px 14px;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--rt-text-muted);
    background: var(--rt-tint);
    border: 1px solid rgba(22, 163, 74, .3);
    border-radius: 12px;
}

.rt-pop-tip i { margin-top: 4px; color: var(--rt-accent); }
.rt-pop-tip strong { color: var(--rt-text-main); }
.rt-pop-law { flex-shrink: 0; padding: 7px 26px; text-align: center; font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--rt-text-muted); background: var(--bg); border-top: 1px solid var(--rt-border); }
.rt-pop-law:empty, .rt-pop-law span:empty { display: none; }
.rt-pop-law i { margin-inline-end: 6px; color: var(--rt-accent); }
.rt-pop a.rt-pop-more { margin-top: 16px; }

.rt-app { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--rt-text-main); white-space: nowrap; vertical-align: middle; }
.rt-inline-icon { width: 20px; height: 20px; object-fit: contain; border-radius: 5px; flex-shrink: 0; }

.rt-pop a.rt-pop-more {
    flex-shrink: 0;
    margin: 0 26px 22px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: var(--rt-accent);
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(22, 163, 74, .25);
    transition: var(--rt-ease, all .25s ease);
}

.rt-pop a.rt-pop-more[hidden] { display: none; }
.rt-pop a.rt-pop-more:hover { background: var(--rt-dark-green, #15803D); transform: translateY(-2px); }

.rt-rules-empty { display: none; grid-column: 1 / -1; padding: 50px; text-align: center; }
.rt-rules-empty i { margin-bottom: 10px; font-size: 28px; color: var(--rt-accent); }
.rt-rules-empty h3 { margin: 0 0 5px; color: var(--rt-text-main); }
.rt-rules-empty p { margin: 0; color: var(--rt-text-muted); }

.rt-rules-disclaimer { margin: 24px 0 0; padding: 14px 18px; font-size: 13px; line-height: 1.75; color: var(--rt-text-muted); background: var(--rt-tint); border-inline-start: 4px solid var(--rt-accent); border-radius: 10px; }

.rt-rules-faq { max-width: 1140px; margin: 50px auto 0; padding: 0 32px; }
.rt-rules-faq-card { padding: 28px 32px; background: var(--rt-card-bg); border: 1px solid var(--rt-border); border-radius: 20px; }
.rt-rules-faq-card h2 { margin: 0 0 8px; font-size: 22px; font-weight: 800; color: var(--rt-text-main); }
.rt-rules-faq-card details { border-bottom: 1px solid var(--rt-border); }
.rt-rules-faq-card details:last-child { border-bottom: none; }
.rt-rules-faq-card summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; font-size: 15.5px; font-weight: 700; line-height: 1.6; color: var(--rt-text-main); cursor: pointer; list-style: none; }
.rt-rules-faq-card summary::-webkit-details-marker { display: none; }
.rt-rules-faq-card summary::after { content: '+'; flex-shrink: 0; font-size: 22px; font-weight: 500; color: var(--rt-accent); }
.rt-rules-faq-card details[open] summary::after { content: '\2212'; }
.rt-rules-faq-card details p { margin: 0; padding-bottom: 16px; font-size: 14.5px; line-height: 1.8; color: var(--rt-text-muted); }

.rt-rules-about { max-width: 1140px; margin: 40px auto 20px; padding: 0 32px; }
.rt-rules-about-card { padding: 25px 30px; text-align: center; background: var(--rt-card-bg); border: 2px dashed var(--rt-border); border-radius: 16px; }
.rt-rules-about-card h4 { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--rt-accent); }
.rt-rules-about-card p { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--rt-text-muted); }
.rt-rules-about-card a { color: var(--rt-accent); font-weight: 600; text-decoration: none; }
.rt-rules-about-card a:hover { text-decoration: underline; }

@media (max-width: 900px) {
    .rt-rules-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 768px) {
    .rt-rules-hero {
        padding: 52px 16px 84px;
        margin-bottom: -40px;
        background-image: linear-gradient(to right, rgba(15, 31, 46, .93), rgba(15, 31, 46, .88)), url('/assets/images/banner/m-light.webp');
    }

    [data-theme="dark"] .rt-rules-hero {
        background-image: linear-gradient(to right, rgba(0, 0, 0, .9), rgba(0, 0, 0, .86)), url('/assets/images/banner/m-dark.webp');
    }

    .rt-rules-hero p { font-size: 14px; }
    .rt-rules-search, .rt-rules-cats, .rt-rules-container, .rt-rules-faq, .rt-rules-about { padding-inline: 16px; }
    .rt-rule { padding: 16px 14px; gap: 12px; }
    .rt-rule-icon { width: 40px; height: 40px; font-size: 16px; border-radius: 12px; }
    .rt-rule-title { font-size: 15px; }
    .rt-rule-short { font-size: 13px; }
    .rt-pop { padding: 12px; }
    .rt-pop-box { height: 90vh; height: 90dvh; max-height: 90vh; max-height: 80dvh; }
    .rt-pop-head { padding: 20px 56px 14px 18px; gap: 12px; }
    [dir="rtl"] .rt-pop-head { padding: 20px 18px 14px 56px; }
    .rt-pop-icon { width: 44px; height: 44px; font-size: 18px; border-radius: 13px; }
    .rt-pop-title { font-size: 1.15rem; }
    .rt-pop-short { font-size: 13px; }
    .rt-pop-scroll { padding: 18px; }
    .rt-pop-law { padding: 6px 16px; font-size: 11.5px; }
    .rt-pop-long { font-size: 14px; }
    .rt-pop a.rt-pop-more { margin: 0 18px 18px; }
    .rt-rules-faq-card { padding: 20px 16px; border-radius: 16px; }
    .rt-rules-faq-card h2 { font-size: 18px; }
    .rt-rules-faq-card summary { padding: 13px 0; font-size: 13.5px; }
    .rt-rules-faq-card details p { font-size: 13px; }
}