/* Rules & Updates Modal */
.rules-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: fadeIn 0.25s ease-out;
}

.rules-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Closing animation */
.rules-modal.closing {
    animation: fadeOut 0.25s ease-out forwards;
}

.rules-modal.closing .rules-modal-content {
    animation: slideDown 0.35s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.rules-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    transition: backdrop-filter 0.3s ease;
}

.rules-modal.closing .rules-modal-overlay {
    backdrop-filter: blur(0px);
}

.rules-modal-content {
    position: relative;
    width: 90%;
    max-width: 750px;
    max-height: 88vh;
    background: #181a1c;
    border-radius: 20px;
    border: 1px solid rgba(76, 175, 80, 0.25);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(76, 175, 80, 0.1);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(40px) scale(0.96);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(40px) scale(0.96);
        opacity: 0;
    }
}

.rules-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2.5rem;
    border-bottom: 1px solid rgba(76, 175, 80, 0.2);
    background: linear-gradient(180deg, rgba(76, 175, 80, 0.08) 0%, transparent 100%);
}

.rules-modal-header h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rules-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0aec0;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
}

.rules-modal-close:hover {
    background: rgba(239, 83, 80, 0.15);
    border-color: rgba(239, 83, 80, 0.3);
    color: #EF5350;
    transform: rotate(90deg) scale(1.05);
}

.rules-modal-tabs {
    display: flex;
    gap: 0.75rem;
    padding: 0 2.5rem;
    background: transparent;
    margin-top: -1px;
}

.rules-tab {
    flex: 1;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    color: #a0aec0;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    position: relative;
}

.rules-tab:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.rules-tab.active {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.12);
    border-color: rgba(76, 175, 80, 0.3);
    box-shadow: 0 -2px 12px rgba(76, 175, 80, 0.15);
}

.rules-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #4CAF50, transparent);
}

.rules-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
}

.rules-modal-body::-webkit-scrollbar {
    width: 10px;
}

.rules-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin: 8px 0;
}

.rules-modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(76, 175, 80, 0.4), rgba(76, 175, 80, 0.25));
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.rules-modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(76, 175, 80, 0.6), rgba(76, 175, 80, 0.4));
    background-clip: padding-box;
}

.rules-tab-content {
    display: none;
}

.rules-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Rules Tab Styles */
.rules-section {
    margin-bottom: 2rem;
}

.rules-section:last-child {
    margin-bottom: 0;
}

.rules-section h3 {
    color: #e2e8f0;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rules-section h3 i {
    color: #4CAF50;
    font-size: 1.1rem;
}

.rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rules-list li {
    padding: 1rem 1.25rem;
    margin-bottom: 0.65rem;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.06) 0%, rgba(76, 175, 80, 0.03) 100%);
    border-left: 4px solid #4CAF50;
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rules-list li:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.12) 0%, rgba(76, 175, 80, 0.06) 100%);
    transform: translateX(8px);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.15);
    border-left-width: 5px;
}

.rules-list li::before {
    content: "•";
    color: #4CAF50;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-right: 0.5rem;
}

.rules-note {
    padding: 1rem;
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #FFC107;
    border-radius: 8px;
    color: #cbd5e0;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Updates Tab Styles */
.update-item {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.15) 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(76, 175, 80, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.update-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(76, 175, 80, 0.15);
}

.update-header h3 {
    color: #4CAF50;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.update-date {
    color: #a0aec0;
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 20px;
}

.update-section {
    margin-bottom: 1.5rem;
}

.update-section:last-child {
    margin-bottom: 0;
}

.update-section h4 {
    color: #e2e8f0;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.update-section h4::before {
    content: "";
    width: 4px;
    height: 1rem;
    background: #4CAF50;
    border-radius: 2px;
}

.update-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.update-list li {
    padding: 0.85rem 1.25rem;
    margin-bottom: 0.6rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 0.92rem;
    line-height: 1.6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.update-list li:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.08) 0%, rgba(76, 175, 80, 0.04) 100%);
    transform: translateX(5px);
    border-color: rgba(76, 175, 80, 0.2);
    box-shadow: 0 2px 12px rgba(76, 175, 80, 0.1);
}

.update-list li::before {
    content: "✓";
    color: #4CAF50;
    font-weight: bold;
    display: inline-block;
    width: 1.5em;
    margin-right: 0.25rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .rules-modal-content {
        width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .rules-modal-header {
        padding: 1.25rem 1.5rem;
    }
    
    .rules-modal-header h2 {
        font-size: 1.25rem;
    }
    
    .rules-modal-tabs {
        padding: 0.75rem 1rem 0;
    }
    
    .rules-tab {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }
    
    .rules-modal-body {
        padding: 1.5rem;
    }
    
    .rules-section h3 {
        font-size: 1.1rem;
    }
    
    .update-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
