html {
    overflow-y: scroll;
}

.rules-container {
    width: 95%;
    margin: 0 auto;
    padding: 5% 0;
    padding-bottom: 3rem;
    color: var(--text-color-primary);
    opacity: 0;
    overflow-y: hidden;
}

.rules-container.visible {
    animation: fadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rules-section {
    margin-bottom: 20px;
    background: var(--block-color-fourth);
    border-radius: var(--border-radius-primary);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
}

.rules-section.visible {
    animation: fadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.rules-header {
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--block-color-third);
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rules-header:hover {
    background: var(--block-color-secondary);
}

.rules-header h4 {
    margin: 0;
    font-size: 1em;
}

.rules-content-wrapper {
    height: 0;
    overflow: hidden;
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.rules-content {
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rules-content.active {
    opacity: 1;
}

.rules-item {
    margin-bottom: 15px;
}

.rules-subitem {
    margin-left: 20px;
    color: var(--text-color-secondary);
    font-size: 0.9em;
}

.chevron {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 24px;
    height: 24px;
}

.rules-header.active .chevron {
    transform: rotate(180deg);
}


.rules-container {
    padding-bottom: 10%;
    padding-top: 3%;
}
