.rules-page {
    position: fixed;              
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../ui/fon.jpg') no-repeat center center fixed;
    background-size: cover;
    display: none;               
    flex-direction: column;
    align-items: center;
    z-index: 2000;                  
}

.rules-page.active {
    display: flex;               
}

.rules-title {
    font-size: 35px;
    margin-bottom: 30px;
    margin-top: 45px;
    width: 80%;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 3px;
    
    /* Текст с градиентом для богатства оттенков */
    background: linear-gradient(135deg, #a57c2c 0%, #cfaa4a 45%, #b58a2a 80%, #e5c168 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    
    /* Тени только для текста, не влияют на border-image */
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.5),
        0 0 8px rgba(165, 124, 44, 0.4),
        0 0 20px rgba(207, 170, 74, 0.2);
    
    padding-bottom: 5px;
    border-bottom: 60px solid transparent;
    border-image: url('../ui/long.png') 80 0;
    box-sizing: border-box;
}

.rules-container {
    display: flex;
    width: 90%;
    max-width: 1700px;
    height: calc(90vh - 120px);
    gap: 25px;
}

.rules-sidebar {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 5px;
    margin-top: -21px;
}

.rules-sections h3,
.instructions h3 {
    font-size: 22px;
    margin-bottom: 10px;
    text-transform: uppercase;
    text-align: center;
    
    /* Благородное золото с градиентом */
    background: linear-gradient(135deg, #a57c2c 0%, #cfaa4a 45%, #b58a2a 80%, #e5c168 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    
    /* Мягкая тень для объема */
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.4),
        0 0 5px rgba(165, 124, 44, 0.3);
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    margin: 10px 0;
}

.rules-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rule-item {
    padding: 10px 10px;
    border: 1px solid #222;
    border-radius: 4px;
    cursor: url('../ui/cursor_hover.png'), pointer;
    transition: all 0.3s ease;
    background: rgba(30, 30, 40, 0.2);
}

.rule-item:hover {
    transform: translateX(5px);
    border-color: #d4af37;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
}

.rule-item.active {
    border-color: #d4af37;
    box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.3);
}

.rule-item__title {
    font-size: 16px;
    margin-bottom: 5px;
    
    /* Приглушенное золото для подзаголовков внутри правил */
    background: linear-gradient(135deg, #b8923c 0%, #cfaa5a 45%, #c49a3a 80%, #e0bc68 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    
    text-shadow: 
        0.5px 0.5px 1px rgba(0, 0, 0, 0.3),
        0 0 3px rgba(165, 124, 44, 0.2);
}

.rule-item__description {
    color: #c9c9c9;
    font-size: 13px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}

.rules-content {
    flex: 1;
    background: rgba(30, 30, 40, 0.2);
    border: 1px solid #222;
    border-radius: 5px;
    padding: 20px;
    overflow-y: auto;
}

.no-content-selected {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #888;
    font-size: 18px;
    text-align: center;
}

.no-content-selected .icon {
    font-size: 60px;
    margin-bottom: 20px;
    color: #d4af37;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.rule-modal-overlay.active .rule-modal {
    transform: scale(1);            
    opacity: 1;                     
}

.rule-modal__title {
    font-size: 30px;
    text-transform: uppercase;
    text-align: center;
    
    /* Благородное золото с градиентом */
    background: linear-gradient(135deg, #a57c2c 0%, #cfaa4a 45%, #b58a2a 80%, #e5c168 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    
    /* Мягкая тень для объема */
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.4),
        0 0 5px rgba(165, 124, 44, 0.3);
}

.rule-modal__content {
    color: #d9d9d9;
    font-size: 13px;
    line-height: 0.9;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}

.rule-modal__content h3 {
    font-size: 18px;
    font-style: normal;
    
    /* Золото для подзаголовков внутри контента */
    background: linear-gradient(135deg, #b8923c 0%, #cfaa5a 45%, #c49a3a 80%, #e0bc68 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    
    text-shadow: 
        0.5px 0.5px 1px rgba(0, 0, 0, 0.3),
        0 0 4px rgba(165, 124, 44, 0.25);
    
    margin-top: 10px;
    margin-bottom: 8px;
}

.bloc-rule {
    display: flex;
    align-items: center;
    justify-content: left;
    gap: 15px;                      
    padding-bottom: 5px;  
    letter-spacing: 1.5px;
}

.bloc-rule p {
    line-height: 18px;
}

.rule-modal__image {
    height: 70px;                   
}

.back-to-menu-btn {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    border: none;
    padding: 5px 12px;
    font-size: 13px;
    font-family: 'Gwent', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: url('../ui/cursor_hover.png'), pointer;
    transition: all 0.3s ease;
    border-radius: 3px;
    position: absolute;
    left: 10px;
    top: 10px;
    overflow: hidden;
    
    /* Приглушенное старинное золото */
    color: #be9a48;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.back-to-menu-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #be9a48, #e5c168, #be9a48, transparent);
    transition: all 0.4s ease;
    transform: translateX(-50%);
}

.back-to-menu-btn:hover {
    scale: 1.03;
    background: rgba(0, 0, 0, 0.6);
    color: #cfaf58;
    text-shadow: 0 0 8px rgba(207, 175, 88, 0.5);
}

.back-to-menu-btn:hover::after {
    width: 85%;
}

.back-to-menu-btn:active {
    transform: scale(1.05);
}

.bloc-rule li {
    line-height: 1.2;
}

.rules-title {
    opacity: 0;
    transform: translateY(-50px);
    animation: fadeInDown 0.5s ease forwards;
}

.rules-container {
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 0.5s ease forwards;
}