/* Стили для страницы правил (rules.php).
   Оптимизировано для производительности (GPU accelerated animations).
*/

:root {
    --rules-bg-dark: rgba(20, 20, 20, 0.6);
    --rules-border: rgba(255, 255, 255, 0.08);
    --rules-accent: #ffb400; /* Основной желтый */
    --rules-accent-glow: rgba(255, 180, 0, 0.2);
    --text-main: #e0e0e0;
    --text-muted: #888;
}

/* Основная обертка */
.rules-wrapper {
    padding-top: 120px;
    padding-bottom: 80px;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at top left, rgba(255, 180, 0, 0.04) 0%, transparent 40%),
        radial-gradient(circle at bottom right, rgba(255, 180, 0, 0.02) 0%, transparent 40%);
}

/* Лейаут: Сайдбар + Контент */
.rules-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    position: relative;
}

/* --- САЙДБАР (Меню) --- */
.rules-sidebar {
    position: relative;
    z-index: 10;
}

.sidebar-sticky {
    position: sticky;
    top: 100px; /* Отступ от хедера */
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(15px); /* Стекломорфизм */
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--rules-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.rules-nav-header {
    font-family: 'Druk Wide', sans-serif;
    color: var(--rules-accent);
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--rules-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.rules-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rules-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.rules-nav-link i {
    width: 20px;
    text-align: center;
    transition: transform 0.2s;
}

.rules-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.rules-nav-link.active {
    background: var(--rules-accent);
    color: #000;
    box-shadow: 0 4px 15px var(--rules-accent-glow);
    font-weight: 600;
}

.rules-nav-link.active i {
    transform: scale(1.1);
}

.rules-update-info {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--rules-border);
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* --- КОНТЕНТ --- */
.rules-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Заголовок страницы */
.page-main-title {
    font-family: 'Druk Wide', sans-serif;
    font-size: 3rem;
    color: #fff;
    margin-bottom: 15px;
    line-height: 1;
    text-transform: uppercase;
}

.section-intro {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 800px;
}

/* Карточки разделов */
.rules-card {
    background: var(--rules-bg-dark);
    border: 1px solid var(--rules-border);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    /* ВАЖНО: Отступ для якорей, чтобы хедер не перекрывал заголовок при переходе */
    scroll-margin-top: 120px;
}

.rules-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Иконка на фоне заголовка карточки */
.card-header-icon {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.02);
    pointer-events: none;
    transform: rotate(15deg);
}

.rules-title {
    font-family: 'Druk Wide', sans-serif;
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.rules-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--rules-accent);
}

/* Текстовые блоки */
.rules-block {
    margin-bottom: 30px;
}

.rules-block:last-child {
    margin-bottom: 0;
}

.rules-subtitle {
    font-family: 'Druk Wide', sans-serif;
    font-size: 1.1rem;
    color: var(--rules-accent);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rules-text {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 15px;
    text-align: justify;
}

/* Выделенные блоки */
.rules-block.highlight {
    background: rgba(255, 180, 0, 0.05);
    border-left: 3px solid var(--rules-accent);
    padding: 20px;
    border-radius: 0 10px 10px 0;
}

.rules-block.highlight.warning {
    background: rgba(231, 76, 60, 0.08);
    border-left-color: #e74c3c;
}

.rules-block.highlight.warning .rules-subtitle {
    color: #e74c3c;
}

/* Списки */
.rules-list {
    list-style: none;
    padding: 0;
}

.rules-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    color: var(--text-main);
    line-height: 1.5;
}

.rules-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--rules-accent);
    border-radius: 50%;
}

.rules-list.forbidden li::before {
    content: '\f05e'; /* fa-ban */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    background: none;
    color: #e74c3c;
    font-size: 12px;
    top: 4px;
}

.rules-list.check li::before {
    content: '\f00c'; /* fa-check */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    background: none;
    color: #2ecc71;
    font-size: 12px;
    top: 4px;
}

/* Grid для политики данных */
.rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.rules-grid-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 12px;
}

.rules-grid-item h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rules-grid-item h4 i {
    color: var(--rules-accent);
}

.rules-grid-item ul {
    list-style: none;
    padding: 0;
}

.rules-grid-item ul li {
    padding-left: 20px;
    position: relative;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.rules-grid-item ul li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--rules-accent);
}

/* Контактная карточка */
.contact-card {
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 180, 0, 0.05), transparent);
}

.contact-card .rules-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #0077ff; /* VK color */
    color: #fff;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    margin-top: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 119, 255, 0.3);
}

/* Статистика в футере */
.footer-ip-stats {
    margin-top: 0;
    display: flex;
    gap: 20px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
}

.ip-stat-item i {
    color: var(--rules-accent);
    margin-right: 5px;
}

/* --- АДАПТИВНОСТЬ --- */

@media (max-width: 1024px) {
    .rules-layout {
        grid-template-columns: 240px 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .rules-wrapper {
        padding-top: 80px;
    }

    .rules-layout {
        display: block; /* Убираем грид */
    }

    /* Превращаем сайдбар в горизонтальное меню */
    .sidebar-sticky {
        position: relative;
        top: 0;
        margin-bottom: 30px;
        background: var(--rules-bg-dark);
        padding: 15px;
    }

    .rules-nav-header,
    .rules-update-info {
        display: none; /* Скрываем лишнее */
    }

    .rules-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 5px;
        gap: 10px;
        -webkit-overflow-scrolling: touch; /* Плавный скролл на iOS */
    }

    /* Скрываем скроллбар */
    .rules-nav::-webkit-scrollbar {
        display: none;
    }

    .rules-nav-link {
        white-space: nowrap; /* Текст в одну строку */
        background: rgba(255, 255, 255, 0.05);
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    .rules-nav-link i {
        display: none; /* Скрываем иконки для экономии места */
    }

    .page-main-title {
        font-size: 2rem;
        text-align: center;
    }

    .section-intro {
        text-align: center;
        font-size: 1rem;
    }

    .rules-grid {
        grid-template-columns: 1fr;
    }

    .rules-card {
        padding: 25px;
    }

    .footer-ip-stats {
        flex-direction: column;
        gap: 5px;
        align-items: center;
        margin-top: 15px;
    }
}