/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* DYNAMIC VARIABLES (These change with Chameleon Mode) */
    --primary-blue: #29C5F6;
    --primary-purple: #B36AF4;

    /* STATIC VARIABLES (These ALWAYS stay Club Critters Brand) */
    --static-blue: #29C5F6;
    --static-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;
}

/* Vertical Center Mode: Used when site is Offline or Finished */
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; 
}

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

/* Header Logo */
.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 (Archive/Back) */
.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;
}
.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(--static-blue), var(--static-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(--static-purple); }
.btn-small { padding: 10px 15px; font-size: 0.9rem; }
.grid-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }

/* =========================================
   VRC DEEP LINK BUTTON
   ========================================= */
.btn-live-join {
    background: linear-gradient(135deg, #ff0055 0%, #ff4444 100%);
    color: white;
    font-size: 1rem;       
    padding: 10px 25px;    
    width: auto;           
    min-width: 200px;      
    max-width: 300px;      
    margin: 0 auto;
    display: inline-block; 
    
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.3);
    animation: pulse-red 3s infinite;
    transition: all 0.2s ease;
}

.btn-live-join:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(255, 0, 85, 0.5);
    background: linear-gradient(135deg, #ff2266 0%, #ff6666 100%);
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(255, 0, 85, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(255, 0, 85, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 85, 0); }
}

/* =========================================
   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); 
    
    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); 
    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; }

/* Header layout */
.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(--static-purple); font-size: 0.9rem; }
.dj-content .genre { font-style: italic; color: #aaa; font-size: 0.85rem; display: block; margin-bottom: 8px;}

/* 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. VISUALIZER ANIMATION
   ========================================= */
.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;
    display: inline-flex;
    align-items: center;
}

.visualizer {
    display: inline-flex;
    align-items: flex-end;
    height: 10px;
    margin-left: 6px;
    gap: 2px;
}

.viz-bar {
    width: 2px;
    background-color: white;
    animation: bounce 0.5s infinite ease-in-out;
}

.viz-bar:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.viz-bar:nth-child(2) { height: 10px; animation-delay: 0.2s; }
.viz-bar:nth-child(3) { height: 4px; animation-delay: 0.3s; }

@keyframes bounce {
    0%, 100% { height: 3px; }
    50% { height: 10px; }
}

/* =========================================
   6. SHARE BUTTON
   ========================================= */
.share-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #888;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    margin-left: 10px;
    font-size: 0.8rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.share-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: rgba(41, 197, 246, 0.1);
}

.share-btn:active {
    transform: scale(0.95);
}

.share-btn::after {
    content: "Copied!";
    position: absolute;
    background: var(--primary-blue);
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.share-btn.copied::after {
    opacity: 1;
}

/* =========================================
   7. 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; }

/* =========================================
   8. FEATURED SET (Offline Mode)
   ========================================= */
.featured-card {
    background: linear-gradient(135deg, rgba(41, 197, 246, 0.15), rgba(179, 106, 244, 0.15));
    border: 1px solid var(--primary-purple);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px; 
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
}

.featured-card:hover {
    transform: scale(1.02);
    background: linear-gradient(135deg, rgba(41, 197, 246, 0.25), rgba(179, 106, 244, 0.25));
}

.featured-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary-purple);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 0 0 0 6px;
}

.featured-img {
    width: 60px; height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #000;
    flex-shrink: 0;
}

.featured-info h3 {
    margin: 0;
    color: var(--primary-blue);
    font-size: 1rem;
}

.featured-info p {
    margin: 2px 0 0 0;
    font-size: 0.8rem;
    color: #ccc;
}

@media (max-width: 400px) {
    .featured-card { flex-direction: column; text-align: center; }
    .featured-badge { right: 50%; transform: translateX(50%); border-radius: 0 0 6px 6px; }
}

/* =========================================
   9. SEARCH BAR (Archive Page)
   ========================================= */
.search-container {
    width: 100%;
    margin-bottom: 20px;
    position: relative;
}

.search-bar {
    width: 100%;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box; 
}

.search-bar:focus {
    border-color: var(--primary-purple);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(179, 106, 244, 0.3);
}

.search-bar::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* =========================================
   10. GENRE PILLS
   ========================================= */
.genre-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.genre-pill {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #888;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.genre-pill:hover {
    border-color: var(--static-blue);
    color: var(--static-blue);
    background: rgba(41, 197, 246, 0.1);
}

.genre-pill.active {
    background: linear-gradient(45deg, var(--static-blue), var(--static-purple));
    color: #fff;
    border-color: transparent;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(179, 106, 244, 0.4);
}

/* =========================================
   11. ARCHIVE CARDS
   ========================================= */

.dj-archive-card {
    background: #151e29;
    border-radius: 12px;
    margin-bottom: 20px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    text-align: left;
    transition: transform 0.2s ease;
}

.dj-archive-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.card-body {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.card-body::-webkit-scrollbar {
    width: 6px;
}
.card-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}
.card-body::-webkit-scrollbar-thumb {
    background: var(--static-purple);
    border-radius: 10px;
}
.card-body::-webkit-scrollbar-thumb:hover {
    background: var(--static-blue);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

.card-header img {
    width: 50px; 
    height: 50px; 
    border-radius: 50%;
    object-fit: cover;
    background: #000;
}

.card-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: bold;
}

.archive-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.archive-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.row-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.row-title {
    font-size: 1rem;
    font-weight: 600;
}

.row-date {
    font-size: 0.8rem;
}

.genre-tag {
    font-size: 0.7rem;
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    color: #aaa;
    font-weight: normal;
    vertical-align: middle;
}

.play-btn-card {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.play-btn-card:hover {
    background: white;
    color: black;
    border-color: white;
}