/* Uncle John's Dead - Hyperspace Pirate Radio
   A cosmic psychedelic experience
   HERO LOGO EDITION */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cosmic palette - extracted from the logo */
    --void: #0a0612;
    --deep-space: #120b1e;
    --nebula-purple: #2d1b4e;
    --cosmic-blue: #1a3a5c;
    --electric-cyan: #00d4ff;
    --hot-pink: #ff2d95;
    --rose-red: #e94560;
    --golden-lightning: #ffd93d;
    --warm-orange: #ff8c42;
    --ghost-white: #f0e6ff;
    --star-white: #ffffff;

    /* Sync status */
    --sync-ok: #00ff88;
    --sync-drift: #ffd93d;
    --sync-bad: #ff2d55;

    /* Typography */
    --font-display: 'Righteous', cursive;
    --font-mono: 'Space Mono', monospace;
    --font-script: 'Satisfy', cursive;
}

html, body {
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    font-family: var(--font-mono);
    background: var(--void);
    color: var(--ghost-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* ============================================
   STARFIELD BACKGROUND
   ============================================ */

.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: repeat;
}

.stars-1 {
    background-image:
        radial-gradient(1px 1px at 20px 30px, var(--star-white), transparent),
        radial-gradient(1px 1px at 40px 70px, var(--ghost-white), transparent),
        radial-gradient(1px 1px at 50px 160px, var(--star-white), transparent),
        radial-gradient(1px 1px at 90px 40px, var(--ghost-white), transparent),
        radial-gradient(1px 1px at 130px 80px, var(--star-white), transparent),
        radial-gradient(1.5px 1.5px at 160px 120px, var(--electric-cyan), transparent),
        radial-gradient(1px 1px at 200px 50px, var(--star-white), transparent),
        radial-gradient(1px 1px at 250px 180px, var(--ghost-white), transparent),
        radial-gradient(1px 1px at 280px 90px, var(--star-white), transparent),
        radial-gradient(1.5px 1.5px at 300px 150px, var(--hot-pink), transparent);
    background-size: 320px 200px;
    animation: twinkle 8s ease-in-out infinite;
}

.stars-2 {
    background-image:
        radial-gradient(1px 1px at 10px 10px, var(--ghost-white), transparent),
        radial-gradient(1px 1px at 70px 50px, var(--star-white), transparent),
        radial-gradient(1.5px 1.5px at 100px 100px, var(--golden-lightning), transparent),
        radial-gradient(1px 1px at 150px 30px, var(--ghost-white), transparent),
        radial-gradient(1px 1px at 180px 140px, var(--star-white), transparent),
        radial-gradient(1px 1px at 220px 80px, var(--ghost-white), transparent),
        radial-gradient(1px 1px at 260px 20px, var(--star-white), transparent);
    background-size: 280px 160px;
    animation: twinkle 12s ease-in-out infinite reverse;
}

.stars-3 {
    background-image:
        radial-gradient(2px 2px at 25px 25px, var(--electric-cyan), transparent),
        radial-gradient(1px 1px at 75px 75px, var(--star-white), transparent),
        radial-gradient(1px 1px at 125px 45px, var(--ghost-white), transparent),
        radial-gradient(2px 2px at 175px 125px, var(--hot-pink), transparent),
        radial-gradient(1px 1px at 225px 65px, var(--star-white), transparent);
    background-size: 250px 150px;
    animation: twinkle 6s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ============================================
   NEBULA OVERLAY
   ============================================ */

.nebula {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(45, 27, 78, 0.4), transparent),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(233, 69, 96, 0.2), transparent),
        radial-gradient(ellipse 50% 60% at 50% 50%, rgba(0, 212, 255, 0.1), transparent),
        radial-gradient(ellipse 70% 30% at 70% 30%, rgba(255, 45, 149, 0.15), transparent);
    animation: nebulaDrift 30s ease-in-out infinite;
}

@keyframes nebulaDrift {
    0%, 100% {
        background-position: 0% 0%, 100% 100%, 50% 50%, 70% 30%;
        opacity: 1;
    }
    50% {
        background-position: 10% 10%, 90% 90%, 45% 55%, 75% 25%;
        opacity: 0.8;
    }
}

/* ============================================
   MAIN CONTAINER
   ============================================ */

.container {
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* ============================================
   HERO LOGO SECTION - THE STAR OF THE SHOW
   ============================================ */

.header {
    width: 100%;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px 20px;
}

/* Radial burst behind logo */
.header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150vw;
    height: 150vw;
    max-width: 1200px;
    max-height: 1200px;
    background:
        conic-gradient(
            from 0deg,
            transparent 0deg,
            rgba(0, 212, 255, 0.03) 10deg,
            transparent 20deg,
            rgba(255, 45, 149, 0.03) 30deg,
            transparent 40deg,
            rgba(255, 217, 61, 0.02) 50deg,
            transparent 60deg
        );
    animation: burstRotate 60s linear infinite;
    pointer-events: none;
}

@keyframes burstRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.logo-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Multiple layered glows for depth */
.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130%;
    height: 130%;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(0, 212, 255, 0.4) 0%,
        rgba(255, 45, 149, 0.3) 25%,
        rgba(233, 69, 96, 0.2) 50%,
        rgba(255, 217, 61, 0.1) 70%,
        transparent 100%
    );
    filter: blur(60px);
    animation: logoGlow 4s ease-in-out infinite;
}

/* Secondary inner glow */
.logo-glow::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 15%;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 70%
    );
    filter: blur(30px);
}

@keyframes logoGlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 1;
    }
}

/* THE LOGO - MASSIVE AND BOLD */
.logo {
    width: min(90vw, 600px);
    height: min(90vw, 600px);
    position: relative;
    z-index: 2;
    animation: logoFloat 6s ease-in-out infinite;
    filter:
        drop-shadow(0 0 40px rgba(0, 212, 255, 0.5))
        drop-shadow(0 0 80px rgba(255, 45, 149, 0.3))
        drop-shadow(0 0 120px rgba(233, 69, 96, 0.2));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.logo:hover {
    transform: scale(1.08) rotate(2deg);
    filter:
        drop-shadow(0 0 40px rgba(0, 212, 255, 0.6))
        drop-shadow(0 0 80px rgba(255, 45, 149, 0.4))
        drop-shadow(0 0 120px rgba(233, 69, 96, 0.3));
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-12px) rotate(1deg); }
    50% { transform: translateY(-6px) rotate(0deg); }
    75% { transform: translateY(-14px) rotate(-1deg); }
}

/* Station tagline under logo */
.station-tagline {
    margin-top: 30px;
    text-align: center;
}

.station-name {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    letter-spacing: 0.05em;
    background: linear-gradient(
        135deg,
        var(--ghost-white) 0%,
        var(--electric-cyan) 30%,
        var(--hot-pink) 60%,
        var(--golden-lightning) 100%
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: nameShine 8s ease-in-out infinite;
    text-shadow: none;
}

@keyframes nameShine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.station-subtitle {
    font-family: var(--font-script);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--golden-lightning);
    margin-top: 8px;
    text-shadow: 0 0 30px rgba(255, 217, 61, 0.4);
    animation: subtitlePulse 3s ease-in-out infinite;
}

@keyframes subtitlePulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* ============================================
   NOW PLAYING CARD
   ============================================ */

.main-content {
    width: 100%;
    max-width: 520px;
    padding: 0 20px 40px;
}

.now-playing-card {
    background: linear-gradient(
        135deg,
        rgba(45, 27, 78, 0.7) 0%,
        rgba(18, 11, 30, 0.9) 50%,
        rgba(26, 58, 92, 0.5) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 60px rgba(0, 212, 255, 0.1),
        0 0 100px rgba(255, 45, 149, 0.05);
    position: relative;
    overflow: hidden;
}

.now-playing-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(0, 212, 255, 0.03),
        transparent,
        rgba(255, 45, 149, 0.03),
        transparent
    );
    animation: cardShimmer 10s linear infinite;
    pointer-events: none;
}

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

/* Card header with live indicator */
.card-header {
    text-align: center;
    margin-bottom: 20px;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--electric-cyan);
    text-transform: uppercase;
    padding: 6px 16px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--sync-ok);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px var(--sync-ok);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* Show info */
.show-info {
    text-align: center;
    margin-bottom: 16px;
}

.show-date-badge {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--rose-red), var(--hot-pink));
    color: var(--star-white);
    padding: 8px 20px;
    border-radius: 25px;
    margin-bottom: 8px;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.show-venue {
    font-family: var(--font-script);
    font-size: 1.3rem;
    color: var(--golden-lightning);
    text-shadow: 0 0 20px rgba(255, 217, 61, 0.3);
}

/* Track info */
.track-info {
    text-align: center;
    margin-bottom: 24px;
}

.track-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 12px;
    background: linear-gradient(
        90deg,
        var(--ghost-white) 0%,
        var(--electric-cyan) 50%,
        var(--ghost-white) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShine 4s ease-in-out infinite;
}

@keyframes textShine {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.track-meta {
    display: flex;
    justify-content: center;
    gap: 12px;
    font-size: 0.8rem;
}

.set-badge {
    background: rgba(255, 217, 61, 0.2);
    color: var(--golden-lightning);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 217, 61, 0.3);
}

.track-number {
    color: var(--ghost-white);
    opacity: 0.7;
}

/* ============================================
   PLAY BUTTON
   ============================================ */

.play-button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.play-button-container.hidden {
    display: none;
}

.play-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--electric-cyan);
    background: rgba(0, 212, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.play-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--electric-cyan) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.play-button:hover {
    transform: scale(1.1);
    border-color: var(--hot-pink);
    background: rgba(255, 45, 149, 0.15);
    box-shadow:
        0 0 30px rgba(0, 212, 255, 0.4),
        0 0 60px rgba(255, 45, 149, 0.2);
}

.play-button:hover::before {
    opacity: 0.3;
}

.play-button:active {
    transform: scale(0.95);
}

.play-icon {
    width: 32px;
    height: 32px;
    color: var(--electric-cyan);
    position: relative;
    z-index: 1;
    margin-left: 4px;
    transition: color 0.3s ease;
}

.play-button:hover .play-icon {
    color: var(--hot-pink);
}

.play-hint {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--electric-cyan);
    animation: pulseText 2s ease-in-out infinite;
}

@keyframes pulseText {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ============================================
   AUDIO VISUALIZER
   ============================================ */

.visualizer {
    display: none;
    justify-content: center;
    align-items: flex-end;
    gap: 4px;
    height: 50px;
    margin-bottom: 24px;
    padding: 0 20px;
}

.visualizer.playing {
    display: flex;
}

.visualizer .bar {
    width: 6px;
    background: linear-gradient(
        to top,
        var(--rose-red),
        var(--hot-pink),
        var(--electric-cyan)
    );
    border-radius: 3px;
    min-height: 4px;
    animation: visualize 0.8s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.visualizer .bar:nth-child(1) { animation-delay: 0.0s; height: 20px; }
.visualizer .bar:nth-child(2) { animation-delay: 0.1s; height: 35px; }
.visualizer .bar:nth-child(3) { animation-delay: 0.2s; height: 25px; }
.visualizer .bar:nth-child(4) { animation-delay: 0.15s; height: 45px; }
.visualizer .bar:nth-child(5) { animation-delay: 0.3s; height: 30px; }
.visualizer .bar:nth-child(6) { animation-delay: 0.05s; height: 50px; }
.visualizer .bar:nth-child(7) { animation-delay: 0.25s; height: 40px; }
.visualizer .bar:nth-child(8) { animation-delay: 0.4s; height: 50px; }
.visualizer .bar:nth-child(9) { animation-delay: 0.2s; height: 35px; }
.visualizer .bar:nth-child(10) { animation-delay: 0.35s; height: 50px; }
.visualizer .bar:nth-child(11) { animation-delay: 0.1s; height: 40px; }
.visualizer .bar:nth-child(12) { animation-delay: 0.45s; height: 30px; }
.visualizer .bar:nth-child(13) { animation-delay: 0.15s; height: 45px; }
.visualizer .bar:nth-child(14) { animation-delay: 0.3s; height: 25px; }
.visualizer .bar:nth-child(15) { animation-delay: 0.05s; height: 35px; }

@keyframes visualize {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
}

.visualizer.paused .bar {
    animation-play-state: paused;
    transform: scaleY(0.2);
}

/* ============================================
   PLAYER CONTROLS
   ============================================ */

.player-section {
    position: relative;
    z-index: 2;
}

.progress-wrapper {
    margin-bottom: 12px;
}

.progress-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(
        90deg,
        var(--rose-red),
        var(--hot-pink),
        var(--electric-cyan)
    );
    width: 0%;
    transition: width 0.3s linear;
    border-radius: 4px;
    position: relative;
}

.progress-glow {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(
        90deg,
        transparent 90%,
        rgba(0, 212, 255, 0.8)
    );
    filter: blur(4px);
    pointer-events: none;
}

.time-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.time {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: rgba(240, 230, 255, 0.6);
}

.sync-row {
    display: flex;
    justify-content: center;
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sync-ok);
    box-shadow: 0 0 10px var(--sync-ok);
    transition: all 0.3s ease;
}

.sync-dot.ok {
    background: var(--sync-ok);
    box-shadow: 0 0 10px var(--sync-ok);
}

.sync-dot.drift {
    background: var(--sync-drift);
    box-shadow: 0 0 10px var(--sync-drift);
}

.sync-dot.bad {
    background: var(--sync-bad);
    box-shadow: 0 0 10px var(--sync-bad);
}

.sync-text {
    color: rgba(240, 230, 255, 0.5);
}

/* ============================================
   UP NEXT SECTION
   ============================================ */

.up-next-section {
    margin-top: 24px;
    padding: 20px;
    background: rgba(45, 27, 78, 0.3);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.up-next-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: var(--golden-lightning);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.dancing-bear {
    font-size: 1rem;
    animation: dance 1s ease-in-out infinite;
}

.dancing-bear:nth-child(3) {
    animation-delay: 0.5s;
}

@keyframes dance {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-4px) rotate(5deg); }
}

.up-next-track {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--ghost-white);
    opacity: 0.8;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    margin-top: 30px;
    text-align: center;
    padding: 0 20px 40px;
}

.disclaimer {
    font-size: 0.7rem;
    color: rgba(240, 230, 255, 0.4);
    line-height: 1.6;
    margin-bottom: 12px;
}

.disclaimer a {
    color: var(--electric-cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

.disclaimer a:hover {
    color: var(--hot-pink);
}

.archive-link {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--rose-red);
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid rgba(233, 69, 96, 0.3);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.archive-link:hover {
    background: rgba(233, 69, 96, 0.1);
    border-color: var(--rose-red);
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.2);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 540px) {
    .header {
        min-height: 45vh;
        padding: 30px 20px;
    }

    .logo {
        width: min(92vw, 400px);
        height: min(92vw, 400px);
    }

    .track-title {
        font-size: 1.4rem;
    }

    .now-playing-card {
        padding: 20px;
        border-radius: 20px;
    }

    .show-venue {
        font-size: 1.1rem;
    }

    .visualizer .bar {
        width: 5px;
    }
}

@media (max-width: 380px) {
    .logo {
        width: min(95vw, 340px);
        height: min(95vw, 340px);
    }

    .track-title {
        font-size: 1.2rem;
    }

    .visualizer {
        gap: 3px;
    }

    .visualizer .bar {
        width: 4px;
    }
}

/* Large screens - logo dominates */
@media (min-width: 768px) {
    .header {
        min-height: 60vh;
    }

    .logo {
        width: 650px;
        height: 650px;
    }
}

/* Extra large screens */
@media (min-width: 1200px) {
    .logo {
        width: 750px;
        height: 750px;
    }
}

/* ============================================
   LOADING / NO CONTENT STATES
   ============================================ */

.loading .track-title {
    animation: loadingPulse 2s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Click to play overlay hint */
body.needs-interaction::after {
    content: 'Click anywhere to start';
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--electric-cyan);
    padding: 10px 20px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    animation: fadeInOut 2s ease-in-out infinite;
    z-index: 1000;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
