/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ ПРАВИЛ ===== */

.rules-wrapper {
    max-width: 960px;
    margin: 40px auto;
    padding: 0 24px;
}

/* ----- ШАПКА ----- */
.rules-header {
    text-align: center;
    margin-bottom: 32px;
}
.rules-header h1 {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #d4ff00, #ff3b3b, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.rules-header .version {
    color: var(--text-secondary);
    font-size: 15px;
}
.rules-header .version strong {
    color: var(--text-primary);
}
.rules-header .status {
    display: inline-block;
    background: rgba(39, 201, 63, 0.15);
    color: #27c93f;
    padding: 2px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    margin-left: 8px;
}
.rules-header .founder {
    color: var(--text-secondary);
    font-size: 15px;
    margin-top: 4px;
}
.rules-header .founder strong {
    color: var(--accent);
}

/* ----- ВЫДЕЛЕННЫЕ БЛОКИ ----- */
.rules-highlight {
    background: var(--bg-card);
    border-left: 4px solid var(--accent);
    padding: 16px 20px;
    border-radius: 6px;
    margin: 16px 0;
}
.rules-highlight.important {
    border-left-color: #ff6584;
    background: rgba(255, 101, 132, 0.04);
}
.rules-highlight.resources {
    border-left-color: #27c93f;
    background: rgba(39, 201, 63, 0.04);
}
.rules-highlight a {
    color: var(--accent);
    text-decoration: underline;
}
.rules-highlight a:hover {
    color: var(--accent-hover);
}
.rules-highlight .lead {
    font-size: 16px;
    color: var(--text-primary);
}
.rules-highlight .final-words {
    color: var(--text-primary);
    font-size: 16px;
}

/* ----- СЕКЦИИ (КАРТОЧКИ) ----- */
.rules-section {
    margin-bottom: 32px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.rules-section:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.rules-section .section-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    gap: 12px;
}
.rules-section .section-header i {
    font-size: 22px;
    color: var(--accent);
    width: 28px;
    text-align: center;
}
.rules-section .section-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.rules-section .section-body {
    padding: 20px 24px 24px;
}

/* ----- ЗАГОЛОВКИ ВНУТРИ ----- */
.rules-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0 10px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.rules-section h3:first-of-type {
    margin-top: 0;
}
.rules-section h3 i {
    color: var(--accent);
    font-size: 18px;
}

/* ----- ТЕКСТ И СПИСКИ ----- */
.rules-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 15px;
    margin-bottom: 12px;
}
.rules-section ul {
    padding-left: 24px;
    margin: 8px 0 16px;
}
.rules-section ul li {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 15px;
    margin-bottom: 6px;
    list-style-type: none;
    position: relative;
    padding-left: 20px;
}
.rules-section ul li::before {
    content: "▸";
    color: var(--accent);
    position: absolute;
    left: 0;
    font-weight: 700;
}
.rules-section ul li strong {
    color: var(--text-primary);
}

/* ----- ТАБЛИЦЫ ----- */
.rules-table-wrap {
    overflow-x: auto;
    margin: 16px 0;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
}
.rules-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: var(--text-secondary);
}
.rules-table-wrap table th {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    padding: 10px 14px;
    text-align: left;
    border-bottom: 2px solid var(--border-glass);
    font-weight: 600;
}
.rules-table-wrap table td {
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-glass);
    vertical-align: middle;
}
.rules-table-wrap table tr:last-child td {
    border-bottom: none;
}
.rules-table-wrap table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* БЕЙДЖИ */
.badge {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.badge-light {
    background: rgba(108, 99, 255, 0.15);
    color: var(--accent);
}
.badge-mid {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}
.badge-heavy {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.badge-critical {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
}

/* ----- КОМАНДЫ ----- */
.commands-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
    margin: 12px 0;
}
.commands-grid code {
    background: var(--bg-primary);
    padding: 4px 12px;
    border-radius: 4px;
    color: var(--accent);
    font-size: 13px;
    font-family: 'Courier New', monospace;
    display: inline-block;
}
.rules-section .note {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ----- СВОРАЧИВАНИЕ ----- */
.collapse-toggle {
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-weight: 600;
    padding: 8px 16px;
    background: rgba(108, 99, 255, 0.06);
    border-radius: 8px;
    transition: all 0.2s;
    margin: 12px 0 8px;
}
.collapse-toggle:hover {
    background: rgba(108, 99, 255, 0.12);
}
.collapse-toggle i {
    transition: transform 0.3s;
}
.collapse-toggle.open i {
    transform: rotate(180deg);
}
.collapse-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.collapse-content.open {
    max-height: 2000px;
}

/* ----- ПОДПИСЬ ОСНОВАТЕЛЯ ----- */
.founder-sign {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 20px 0;
    border: 1px solid var(--border-glass);
}
.founder-sign img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}
.founder-sign .info {
    flex: 1;
}
.founder-sign .name {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
}
.founder-sign .role {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ----- МЕТАДАННЫЕ ВНИЗУ ----- */
.rules-footer-meta {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-glass);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.8;
}
.rules-footer-meta p {
    margin: 2px 0;
}

/* ----- АДАПТИВ ----- */
@media (max-width: 768px) {
    .rules-wrapper {
        padding: 0 16px;
    }
    .rules-header h1 {
        font-size: 28px;
    }
    .rules-section .section-header h2 {
        font-size: 17px;
    }
    .rules-section .section-body {
        padding: 16px;
    }
    .rules-section ul {
        padding-left: 16px;
    }
    .rules-section ul li {
        font-size: 14px;
        padding-left: 16px;
    }
    .founder-sign {
        flex-direction: column;
        text-align: center;
    }
    .rules-table-wrap table {
        font-size: 12px;
    }
    .rules-table-wrap table th,
    .rules-table-wrap table td {
        padding: 6px 10px;
    }
    .commands-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== УЛУЧШЕННАЯ ЧИТАЕМОСТЬ ===== */

/* Заголовки разделов (1.1, 1.2, 2.1 и т.д.) */
.rules-section .section-body p strong {
    color: #6c63ff;
    font-weight: 700;
    font-size: 16px;
    display: inline-block;
    margin-top: 8px;
}

/* Нумерация в списках (1., 2., 3.) */
.rules-section .section-body ul li strong {
    color: #ffbd2e;
    font-weight: 700;
}

/* Заголовки подразделов (1.1. Уважение — это фундамент) */
.rules-section .section-body p strong:first-child {
    color: #6c63ff;
    font-size: 17px;
    border-bottom: 2px solid rgba(108,99,255,0.2);
    padding-bottom: 4px;
}

/* Блоки с примерами (типа "К нам НЕ относятся:") */
.rules-section .section-body p strong:not(:first-child) {
    color: #ff6584;
}

/* Крупные заголовки разделов (РАЗДЕЛ 1. ОСНОВЫ ОБЩЕНИЯ) */
.rules-section h3 {
    color: #e8edf5;
    font-weight: 700;
    font-size: 20px;
    border-left: 4px solid #6c63ff;
    padding-left: 12px;
    margin-top: 24px;
}
.rules-section h3 i {
    color: #6c63ff;
}

/* Номера разделов (1., 2., 3.) в тексте */
.rules-section .section-body p code {
    color: #ffbd2e;
    font-weight: 600;
}