/* Rules Modal */
.rules-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20000;
    animation: fadeIn 0.3s ease;
}

.rules-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rules-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.rules-modal-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background-color: #1a1a1a;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: slideUp 0.4s ease;
    z-index: 20001;
    border: 2px solid rgba(142, 36, 170, 0.3);
}

.rules-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid rgba(142, 36, 170, 0.3);
    background: linear-gradient(135deg, rgba(142, 36, 170, 0.1), rgba(106, 27, 154, 0.1));
}

.rules-modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #8e24aa;
    font-family: 'Prompt', sans-serif;
    margin: 0;
}

.rules-modal-close {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.rules-modal-close:hover {
    background: rgba(142, 36, 170, 0.7);
    transform: rotate(90deg);
}

.rules-modal-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(142, 36, 170, 0.5) transparent;
}

.rules-modal-content::-webkit-scrollbar {
    width: 6px;
}

.rules-modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.rules-modal-content::-webkit-scrollbar-thumb {
    background: rgba(142, 36, 170, 0.5);
    border-radius: 3px;
}

.rules-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(142, 36, 170, 0.7);
}

.rules-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rules-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.rules-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #8e24aa;
    font-family: 'Prompt', sans-serif;
    margin-bottom: 10px;
}

.rules-section p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Prompt', sans-serif;
    line-height: 1.6;
    margin: 0;
}

.rules-modal-footer {
    padding: 20px 30px;
    border-top: 2px solid rgba(142, 36, 170, 0.3);
    background: linear-gradient(135deg, rgba(142, 36, 170, 0.05), rgba(106, 27, 154, 0.05));
    display: flex;
    justify-content: center;
}

.rules-back-btn {
    padding: 12px 40px;
    background: linear-gradient(135deg, #8e24aa, #6a1b9a);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Prompt', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(142, 36, 170, 0.4);
}

.rules-back-btn:hover {
    background: linear-gradient(135deg, #ab47bc, #8e24aa);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(142, 36, 170, 0.6);
}

.rules-back-btn:active {
    transform: translateY(0);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media screen and (max-width: 767px) {
    .rules-modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .rules-modal-header {
        padding: 20px 25px;
    }
    
    .rules-modal-title {
        font-size: 1.5rem;
    }
    
    .rules-modal-content {
        padding: 25px;
    }
    
    .rules-modal-footer {
        padding: 15px 25px;
    }
}

@media screen and (max-width: 480px) {
    .rules-modal-container {
        border-radius: 0;
        max-height: 100vh;
        width: 100%;
    }
    
    .rules-modal-header {
        padding: 15px 20px;
    }
    
    .rules-modal-title {
        font-size: 1.3rem;
    }
    
    .rules-modal-content {
        padding: 20px;
    }
    
    .rules-section h3 {
        font-size: 1.1rem;
    }
    
    .rules-section p {
        font-size: 0.9rem;
    }
}

