.rules-hero {
    position: relative;
    padding: 140px 0 80px;
    overflow: hidden;
    background: linear-gradient(135deg, #FF5722 0%, #E64A19 50%, #D84315 100%);
}

.rules-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.08) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 0;
    animation: heroShine 15s ease-in-out infinite;
}

@keyframes heroShine {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.rules-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.rules-hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FF5722 0%, #E64A19 50%, #D84315 100%);
}

.rules-hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.rules-hero-content {
    text-align: center;
    color: #fff;
    position: relative;
    z-index: 2;
}

.rules-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.25);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    animation: fadeInUp 0.8s ease, badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.rules-badge i {
    font-size: 16px;
    animation: iconRotate 4s linear infinite;
}

@keyframes iconRotate {
    0%, 90%, 100% { transform: rotate(0deg); }
    95% { transform: rotate(15deg); }
}

.rules-title {
    font-size: 56px;
    font-weight: 900;
    margin-bottom: 16px;
    text-shadow: 
        4px 4px 0 rgba(0,0,0,0.2),
        0 0 40px rgba(255,255,255,0.3),
        0 0 80px rgba(255,255,255,0.2);
    animation: fadeInUp 0.8s ease 0.1s backwards, titleGlow 3s ease-in-out infinite;
    letter-spacing: 2px;
}

@keyframes titleGlow {
    0%, 100% { 
        text-shadow: 
            4px 4px 0 rgba(0,0,0,0.2),
            0 0 40px rgba(255,255,255,0.3),
            0 0 80px rgba(255,255,255,0.2);
    }
    50% { 
        text-shadow: 
            4px 4px 0 rgba(0,0,0,0.2),
            0 0 60px rgba(255,255,255,0.5),
            0 0 100px rgba(255,255,255,0.3);
    }
}

.rules-description {
    font-size: 18px;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.rules-content {
    padding: 80px 0;
    background: var(--bg-primary);
}

.rules-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.rules-category {
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 32px;
    border: 2px solid rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.rules-category::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.6s ease;
}

.rules-category:hover::before {
    left: 100%;
}

[data-theme="dark"] .rules-category {
    border-color: rgba(255,255,255,0.08);
    background: #1e1e1e;
}

.rules-category:hover {
    box-shadow: 
        var(--shadow-lg),
        0 0 0 2px var(--category-color),
        0 0 40px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--category-color);
    position: relative;
}

.category-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--category-color), transparent);
    transition: width 0.6s ease;
}

.rules-category:hover .category-header::after {
    width: 100%;
}

.category-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--category-color), color-mix(in srgb, var(--category-color) 70%, black));
    border-radius: 16px;
    color: #fff;
    font-size: 28px;
    box-shadow: 
        0 8px 24px rgba(0,0,0,0.15),
        0 0 0 4px rgba(255,255,255,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.category-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--category-color), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.rules-category:hover .category-icon {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 
        0 12px 32px rgba(0,0,0,0.2),
        0 0 0 4px rgba(255,255,255,0.2);
}

.rules-category:hover .category-icon::before {
    opacity: 0.3;
}

.category-header h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.rule-item {
    background: var(--bg-primary);
    border-radius: 16px;
    margin-bottom: 16px;
    overflow: hidden;
    border: 2px solid rgba(0,0,0,0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.rule-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, var(--category-color), transparent);
    transition: height 0.4s ease;
}

.rule-item:hover::before,
.rule-item.active::before {
    height: 100%;
}

[data-theme="dark"] .rule-item {
    background: #2a2a2a;
    border-color: rgba(255,255,255,0.06);
}

.rule-item:last-child {
    margin-bottom: 0;
}

.rule-item:hover {
    border-color: var(--category-color);
    box-shadow: 
        0 4px 16px rgba(0,0,0,0.08),
        0 0 0 1px var(--category-color);
    transform: translateX(4px);
}

.rule-item.active {
    border-color: var(--category-color);
    box-shadow: 
        0 8px 24px rgba(0,0,0,0.12),
        0 0 0 2px var(--category-color);
    background: linear-gradient(to right, rgba(255,255,255,0.02), var(--bg-primary));
}

[data-theme="dark"] .rule-item.active {
    background: linear-gradient(to right, rgba(255,255,255,0.03), #2a2a2a);
}

.rule-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    cursor: pointer;
    user-select: none;
    transition: var(--transition-normal);
}

.rule-header:hover {
    background: rgba(0,0,0,0.02);
}

[data-theme="dark"] .rule-header:hover {
    background: rgba(255,255,255,0.02);
}

.rule-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--category-color), color-mix(in srgb, var(--category-color) 70%, black));
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 
        0 4px 12px rgba(0,0,0,0.15),
        inset 0 -2px 8px rgba(0,0,0,0.2),
        inset 0 2px 8px rgba(255,255,255,0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.rule-number::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.rule-item:hover .rule-number,
.rule-item.active .rule-number {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 
        0 6px 20px rgba(0,0,0,0.25),
        inset 0 -2px 8px rgba(0,0,0,0.2),
        inset 0 2px 8px rgba(255,255,255,0.3);
}

.rule-item:hover .rule-number::before {
    left: 100%;
    top: 100%;
}

.rule-title-text {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.rule-arrow {
    font-size: 18px;
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.rule-item.active .rule-arrow {
    transform: rotate(180deg);
    color: var(--category-color);
}

.rule-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.rule-item.active .rule-content {
    max-height: 1000px;
    padding: 0 24px 24px;
}

.rule-content p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.rule-content p:last-child {
    margin-bottom: 0;
}

.rule-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

.rule-content ul {
    list-style: none;
    margin: 16px 0;
    padding: 0;
}

.rule-content ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.rule-content ul li:before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--category-color);
    font-weight: 700;
    font-size: 16px;
}

.punishment {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin: 12px 0;
    box-shadow: 
        0 4px 12px rgba(244,67,54,0.3),
        inset 0 1px 0 rgba(255,255,255,0.2),
        inset 0 -1px 0 rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.punishment::before {
    content: '⚠';
    font-size: 16px;
    animation: warningPulse 2s ease-in-out infinite;
}

@keyframes warningPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

.punishment:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(244,67,54,0.4),
        inset 0 1px 0 rgba(255,255,255,0.3),
        inset 0 -1px 0 rgba(0,0,0,0.2);
}

.note {
    padding: 16px 20px;
    background: linear-gradient(to right, rgba(255,152,0,0.15), rgba(255,152,0,0.05));
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    font-size: 14px;
    margin-top: 16px;
    position: relative;
    box-shadow: 0 2px 8px rgba(255,152,0,0.1);
    transition: all 0.3s ease;
}

.note::before {
    content: '💡';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    opacity: 0.3;
}

.note:hover {
    background: linear-gradient(to right, rgba(255,152,0,0.2), rgba(255,152,0,0.08));
    box-shadow: 0 4px 16px rgba(255,152,0,0.2);
    transform: translateX(4px);
}

.note strong {
    color: var(--primary);
    font-weight: 800;
}

.rules-footer {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 60px;
}

.rules-footer-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 32px;
    background: var(--bg-secondary);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.rules-footer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.rules-footer-card:hover::before {
    transform: scaleX(1);
}

.rules-footer-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        var(--shadow-lg),
        0 0 0 2px var(--primary);
    border-color: var(--primary);
}

.rules-footer-card i {
    font-size: 32px;
    color: var(--primary);
    flex-shrink: 0;
    transition: all 0.4s ease;
    filter: drop-shadow(0 4px 8px rgba(255,152,0,0.3));
}

.rules-footer-card:hover i {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 8px 16px rgba(255,152,0,0.5));
}

.rules-footer-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.rules-footer-card p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

@media (max-width: 1024px) {
    .rules-title {
        font-size: 42px;
    }

    .category-header h2 {
        font-size: 26px;
    }

    .category-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .rules-hero {
        padding: 120px 0 60px;
    }

    .rules-title {
        font-size: 36px;
    }

    .rules-description {
        font-size: 16px;
    }

    .rules-content {
        padding: 60px 0;
    }

    .rules-category {
        padding: 24px 20px;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .category-header h2 {
        font-size: 24px;
    }

    .category-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .rule-header {
        padding: 16px 20px;
        gap: 12px;
    }

    .rule-number {
        min-width: 48px;
        height: 48px;
        font-size: 14px;
    }

    .rule-title-text {
        font-size: 16px;
    }

    .rule-item.active .rule-content {
        padding: 0 20px 20px;
    }

    .rules-footer {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 40px;
    }

    .rules-footer-card {
        padding: 24px;
    }

    .rules-footer-card i {
        font-size: 28px;
    }

    .rules-footer-card h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .rules-title {
        font-size: 28px;
    }

    .rules-description {
        font-size: 14px;
    }

    .category-header h2 {
        font-size: 20px;
    }

    .rule-header {
        padding: 14px 16px;
    }

    .rule-number {
        min-width: 44px;
        height: 44px;
        font-size: 13px;
    }

    .rule-title-text {
        font-size: 15px;
    }

    .rule-content p {
        font-size: 14px;
    }

    .rule-item.active .rule-content {
        padding: 0 16px 16px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Дополнительные стили для совместимости */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

[data-theme="dark"] .mobile-menu {
    background: var(--bg-secondary);
}

[data-theme="dark"] .rules-category {
    background: var(--bg-secondary);
}

[data-theme="dark"] .rule-item {
    background: var(--bg-primary);
    border-color: rgba(255,255,255,0.05);
}

[data-theme="dark"] .rule-item:hover {
    border-color: var(--category-color);
    background: rgba(255,255,255,0.02);
}

[data-theme="dark"] .rule-header:hover {
    background: rgba(255,255,255,0.03);
}

[data-theme="dark"] .rules-footer-card {
    background: var(--bg-secondary);
}

[data-theme="dark"] .punishment {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
}

[data-theme="dark"] .note {
    background: rgba(255,152,0,0.15);
    border-left-color: var(--primary);
}
