/* ============================================================
   SightGaming — rules.css
   Standalone public "قوانین سرور" page
   Include AFTER variables.css, base.css, layout.css
   ============================================================ */

/* ── Page hero ── */
.rules-hero {
    padding: 140px 0 60px;
    text-align: center;
}

.rules-hero__title {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 16px;
}
.rules-hero__title .hl { color: var(--accent); }

.rules-hero__sub {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 28px;
    line-height: 1.8;
}

.rules-hero__notice {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(245,200,66,0.08);
    border: 1px solid rgba(245,200,66,0.25);
    border-radius: var(--radius);
    padding: 14px 20px;
    max-width: 560px;
    text-align: right;
}
.rules-hero__notice svg { width: 18px; height: 18px; color: var(--warning); flex-shrink: 0; margin-top: 2px; }
.rules-hero__notice p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.8; }
.rules-hero__notice strong { color: var(--warning); }

/* ── Layout: sticky TOC + content ── */
.rules-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 32px;
    align-items: start;
}

/* ── Sticky table of contents ── */
.rules-toc {
    position: sticky;
    top: 92px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
}
.rules-toc__title {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 14px;
}
.rules-toc__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    margin-bottom: 3px;
}
.rules-toc__link:hover { background: var(--accent-dim); color: var(--text-primary); }
.rules-toc__link.active { background: var(--accent-dim2); color: var(--accent); font-weight: bold; }
.rules-toc__count {
    margin-right: auto;
    font-size: 10px;
    color: var(--text-muted);
    background: var(--bg-surface);
    padding: 1px 8px;
    border-radius: var(--radius-full);
}
.rules-toc__link.active .rules-toc__count { background: var(--accent-dim2); color: var(--accent); }

/* ── Mobile horizontal jump bar ── */
.rules-mobile-jump {
    display: none;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 6px;
    margin-bottom: 24px;
}
.rules-mobile-jump::-webkit-scrollbar { display: none; }
.rules-mobile-jump__chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    scroll-snap-align: start;
    text-decoration: none;
    transition: var(--transition);
}
.rules-mobile-jump__chip.active { background: var(--accent-dim2); border-color: var(--border-accent); color: var(--accent); }

/* ── Search ── */
.rules-search {
    position: relative;
    margin-bottom: 28px;
}
.rules-search input {
    width: 100%;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 14px 48px 14px 18px;
    font-size: 14px;
    font-family: 'Vazir', sans-serif;
    outline: none;
    transition: var(--transition);
}
.rules-search input:focus { border-color: var(--border-accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.rules-search input::placeholder { color: var(--text-muted); }
.rules-search svg {
    position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: var(--text-muted);
}

/* ── Category section ── */
.rules-section { margin-bottom: 40px; scroll-margin-top: 92px; }
.rules-section__hdr {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 20px;
}
.rules-section__icon {
    width: 44px; height: 44px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.rules-section__title { font-size: 19px; font-weight: bold; }
.rules-section__badge {
    margin-right: auto;
    font-size: 11px; color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

/* ── Rule card ── */
.rule-card {
    display: flex;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 12px;
    transition: var(--transition);
}
.rule-card:hover { border-color: var(--border-accent); }
.rule-card:last-child { margin-bottom: 0; }

.rule-card__num {
    width: 38px; height: 38px;
    border-radius: var(--radius);
    background: var(--bg-surface);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}
.rule-card__body { flex: 1; min-width: 0; }
.rule-card__text {
    font-size: 14.5px;
    line-height: 1.9;
    color: var(--text-primary);
}
.rule-card__text strong.hl-danger  { color: var(--danger); }
.rule-card__text strong.hl-warn    { color: var(--warning); }
.rule-card__text strong.hl-info    { color: var(--info); }
.rule-card__text strong.hl-success { color: var(--accent); }

.rule-card__penalty {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 10px;
    padding: 5px 13px;
    border-radius: var(--radius-full);
    font-size: 11.5px; font-weight: bold;
}
.rule-card__penalty svg { width: 12px; height: 12px; }
.rule-card__penalty.p-ban     { background: rgba(245,82,82,0.10);  color: var(--danger);  border: 1px solid rgba(245,82,82,0.25); }
.rule-card__penalty.p-warn    { background: rgba(245,200,66,0.10); color: var(--warning); border: 1px solid rgba(245,200,66,0.25); }
.rule-card__penalty.p-mute    { background: rgba(82,180,245,0.10); color: var(--info);    border: 1px solid rgba(82,180,245,0.25); }
.rule-card__penalty.p-removal { background: var(--bg-surface); color: var(--text-secondary); border: 1px solid var(--border); }

/* ── Punishment escalation ladder ── */
.rules-ladder { display: flex; flex-direction: column; }
.rung {
    display: flex; align-items: flex-start; gap: 18px;
    padding: 20px 0;
    border-bottom: 1px dashed var(--border);
}
.rung:last-child { border-bottom: none; }
.rung__marker {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; font-weight: bold;
    flex-shrink: 0;
    border: 2px solid currentColor;
}
.rung.lvl-1 { color: var(--warning); }
.rung.lvl-2 { color: #f97316; }
.rung.lvl-3 { color: var(--danger); }
.rung__content { flex: 1; }
.rung__title { font-size: 15px; font-weight: bold; margin-bottom: 5px; color: var(--text-primary); }
.rung__desc { font-size: 13.5px; color: var(--text-secondary); line-height: 1.8; }
.rung__desc strong { color: var(--danger); }

/* ── Note box ── */
.rules-note {
    display: flex; gap: 12px;
    background: var(--accent-dim);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-top: 20px;
}
.rules-note svg { width: 19px; height: 19px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.rules-note p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.85; }
.rules-note strong { color: var(--accent); }

/* ── No-results state ── */
.rules-empty {
    display: none;
    flex-direction: column; align-items: center; text-align: center;
    padding: 60px 20px;
}
.rules-empty.show { display: flex; }
.rules-empty__icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--bg-card); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.rules-empty__icon svg { width: 28px; height: 28px; color: var(--text-muted); }
.rules-empty h3 { font-size: 16px; font-weight: bold; margin-bottom: 6px; }
.rules-empty p { font-size: 13.5px; color: var(--text-secondary); }

/* ── CTA at the bottom: encourage joining after reading ── */
.rules-cta {
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-xl);
    padding: 40px 30px;
    margin-top: 40px;
}
.rules-cta h3 { font-size: 20px; font-weight: bold; margin-bottom: 10px; }
.rules-cta p { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }
.rules-cta__btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Signature ── */
.rules-signature {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */

@media (max-width: 1100px) {
    .rules-layout { grid-template-columns: 220px 1fr; gap: 24px; }
}

@media (max-width: 900px) {
    .rules-layout { grid-template-columns: 1fr; }
    .rules-toc { display: none; }
    .rules-mobile-jump { display: flex; }
}

@media (max-width: 768px) {
    .rules-hero { padding: 110px 0 40px; }
    .rules-hero__notice { flex-direction: row; text-align: right; }
}

@media (max-width: 600px) {
    .rule-card { flex-direction: column; gap: 10px; padding: 16px 18px; }
    .rule-card__num { width: 34px; height: 34px; font-size: 15px; }
    .rule-card__text { font-size: 13.5px; }

    .rules-section__title { font-size: 16px; }
    .rules-section__icon { width: 38px; height: 38px; font-size: 17px; }

    .rung { gap: 14px; }
    .rung__marker { width: 36px; height: 36px; font-size: 15px; }
    .rung__title { font-size: 14px; }
    .rung__desc { font-size: 13px; }

    .rules-cta { padding: 28px 20px; }
    .rules-cta__btns { flex-direction: column; }
    .rules-cta__btns .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .rules-hero__title { font-size: 26px; }
    .rules-hero__sub { font-size: 14px; }
    .rules-hero__notice { padding: 12px 16px; }

    .rules-section__badge { display: none; }
    .rule-card__penalty { font-size: 10.5px; padding: 4px 10px; }

    .rules-search input { padding: 12px 42px 12px 14px; font-size: 13px; }
}

@media (max-width: 360px) {
    .rules-mobile-jump__chip { padding: 7px 12px; font-size: 11.5px; }
}