/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* DYNAMIC VARIABLES (These change with Chameleon Mode) */
    --primary-pink: #f2008d;
    --primary-purple: #7e00fc;
    --primary-orange: #ff7b2e;
    --primary-green: #08ec7a;
    --primary-magenta: #f16cf2;

    /* Primary Brand Mapping: Orange & Green */
    --primary-blue: var(--primary-orange);
    --primary-purple-legacy: var(--primary-green);
    --primary-gradient: linear-gradient(45deg, var(--primary-orange), var(--primary-green));

    /* STATIC VARIABLES (These ALWAYS stay Club FuRN Brand) */
    --static-orange: #ff7b2e;
    --static-green: #08ec7a;

    --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; 
    position: relative;
}

/* =========================================
   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(255, 123, 46, 0.5));
}

h1 {
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: all 0.3s ease;
    pointer-events: none; 
}

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

/* 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. LAYOUT & GRIDS
   ========================================= */
.btn-group { display: flex; flex-direction: column; gap: 15px; margin-top: 10px; width: 100%; }
.grid-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }

/* BASE BUTTON COMPONENT */
.btn-cc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    font-family: inherit;
    gap: 10px;
    box-sizing: border-box;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white !important;
    box-shadow: 0 4px 15px rgba(41, 197, 246, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(179, 106, 244, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-blue) !important;
    border: 2px solid var(--primary-blue);
}
.btn-secondary:hover {
    background: var(--primary-gradient);
    color: white !important;
    border-color: transparent;
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 18px;
    font-size: 0.8rem;
    border-radius: 30px;
}

.btn-dark {
    background: #222;
    color: #eee !important;
    border: 1px solid #444;
}
.btn-dark:hover {
    background: #333;
}

.nav-pill-cc {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #ccc !important;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}
.nav-pill-cc:hover {
    background: rgba(255,255,255,0.15);
    color: white !important;
    border-color: var(--primary-blue);
}

/* VRC DEEP LINK BUTTON (Special variant) */
.btn-live-join {
    background: linear-gradient(135deg, #ff0055 0%, #ff4444 100%);
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.3);
    animation: pulse-red 3s infinite;
}
.btn-live-join:hover {
    box-shadow: 0 0 25px rgba(255, 0, 85, 0.5);
}
@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. CARDS (DJ & ARCHIVE)
   ========================================= */

/* Common Card Base */
.dj-card, .dj-archive-card {
    --accent-color: var(--primary-blue); 
    background-color: var(--card-bg);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    box-sizing: border-box;
    text-align: left;
}

/* Gradient Sidebar Border */
.dj-card::before, .dj-archive-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 5px;
    background: var(--accent-color);
    z-index: 2;
}

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

/* Team Grid (Multi-column) */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.team-grid .dj-card { height: 100%; }

/* Individual DJ Card Layout */
.dj-card {
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center; 
}
.dj-card:hover, .dj-archive-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.4);
}

.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; }
.dj-header { display: flex; justify-content: space-between; align-items: baseline; }

.dj-content h3 { 
    margin: 0; 
    font-size: 1.1rem; 
    background: var(--accent-color);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}
/* Fallback if accent-color is solid */
.dj-card:not([style*="gradient"]) h3 {
    color: var(--accent-color);
}

.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: all 0.2s ease;
}
.social-tag:hover { 
    background: var(--accent-color); 
    color: #fff;
    box-shadow: 0 0 10px var(--accent-color);
}

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

/* =========================================
   5. ARCHIVE SPECIFICS
   ========================================= */
.dj-archive-card {
    padding: 20px;
    margin-bottom: 20px;
}
.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; }
.card-header h3 { margin: 0; font-size: 1.3rem; }

.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; }
.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;
}

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

.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); }

.live-tag {
    background: var(--accent-red); color: white;
    font-size: 0.7rem; padding: 2px 8px; border-radius: 4px;
    margin-left: 10px; font-weight: bold; display: inline-flex; align-items: center;
}
.visualizer { display: inline-flex; align-items: flex-end; height: 12px; margin-left: 8px; gap: 2px; }
.viz-bar { width: 2px; background-color: white; border-radius: 1px; }
.viz-bar:nth-child(1) { height: 100%; animation: viz-bounce 0.6s infinite ease-in-out; }
.viz-bar:nth-child(2) { height: 100%; animation: viz-bounce 0.8s infinite ease-in-out 0.1s; }
.viz-bar:nth-child(3) { height: 100%; animation: viz-bounce 0.7s infinite ease-in-out 0.2s; }

@keyframes viz-bounce { 
    0%, 100% { height: 3px; } 
    50% { height: 12px; } 
}

.playing-now-badge {
    background: var(--accent-red); 
    color: white; 
    font-size: 0.65rem; 
    padding: 3px 10px; 
    border-radius: 20px;
    font-weight: 900; 
    text-transform: uppercase; 
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    white-space: nowrap;
    letter-spacing: 1px;
    border: none;
}

.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;
}
.share-btn:hover { border-color: var(--primary-blue); color: var(--primary-blue); }

/* =========================================
   7. ARCHIVE SPECIFICS (Restore)
   ========================================= */

/* Search Bar */
.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);
}

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

/* Featured Set (Offline) */
.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;
}

/* =========================================
   8. FLYER GENERATOR (CUSTOM STYLES)
   ========================================= */

#flyer-canvas {
    width: 800px;
    height: 1040px;
    margin: 0 auto;
    background-image: url('../logos/club/flyer.png');
    background-size: cover;
    position: relative;
    font-family: 'Segoe UI', sans-serif;
    color: white;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    overflow: hidden;
}

/* --- CONTROLS --- */
.flyer-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}
#custom-title {
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid #444;
    background: #151e29;
    color: white;
    font-size: 1rem;
    text-align: center;
    width: 250px;
}

/* --- HEADER --- */
.flyer-header-area {
    position: absolute;
    top: 13%; 
    width: 100%;
    text-align: center;
    z-index: 10;
}
#flyer-date {
    font-size: 3.2rem;
    font-weight: 900;
    margin: 0;
    text-transform: uppercase;
    text-shadow: 0 0 20px #B36AF4;
}
#flyer-subtitle {
    font-size: 1.5rem;
    color: #29C5F6;
    letter-spacing: 4px;
    margin: 5px 0 0 0;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
}

#flyer-box {
    position: absolute;
    top: 23%;
    left: 10%;
    width: 80%;
    height: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#flyer-lines {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    height: 100%; 
    padding: 10px 0;
}

.flyer-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    flex: 1 1 calc(100% / 7);
    min-height: 0;
}

.logo-is-right { flex-direction: row; }
.logo-is-right .dj-info-container {
    flex: 1; display: flex; flex-direction: column; align-items: flex-end;
    text-align: right; padding-right: 25px;
}
.logo-is-right .dj-logo-container {
    flex: 1; display: flex; justify-content: flex-start; padding-left: 25px;
}

.logo-is-left { flex-direction: row-reverse; }
.logo-is-left .dj-info-container {
    flex: 1; display: flex; flex-direction: column; align-items: flex-start;
    text-align: left; padding-left: 25px;
}
.logo-is-left .dj-logo-container {
    flex: 1; display: flex; justify-content: flex-end; padding-right: 25px;
}

.dj-logo-img {
    width: clamp(60px, 10vh, 90px);
    height: clamp(60px, 10vh, 90px);
    object-fit: cover;
    filter: drop-shadow(0 0 10px rgba(41, 197, 246, 0.5));
}

.flyer-time {
    font-size: 1rem;
    color: #29C5F6;
    font-weight: 800;
    letter-spacing: 1px;
}

.flyer-dj {
    font-size: clamp(1.8rem, 4vh, 2.5rem);
    font-weight: 900;
    text-transform: uppercase;
    line-height: 0.9;
    color: #fff;
    text-shadow: 3px 3px 0px #000;
    margin: 2px 0;
}

.flyer-genre {
    font-size: 0.9rem;
    color: #ddd;
    font-style: italic;
    font-weight: 600;
}

/* --- FOOTER --- */
.flyer-footer-area {
    position: absolute;
    bottom: 2%;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.footer-icon {
    width: 45px;
    height: 45px;
    filter: drop-shadow(0 0 5px #29C5F6);
}
.footer-url {
    font-size: 1.6rem;
    letter-spacing: 3px;
    color: #fff;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(41, 197, 246, 0.8);
}

.hidden { display: none !important; }
