/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --primary-blue: #29C5F6;
    --primary-purple: #B36AF4;
    --dark-bg: #0b1016;
    --card-bg: #151e29;
    --text-white: #ffffff;
    --accent-red: #ff4444;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-white);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    transition: justify-content 0.5s ease;
}

/* Center Mode: Activated via JS when in Offline/Finished state */
body.body-centered {
    justify-content: center;
}

.container {
    max-width: 600px;
    width: 90%;
    display: flex;
    flex-direction: column;
    padding-bottom: 50px;
    margin-top: 20px;
    text-align: center; /* Default text center for headers */
}

/* =========================================
   2. COMPONENTS & UTILITIES
   ========================================= */

/* Logo & Headers */
.logo-container { margin: 10px 0 20px 0; }

.logo {
    width: 200px; height: 200px;
    object-fit: cover;
    filter: drop-shadow(0 0 10px rgba(41, 197, 246, 0.5));
}

h1 {
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

#status-subtext { color: #ccc; margin: 0 0 20px 0; }

/* Navigation Pill Button */
.nav-pill {
    display: inline-block;
    margin: 10px 0 20px 0;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: bold;
    border: 1px solid var(--primary-blue);
    padding: 8px 25px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.2s;
    background: transparent;
    cursor: pointer;
    align-self: center; /* Prevents button from stretching full width */
}
.nav-pill:hover { background: var(--primary-blue); color: #000; }

/* Loading Spinner */
#loading-view { margin: 20px auto; min-height: 150px; }

.spinner {
    width: 40px; height: 40px;
    border: 4px solid rgba(41, 197, 246, 0.3);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* =========================================
   3. BUTTONS
   ========================================= */
.btn-group { display: flex; flex-direction: column; gap: 15px; margin-top: 10px; width: 100%; }

.btn {
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-purple));
    color: white;
    padding: 15px 20px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
    text-align: center;
}
.btn:hover { transform: scale(1.02); box-shadow: 0 0 15px rgba(179, 106, 244, 0.6); }

.btn-secondary { background: transparent; border: 2px solid var(--primary-purple); }
.btn-small { padding: 10px 15px; font-size: 0.9rem; }
.grid-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }

/* =========================================
   4. EVENT & DJ CARDS
   ========================================= */

/* Event Links Box */
.event-links-box {
    background: rgba(41, 197, 246, 0.1);
    border: 1px solid var(--primary-blue);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    width: 100%;
    box-sizing: border-box;
}
.event-links-box p { color: var(--primary-blue); font-weight: bold; margin-bottom: 10px; }

/* DJ List Container */
.dj-list { list-style: none; padding: 0; margin-top: 20px; width: 100%; }

/* Individual DJ Card */
.dj-card {
    --accent-color: var(--primary-blue); /* Default Color, overridden by JS */
    
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    text-align: left;
    
    border-left: 5px solid var(--accent-color); /* Uses dynamic color */
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

/* Active State (Live DJ) */
.dj-active {
    border-color: var(--accent-red) !important;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.4);
    background: linear-gradient(to right, rgba(255, 68, 68, 0.1), transparent);
    transform: scale(1.02);
}

.dj-img {
    width: 70px; height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    background-color: #333;
    flex-shrink: 0;
}

.dj-content { flex-grow: 1; }

/* THIS WAS THE MISSING PIECE! */
.dj-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: baseline; 
}

.dj-content h3 { margin: 0; color: var(--accent-color); font-size: 1.1rem; }
.dj-content .time { font-weight: bold; color: var(--primary-purple); font-size: 0.9rem; }
.dj-content .genre { font-style: italic; color: #aaa; font-size: 0.85rem; display: block; margin-bottom: 8px;}

/* Live Tag */
.live-tag {
    background: var(--accent-red);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

/* Social Buttons */
.social-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 5px; }
.social-tag {
    background: #222;
    color: #ddd;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
}
.social-tag:hover { background: var(--accent-color); color: #000; }

/* Status Badges */
.status-badge { display: inline-block; padding: 5px 12px; border-radius: 20px; font-weight: bold; font-size: 0.9rem; margin-bottom: 10px; }
.status-live { background-color: rgba(255, 68, 68, 0.2); color: var(--accent-red); border: 1px solid var(--accent-red); animation: pulse 1.5s infinite; }
.status-upcoming { background-color: rgba(41, 197, 246, 0.2); color: var(--primary-blue); border: 1px solid var(--primary-blue); }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.6; } 100% { opacity: 1; } }

/* =========================================
   5. ARCHIVE STYLES
   ========================================= */
.set-list { border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 5px; }
.set-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.set-item:last-child { border-bottom: none; }
.set-info { text-align: left; }
.set-title { color: #eee; font-weight: bold; font-size: 0.95rem; }
.set-date { color: var(--primary-purple); font-size: 0.8rem; margin-top: 2px; }
.play-btn-small { background: #222; color: #fff; border: 1px solid #444; padding: 5px 12px; border-radius: 5px; font-size: 0.8rem; text-decoration: none; transition: 0.2s; white-space: nowrap; }
.play-btn-small:hover { background: var(--primary-blue); color: #000; border-color: var(--primary-blue); }

.hidden { display: none !important; }