/* Events Modal Styles - Gaming Theme */
.events-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.events-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.events-modal-content {
    position: relative;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    border: 2px solid #00ffff;
    border-radius: 15px;
    width: 98%;
    max-width: none;
    max-height: 95vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 255, 255, 0.3);
    animation: slideIn 0.3s ease;
}

.events-modal-header {
    background: linear-gradient(45deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 255, 0.1));
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.events-modal-header h2 {
    color: #00ffff;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.events-modal-close {
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.events-modal-close:hover {
    background: rgba(255, 107, 107, 0.2);
    transform: scale(1.1);
}

.events-modal-body {
    padding: 0;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
    color: #fff;
}

/* Loading Animation */
.events-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.events-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 255, 255, 0.3);
    border-top: 3px solid #00ffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

/* Events Dashboard */
.events-dashboard {
    padding: 2rem;
}

.events-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 255, 0.1));
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-info h3 {
    font-size: 2rem;
    color: #00ffff;
    margin: 0;
    font-weight: bold;
}

.stat-info p {
    color: #ccc;
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
}

/* Events Sections */
.events-section {
    margin-bottom: 2.5rem;
}

.section-title {
    color: #00ffff;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* Rankings Container */
.rankings-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.rankings-section {
    background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255,255,255,0.15);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.rankings-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.player-item {
    background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border-radius: 15px;
    padding: 1rem 1.2rem;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.player-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.4);
}

.player-rank {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #333;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-name {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-stats {
    font-size: 0.85rem;
    color: #ccc;
    font-weight: 500;
}

.guild-extra {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 0.3rem;
}

.guild-extra span {
    font-size: 0.75rem;
    color: #aaa;
}

/* Special styling for top 3 ranks */
.player-item.rank-gold {
    border-color: #FFD700;
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.player-item.rank-gold .player-rank {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.player-item.rank-silver {
    border-color: #C0C0C0;
    background: linear-gradient(145deg, rgba(192, 192, 192, 0.15), rgba(192, 192, 192, 0.05));
}

.player-item.rank-silver .player-rank {
    background: linear-gradient(45deg, #C0C0C0, #A8A8A8);
}

.player-item.rank-bronze {
    border-color: #CD7F32;
    background: linear-gradient(145deg, rgba(205, 127, 50, 0.15), rgba(205, 127, 50, 0.05));
}

.player-item.rank-bronze .player-rank {
    background: linear-gradient(45deg, #CD7F32, #B8732C);
}

.event-card {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 204, 255, 0.1));
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.2);
}

.event-card.event-active {
    border-color: #00ff88;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 204, 255, 0.1));
    animation: pulse 2s infinite;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.event-name {
    color: #00ff88;
    font-size: 1.2rem;
    margin: 0;
    font-weight: bold;
}

.event-status {
    background: linear-gradient(45deg, #00ff88, #00ccff);
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.event-time, .event-day, .event-timer, .event-rewards {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.time-label, .day-label, .timer-label, .rewards-label {
    color: #ccc;
    font-size: 0.9rem;
}

.time-value, .day-value, .timer-value, .rewards-value {
    color: #fff;
    font-weight: bold;
}

.timer-value {
    color: #00ff88;
    font-size: 1.1rem;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
}

.event-timer {
    background: rgba(0, 255, 136, 0.1);
    padding: 0.5rem;
    border-radius: 5px;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

/* Events Schedule */
.events-schedule {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.schedule-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(0, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.schedule-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(0, 255, 255, 0.1));
    border-color: rgba(0, 255, 255, 0.3);
}

.schedule-item.schedule-active {
    border-color: #00ff88;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 204, 255, 0.05));
}

.schedule-time {
    color: #00ffff;
    font-size: 1.1rem;
    font-weight: bold;
    min-width: 60px;
}

.schedule-info {
    flex: 1;
}

.schedule-name {
    color: #fff;
    margin: 0 0 0.3rem 0;
    font-size: 1rem;
}

.schedule-day {
    color: #ccc;
    margin: 0;
    font-size: 0.9rem;
}

.schedule-timer {
    color: #00ff88;
    margin: 0.3rem 0 0 0;
    font-size: 0.85rem;
    font-weight: bold;
}

.schedule-status {
    min-width: 80px;
    text-align: center;
}

.status-active {
    color: #00ff88;
    font-weight: bold;
}

.status-inactive {
    color: #ccc;
}


/* No Events Message */
.no-events {
    text-align: center;
    color: #ccc;
    font-style: italic;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

/* Error State */
.events-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.events-error h3 {
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.events-error p {
    color: #ccc;
    margin-bottom: 2rem;
}

.error-retry {
    background: linear-gradient(45deg, #00ffff, #0080ff);
    color: #000;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.error-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
    }
    50% { 
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .events-modal-content {
        width: 98%;
        margin: 1%;
        max-height: 95vh;
    }
    
    .events-modal-header {
        padding: 1rem;
    }
    
    .events-modal-header h2 {
        font-size: 1.4rem;
    }
    
    .events-dashboard {
        padding: 1rem;
    }
    
    .events-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .arena-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .schedule-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    .schedule-status {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .events-modal-header {
        padding: 0.8rem;
    }
    
    .events-dashboard {
        padding: 0.8rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .event-card, .arena-card {
        padding: 1rem;
    }
}
