/* Event Card Styles */

.event-card {
    background: rgba(25, 25, 45, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(138, 99, 210, 0.2);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.event-card:hover {
    border-color: rgba(138, 99, 210, 0.4);
    box-shadow: 0 6px 25px rgba(138, 99, 210, 0.2);
    transform: translateY(-2px);
}

.event-card-header {
    padding: 16px;
    border-bottom: 1px solid rgba(138, 99, 210, 0.15);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.event-card-title-section {
    flex: 1;
}

.event-card-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
    word-break: break-word;
}

/* Description under the title on detail card */
.event-card-desc {
    color: #b5b5b5;
    margin-top: 6px;   /* space from title */
    margin-bottom: 12px; /* space before next section */
    white-space: pre-line;
}

.event-card-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.event-status-upcoming {
    background: rgba(255, 209, 102, 0.2);
    color: #ffd166;
    border: 1px solid rgba(255, 209, 102, 0.3);
}

.event-status-ongoing {
    background: rgba(88, 166, 255, 0.2);
    color: #58a6ff;
    border: 1px solid rgba(88, 166, 255, 0.3);
    animation: pulse-border 2s ease-in-out infinite;
}

.event-status-finished {
    background: rgba(170, 170, 170, 0.2);
    color: #aaa;
    border: 1px solid rgba(170, 170, 170, 0.3);
}

@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 0 0 rgba(88, 166, 255, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(88, 166, 255, 0.2); }
}

.event-card-info-grid {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    border-bottom: 1px solid rgba(138, 99, 210, 0.15);
}

.event-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.event-info-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.event-info-value {
    font-size: 14px;
    color: #e0e0e0;
    font-weight: 500;
}

.event-info-value.highlight {
    color: #58a6ff;
    font-weight: 600;
}

.event-card-songs {
    padding: 16px;
    border-bottom: 1px solid rgba(138, 99, 210, 0.15);
}

.event-songs-title {
    font-size: 14px;
    font-weight: 700;
    color: white;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.event-song-item {
    background: rgba(15, 15, 25, 0.8);
    border: 1px solid rgba(138, 99, 210, 0.2);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.event-song-item:hover {
    border-color: rgba(138, 99, 210, 0.4);
    background: rgba(15, 15, 25, 1);
    transform: translateY(-1px);
}

.event-song-icon {
    font-size: 20px;
    margin-bottom: 6px;
}

.event-song-name {
    font-size: 12px;
    color: #e0e0e0;
    font-weight: 600;
    word-break: break-word;
    line-height: 1.3;
}

.event-card-footer {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.event-card-action {
    flex: 1;
    min-width: 120px;
}

.event-card-btn {
    width: 100%;
    padding: 10px 0px;
    background: linear-gradient(135deg, #8a63d2 0%, #6b46c1 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(138, 99, 210, 0.3);
}

.event-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(138, 99, 210, 0.5);
    background: linear-gradient(135deg, #9a73e2 0%, #7b56d1 100%);
}

.event-card-joined {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(46, 213, 115, 0.15);
    color: #2ed573;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    /* allow wrapping to prevent overflow */
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
}

/* --- Aliases to unify with detail song card markup (.songs-grid, .song-card) --- */
.songs-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin-bottom: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.song-card {
    scroll-snap-align: start;
    min-width: 240px; /* ensure cards lay out horizontally */
}
.song-card {
    background: rgba(15, 15, 25, 0.8);
    border: 1px solid rgba(138, 99, 210, 0.2);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
}
.stepball-sm {
    width: 70px;
    height: 70px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stepball-sm .nums {
    display: flex;
    gap: 2px;
}
.stepball-sm .nums img {
    height: 24px;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.6));
}
.song-info { flex: 1; }
.song-name { font-weight: 700; color: #fff; }
.song-meta { color: #999; font-size: 12px; margin-top: 2px; }

/* Responsive */
@media (max-width: 768px) {
    .event-card-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .event-songs-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 8px;
    }
    
    .event-song-name {
        font-size: 11px;
    }
    
    .event-card-footer {
        flex-direction: column;
    }
    
    .event-card-action {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .event-card-header {
        padding: 12px;
        flex-direction: column;
    }
    
    .event-card-info-grid {
        padding: 12px;
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .event-card-songs {
        padding: 12px;
    }
    
    .event-songs-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 6px;
    }
    
    .event-card-footer {
        padding: 12px;
        gap: 8px;
    }
}
