.events-modal {
    display: none !important;
    position: fixed !important;
    z-index: 99999 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    animation: fadeIn 0.3s ease;
    pointer-events: auto !important;
    visibility: hidden !important;
    opacity: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: auto !important;
}

.events-modal[data-open="true"],
.events-modal[style*="display: block"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.events-content {
    position: relative;
    margin: 2% auto;
    width: 90%;
    max-width: 1200px;
    background: linear-gradient(135deg, #6e48aa, #9d50bb);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: slideInUp 0.4s ease;
}

.events-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.events-header h2 {
    margin: 0;
    color: white;
    font-size: 2em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.events-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.events-close:hover {
    color: #ffdd59;
}

.events-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

.events-table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.events-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.events-table th {
    background: #6e48aa;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid #ddd;
}

.events-table td {
    padding: 12px 15px;
    border: 2px solid #ddd;
    color: #333;
}

.events-table tr:hover {
    background: #f5f5f5;
}

/* Стили для статусов */
.status-upcoming {
    color: #28a745;
    font-weight: bold;
}

.status-past {
    color: #6c757d;
}

/* Стили для кнопки регистрации */
.register-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.registration-closed {
    color: #6c757d;
    font-style: italic;
}

/* Подсветка предстоящих мероприятий */
.upcoming-event {
    background: rgba(40, 167, 69, 0.1);
}

.events-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.events-nav-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.events-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
}

.events-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.events-page-info {
    color: white;
    font-weight: bold;
}

.error-message {
    color: #dc3545;
    text-align: center;
    padding: 20px;
}

/* Стили для разных статусов мероприятий */
.active-event {
    background: rgba(40, 167, 69, 0.1) !important;
}

.upcoming-event {
    background: rgba(255, 193, 7, 0.1) !important;
}

.completed-event {
    background: rgba(108, 117, 125, 0.1) !important;
}

.active-event:hover,
.upcoming-event:hover,
.completed-event:hover {
    background: rgba(255, 255, 255, 0.8) !important;
}

/* Стили для кнопки регистрации */
.register-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.no-registration {
    color: #6c757d;
    font-style: italic;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Адаптивность */
@media (max-width: 768px) {
    .events-content {
        margin: 5% auto;
        width: 95%;
    }
    
    .events-body {
        padding: 15px;
    }
    
    .events-table {
        font-size: 14px;
    }
    
    .events-table th,
    .events-table td {
        padding: 8px 10px;
    }
    
    .events-footer {
        flex-direction: column;
        gap: 10px;
    }
}