   :root {
            --bg-color: #0f0f0f;
            --accent: #5f65dc;
            --accent-hover: #5158d1;
            --card-bg: #181818;
            --card-bg-hover: rgba(22, 22, 22, 1);
            --border-color: rgba(255, 255, 255, .04);
            --text-primary: #ffffff;
            --text-secondary: rgba(255, 255, 255, 0.7);
            --input-bg: rgba(22, 22, 22, 1);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Poppins', 'Segoe UI', sans-serif;
            background: var(--bg-color);
            color: var(--text-primary);
            padding: 20px;
        }

        .container {
            max-width: 1800px;
            margin: 0 auto;
        }

        h1 {
            text-align: center;
            margin-bottom: 30px;
            font-size: 2.5em;
            color: var(--text-primary);
        }

        /* Слайдер серверов */
        .servers-slider {
            margin-bottom: 30px;
            overflow-x: auto;
            padding: 10px 0;
        }

        .servers-slider::-webkit-scrollbar {
            height: 6px;
        }

        .servers-slider::-webkit-scrollbar-track {
            background: var(--card-bg);
            border-radius: 3px;
        }

        .servers-slider::-webkit-scrollbar-thumb {
            background: var(--accent);
            border-radius: 3px;
        }

        .servers-list {
            display: flex;
            gap: 20px;
            padding: 10px;
        }

        .server-card {
            min-width: 344px;
            min-height: 120px;
            background: var(--card-bg-hover);
            border: 2px solid var(--border-color);
            border-radius: 12px;
            padding: 20px;
            cursor: pointer;
            transition: all 0.3s;
            position: relative;
            display: flex;
            height: fit-content;
            align-items: center;
            gap: 14px;
        }

        .server-card:hover {
            border-color: var(--accent);
            transform: translateY(-5px);
        }

        .server-card.active {
            border-color: var(--accent);
            background: linear-gradient(135deg, rgba(95, 101, 220, 0.1), rgba(22, 22, 22, 1));
        }

        .server-card-icon {
            width: 30px;
            height: 30px;
            background: rgba(95, 101, 220, 0.1);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .server-card-icon i {
            font-size: 16px;
            color: var(--accent);
        }

        .server-card-title {
            font-size: 14px;
            color: var(--text-secondary);
            margin-bottom: 5px;
            position: absolute;
            top: 0;
            left: 0;
        }

        .server-card-name {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 8px;
        }

        .server-card-ip {
            font-size: 13px;
            color: var(--text-secondary);
        }

        .server-card-check {
            position: absolute;
            top: calc(50% - 12px);
            right: 15px;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: #28a745;
            display: none;
            align-items: center;
            justify-content: center;
        }

        .server-card.active .server-card-check {
            display: flex;
        }

        .server-card-check i {
            color: white;
            font-size: 12px;
        }

        /* Основной контент */
        .main-content {
            display: grid;
            grid-template-columns: 350px 1fr;
            gap: 20px;
        }

        /* Боковая панель с категориями */
        .categories-sidebar {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 20px;
            height: fit-content;
        }

        .sidebar-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid var(--border-color);
        }

        .sidebar-header-icon {
            width: 40px;
            height: 40px;
            background: rgba(95, 101, 220, 0.1);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .sidebar-header-icon i {
            color: var(--accent);
        }

        .sidebar-header-title {
            font-size: 18px;
            font-weight: 600;
        }

        .categories-list {
            list-style: none;
        }

        .category-item {
            background: var(--card-bg-hover);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .category-item:hover {
            border-color: var(--accent);
            background: rgba(95, 101, 220, 0.05);
        }

        .category-item.active {
            border-color: var(--accent);
            background: rgba(95, 101, 220, 0.1);
        }

        .category-item-icon {
            width: 40px;
            height: 40px;
            background: rgba(95, 101, 220, 0.1);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            flex-shrink: 0;
        }

        .category-item-body {
            flex: 1;
            min-width: 0;
        }

        .category-item-name {
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 3px;
            color: var(--text-primary);
        }

        .category-item-desc {
            font-size: 12px;
            color: var(--text-secondary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .category-item-actions {
            display: none;
            gap: 5px;
        }

        .category-item:hover .category-item-actions {
            display: flex;
        }

        .btn-icon {
            width: 30px;
            height: 30px;
            border: none;
            background: var(--accent);
            color: white;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .btn-icon:hover {
            background: var(--accent-hover);
        }

        .btn-icon.danger {
            background: #dc3545;
        }

        .btn-icon.danger:hover {
            background: #c82333;
        }

        /* Правый блок с правилами */
        .rules-content {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 25px;
        }

        .rules-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            padding-bottom: 20px;
            border-bottom: 1px solid var(--border-color);
        }

        .rules-header-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .rules-header-icon {
            width: 45px;
            height: 45px;
            background: rgba(95, 101, 220, 0.1);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .rules-header-icon i {
            color: var(--accent);
            font-size: 20px;
        }

        .rules-header-title {
            font-size: 22px;
            font-weight: 600;
        }

        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .btn-primary {
            background: var(--accent);
            color: white;
        }

        .btn-primary:hover {
            background: var(--accent-hover);
            transform: translateY(-2px);
        }

        .rules-list {
            list-style: none;
        }

        .rule-item {
            background: var(--card-bg-hover);
            border: 1px solid var(--border-color);
            border-left: 4px solid var(--accent);
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 15px;
            transition: all 0.3s;
        }

        .rule-item:hover {
            background: rgba(95, 101, 220, 0.05);
            box-shadow: 0 4px 12px rgba(95, 101, 220, 0.15);
        }

        .rule-item-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 12px;
        }

        .rule-number {
            background: var(--accent);
            color: white;
            padding: 5px 12px;
            border-radius: 6px;
            font-weight: 700;
            font-size: 14px;
        }

        .rule-item-actions {
            display: none;
            gap: 5px;
        }

        .rule-item:hover .rule-item-actions {
            display: flex;
        }   

        .rule-text {
            color: var(--text-primary);
            font-size: 18px;
            font-weight: 500;
            line-height: 1.6;
            margin-bottom: 10px;
        }

        .rule-punishment {
            background: rgba(246, 185, 73, 0.1);
            border-left: 3px solid #f6b949;
            padding: 10px 15px;
            border-radius: 6px;
            color: #f6b949;
            font-size: 14px;
            font-weight: 600;
        }

        .rule-punishment::before {
            content: "⚠️ Наказание: ";
        }

        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: var(--text-secondary);
        }

        .empty-state i {
            font-size: 64px;
            margin-bottom: 20px;
            opacity: 0.3;
            color: var(--accent);
        }

        /* Модальное окно */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            overflow: auto;
        }

        .modal-content {
            background: var(--card-bg);
            margin: 3% auto;
            padding: 30px;
            border: 1px solid var(--border-color);
            border-radius: 12px;
            width: 90%;
            max-width: 600px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid var(--border-color);
        }

        .modal-header h2 {
            font-size: 22px;
        }

        .close {
            color: var(--text-secondary);
            font-size: 32px;
            font-weight: bold;
            cursor: pointer;
            line-height: 1;
            transition: color 0.3s;
        }

        .close:hover {
            color: var(--accent);
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: var(--text-secondary);
        }

        .form-group input,
        .form-group textarea {
            width: 100%;
            padding: 12px;
            border: 2px solid var(--border-color);
            border-radius: 6px;
            background: var(--input-bg);
            color: var(--text-primary);
            font-size: 14px;
            transition: border-color 0.3s;
        }

        .form-group input:focus,
        .form-group textarea:focus {
            border-color: var(--accent);
            outline: none;
        }

        .form-group textarea {
            resize: vertical;
            min-height: 100px;
        }

        .form-actions {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            margin-top: 25px;
        }

        .btn-secondary {
            background: #6c757d;
            color: white;
        }

        .btn-secondary:hover {
            background: #5a6268;
        }

        .btn-success {
            background: #28a745;
            color: white;
        }

        .btn-success:hover {
            background: #218838;
        }

        .add-category-btn {
            width: 100%;
            margin-top: 10px;
            justify-content: center;
        }

        /* Уведомления */
        .notification {
            position: fixed;
            top: 20px;
            right: 20px;
            padding: 15px 20px;
            border-radius: 8px;
            color: white;
            font-weight: 600;
            z-index: 2000;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
            animation: slideIn 0.3s;
        }

        @keyframes slideIn {
            from {
                transform: translateX(400px);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        @keyframes spin {
            from {
                transform: rotate(0deg);
            }
            to {
                transform: rotate(360deg);
            }
        }

        .notification.success {
            background: #28a745;
        }

        .notification.error {
            background: #dc3545;
        }

        @media (max-width: 1024px) {
            .main-content {
                grid-template-columns: 1fr;
            }
        }

        .servers-card-icons {
            display: flex;
            align-items: center;
            justify-content: left;
            gap: 10px;
            height: fit-content;
            flex-direction: column;
        }

        .server-card-favorite {
            width: 30px;
            height: 30px;
            background: rgba(95, 101, 220, 0.1);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .server-card-favorite i {
            font-size: 16px;
            color: #f6b949;
        }
        /* ============================================
        СТИЛИ ДЛЯ ПОИСКА
        ============================================ */

        /* Контейнер для поиска серверов */
        .search-servers-container {
            margin-bottom: 20px;
        }

        /* Контейнер для поиска правил */
        .search-rules-container {
            margin-bottom: 20px;
            padding-bottom: 20px;
            border-bottom: 1px solid var(--border-color);
        }

        /* Основной блок поиска */
        .search-box {
            position: relative;
            display: flex;
            align-items: center;
            background: var(--input-bg);
            border: 2px solid var(--border-color);
            border-radius: 8px;
            padding: 0 15px;
            transition: all 0.3s;
        }

        .search-box:focus-within {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(95, 101, 220, 0.1);
        }

        /* Иконка поиска */
        .search-icon {
            color: var(--text-secondary);
            font-size: 16px;
            margin-right: 10px;
        }

        /* Поле ввода */
        .search-input {
            flex: 1;
            background: transparent;
            border: none;
            padding: 12px 0;
            color: var(--text-primary);
            font-size: 14px;
            outline: none;
        }

        .search-input::placeholder {
            color: var(--text-secondary);
        }

        /* Кнопка очистки */
        .search-clear {
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 4px;
            transition: all 0.3s;
        }

        .search-clear:hover {
            color: var(--accent);
            background: rgba(95, 101, 220, 0.1);
        }

        /* Опции поиска */
        .search-options {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 10px;
            padding: 0 5px;
        }

        /* Чекбокс */
        .search-checkbox {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            color: var(--text-secondary);
            font-size: 14px;
            user-select: none;
        }

        .search-checkbox input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
            accent-color: var(--accent);
        }

        .search-checkbox:hover {
            color: var(--text-primary);
        }

        /* Счётчик результатов */
        .search-results-count {
            font-size: 13px;
            color: var(--text-secondary);
            padding: 5px 12px;
            background: rgba(95, 101, 220, 0.1);
            border-radius: 6px;
        }

        .search-results-count strong {
            color: var(--accent);
            font-weight: 700;
        }

        /* Подсветка найденного текста */
        .highlighted {
            background: rgba(246, 185, 73, 0.3);
            color: #f6b949;
            padding-left: 2px;
            border-radius: 3px;
            font-weight: 600;
        }

        /* Сообщение "Ничего не найдено" */
        .no-results {
            text-align: center;
            padding: 40px 20px;
            color: var(--text-secondary);
        }

        .no-results i {
            font-size: 48px;
            margin-bottom: 15px;
            opacity: 0.3;
            color: var(--accent);
        }

        .no-results p {
            font-size: 16px;
            margin-bottom: 5px;
        }

        .no-results small {
            font-size: 13px;
            opacity: 0.7;
        }

        /* Категория в результатах поиска */
        .rule-item-category {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: rgba(95, 101, 220, 0.1);
            color: var(--accent);
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .rule-item-category i {
            font-size: 10px;
        }

        /* Анимация появления */
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .search-box,
        .search-options {
            animation: fadeIn 0.3s ease-out;
        }

        /* Состояние "активного поиска" */
        .search-box.searching {
            border-color: var(--accent);
        }

        .search-box.searching .search-icon {
            color: var(--accent);
            animation: pulse 1.5s ease-in-out infinite;
        }

        @keyframes pulse {
            0%, 100% {
                opacity: 1;
            }
            50% {
                opacity: 0.5;
            }
        }

        /* Адаптивность */
        @media (max-width: 768px) {
            .search-options {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }
            
            .search-results-count {
                width: 100%;
                text-align: center;
            }
        }
        /* ============================================
   СТИЛИ ДЛЯ БЛОКА ПОИСКА ПРАВИЛ
   (С ПЕРЕИМЕНОВАННЫМИ КЛАССАМИ)
   ============================================ */

/* Основной контейнер блока поиска */
.search-rules-block {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

/* Заголовок блока поиска */
.search-block-header {
    padding: 12px 15px;
    background: linear-gradient(135deg, rgba(95, 101, 220, 0.08), rgba(95, 101, 220, 0.02));
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

/* Декоративная линия сверху */
.search-block-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--accent) 20%, 
        var(--accent) 80%, 
        transparent
    );
    opacity: 0.6;
}

/* Декоративные круги на фоне */
.search-block-header::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(95, 101, 220, 0.1), transparent);
    border-radius: 50%;
    pointer-events: none;
}

.search-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

/* Иконка в заголовке */
.search-header-icon-wrapper {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(95, 101, 220, 0.25), rgba(95, 101, 220, 0.1));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 
        0 4px 16px rgba(95, 101, 220, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Анимированная рамка иконки */
.search-header-icon-wrapper::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(45deg, var(--accent), transparent, var(--accent));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.4;
    animation: rotateBorder 3s linear infinite;
}

@keyframes rotateBorder {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.search-header-icon-wrapper i {
    color: var(--accent);
    font-size: 24px;
    z-index: 1;
    animation: iconPulse 2.5s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

/* Заголовок */
.search-block-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.3;
}

#searchServerName {
    color: var(--accent);
    font-weight: 700;
    font-size: 18px;
    display: inline-block;
    position: relative;
    padding: 0 4px;
    margin-left: 4px;
}

#searchServerName::before {
    content: '';
    position: absolute;
    right: 0;
    height: calc(100% + 10px);
    width: calc(100% + 6px);
    left: -3px;
    bottom: -5px;
    background: linear-gradient(90deg, rgba(95, 101, 220, 0.2), rgba(95, 101, 220, 0.05));
    border-radius: 5px;
    z-index: -1;
}

/* Контейнер поля ввода */
.search-input-container {
    padding: 28px 30px;
    background: linear-gradient(180deg, var(--card-bg-hover), var(--card-bg));
    display: flex;
    gap: 10px;
}

/* Обёртка поля поиска */
.search-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    padding: 0 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    width: 60%;
}



.search-field-wrapper:hover {
    border-color: rgba(95, 101, 220, 0.4);
    box-shadow: 
        0 4px 16px rgba(95, 101, 220, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.search-field-wrapper:focus-within {
    border-color: var(--accent);
    background: var(--input-bg);
    box-shadow: 
        0 0 0 4px rgba(95, 101, 220, 0.12),
        0 8px 28px rgba(95, 101, 220, 0.25);
    transform: translateY(-3px);
}

/* Иконка поиска в поле */
.search-field-icon {
    color: var(--text-secondary);
    font-size: 19px;
    margin-right: 14px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.search-field-wrapper:focus-within .search-field-icon {
    color: var(--accent);
    transform: scale(1.15) rotate(15deg);
}

/* Поле ввода */
.search-field-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 18px 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    outline: none;
}

.search-field-input::placeholder {
    color: var(--text-secondary);
    font-weight: 400;
    opacity: 0.7;
}

.search-field-input:focus::placeholder {
    opacity: 0.5;
}

/* Кнопка очистки */
.search-field-clear {
    background: rgba(220, 53, 69, 0.12);
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.search-field-clear:hover {
    background: #dc3545;
    color: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.search-field-clear:active {
    transform: rotate(90deg) scale(0.95);
}

/* Опции фильтрации */
.search-filter-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    width: 40%;
}

/* Чекбокс фильтра */
.search-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    user-select: none;
    transition: all 0.3s;
    padding: 6px 10px;
    border-radius: 8px;
}

.search-filter-checkbox:hover {
    color: var(--text-primary);
    background: rgba(95, 101, 220, 0.08);
}

/* Кастомный чекбокс */
.search-filter-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 7px;
    background: var(--card-bg-hover);
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.search-filter-checkbox input[type="checkbox"]:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(95, 101, 220, 0.1);
}

.search-filter-checkbox input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(95, 101, 220, 0.3);
}

.search-filter-checkbox input[type="checkbox"]:checked::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 15px;
    font-weight: 900;
    animation: checkmarkPop 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes checkmarkPop {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-45deg);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2) rotate(10deg);
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

/* Счётчик результатов */
.search-count-badge {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(95, 101, 220, 0.15), rgba(95, 101, 220, 0.08));
    border-radius: 10px;
    border: 1px solid rgba(95, 101, 220, 0.25);
    font-weight: 500;
    animation: badgeSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(95, 101, 220, 0.15);
}

@keyframes badgeSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.search-count-badge strong {
    color: var(--accent);
    font-weight: 800;
    font-size: 17px;
    margin: 0 5px;
    text-shadow: 0 2px 4px rgba(95, 101, 220, 0.2);
}

/* Состояние активного поиска */
.search-field-wrapper.searching {
    border-color: var(--accent);
}

.search-field-wrapper.searching .search-field-icon {
    animation: searchSpin 1.2s linear infinite;
}

@keyframes searchSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .search-block-header {
        padding: 20px;
    }
    
    .search-header-icon-wrapper {
        width: 48px;
        height: 48px;
    }
    
    .search-header-icon-wrapper i {
        font-size: 20px;
    }
    
    .search-block-title {
        font-size: 18px;
    }
    
    .search-input-container {
        padding: 20px;
    }
    
    .search-filter-options {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .search-count-badge {
        width: 100%;
        text-align: center;
    }

    @media (max-width: 768px) { 
    .search-field-wrapper { width: 100%; }
    .search-input-container {
        flex-direction: column;
    }
    .search-filter-options {
        width: 100%;
    }
}
}

/* Плавные переходы для всех элементов */
.search-rules-block * {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Эффект фокуса для поля ввода */
.search-field-input:focus {
    caret-color: var(--accent);
}

/* Дополнительный hover эффект для всего контейнера */
.search-input-container:hover .search-field-wrapper:not(:focus-within) {
    border-color: rgba(95, 101, 220, 0.25);
}
.rules-contents {
    display: flex;
    gap: 20px;
    flex-direction: column;
}
/* Quill редактор */
#ruleTextEditor {
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.ql-toolbar {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    background: var(--input-bg) !important;
    border-color: var(--border-color) !important;
}

.ql-container {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-color: var(--border-color) !important;
    font-size: 14px;
}

.ql-editor {
    min-height: 150px;
    color: #fff !important;
}

.ql-editor.ql-blank::before {
    color: rgba(0, 0, 0, 0.6);
}

/* Стили для списков в редакторе и при отображении */
.ql-editor ol,
.ql-editor ul,
.rule-text ol,
.rule-text ul {
    padding-left: 1.5em;
    margin: 0.5em 0;
}

.ql-editor li,
.rule-text li {
    margin: 0.25em 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Стили для ссылок */
.ql-editor a,
.rule-text a {
    color: var(--accent);
    text-decoration: underline;
    transition: all 0.3s;
}

.ql-editor a:hover,
.rule-text a:hover {
    color: var(--accent-hover);
    text-decoration: none;
}

/* Кнопка "Вернуться назад" */
.back-to-home {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(95, 101, 220, 0.15), rgba(95, 101, 220, 0.08));
    border: 2px solid rgba(95, 101, 220, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(95, 101, 220, 0.1);
}

.back-to-home::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.back-to-home:hover::before {
    left: 100%;
}

.back-to-home:hover {
    background: linear-gradient(135deg, rgba(95, 101, 220, 0.25), rgba(95, 101, 220, 0.15));
    border-color: var(--accent);
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(95, 101, 220, 0.25);
}

.back-btn-icon {
    width: 36px;
    height: 36px;
    background: rgba(95, 101, 220, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-btn-icon i {
    font-size: 16px;
    color: var(--accent);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-home:hover .back-btn-icon {
    background: var(--accent);
    transform: scale(1.1);
}

.back-to-home:hover .back-btn-icon i {
    color: #fff;
    transform: translateX(-3px);
}

.back-btn-text {
    position: relative;
    z-index: 1;
}

.back-to-home:active {
    transform: translateX(-3px) scale(0.98);
}

@media (max-width: 768px) {
    .back-to-home {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .back-btn-icon {
        width: 32px;
        height: 32px;
    }
    
    .back-btn-icon i {
        font-size: 14px;
    }
}