/* ==========================================================================
   VICETREAM TUNES - Pop Art Floppy Disk Radio
   A minimalist, retro-futuristic music streaming experience
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties / Theme System
   -------------------------------------------------------------------------- */

:root {
    /* Base typography */
    --font-display: 'Archivo Black', sans-serif;
    --font-body: 'Space Mono', monospace;
    
    /* Timing */
    --transition-fast: 0.2s ease;
    --transition-theme: 0.4s ease;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 4rem;
}

/* --------------------------------------------------------------------------
   Theme: Lounge (Default) - 80s Sunset Coral
   -------------------------------------------------------------------------- */
[data-theme="lounge"] {
    --primary: #FF6B6B;
    --primary-dark: #E85555;
    --secondary: #FFE66D;
    --text: #2D2D2D;
    --text-muted: #666666;
    --bg-start: #FFF5E6;
    --bg-end: #FFE4D6;
    --disk-shadow: rgba(255, 107, 107, 0.4);
    --halftone-color: rgba(255, 107, 107, 0.08);
}

/* --------------------------------------------------------------------------
   Theme: Cool - Miami Vice Teal
   -------------------------------------------------------------------------- */
[data-theme="cool"] {
    --primary: #4ECDC4;
    --primary-dark: #3DB8B0;
    --secondary: #1A535C;
    --text: #1A535C;
    --text-muted: #3D7A82;
    --bg-start: #E8F8F5;
    --bg-end: #D4F1EC;
    --disk-shadow: rgba(78, 205, 196, 0.4);
    --halftone-color: rgba(78, 205, 196, 0.08);
}

/* --------------------------------------------------------------------------
   Theme: Rock - Bold Rebellion Red
   -------------------------------------------------------------------------- */
[data-theme="rock"] {
    --primary: #E63946;
    --primary-dark: #D32836;
    --secondary: #F1FAEE;
    --text: #F1FAEE;
    --text-muted: #A8DADC;
    --bg-start: #1D3557;
    --bg-end: #14253D;
    --disk-shadow: rgba(230, 57, 70, 0.5);
    --halftone-color: rgba(230, 57, 70, 0.1);
}

/* --------------------------------------------------------------------------
   Theme: Party - Neon Club Nights
   -------------------------------------------------------------------------- */
[data-theme="party"] {
    --primary: #FF006E;
    --primary-dark: #E6005F;
    --secondary: #FFBE0B;
    --text: #2B2D42;
    --text-muted: #555770;
    --bg-start: #FFF0F5;
    --bg-end: #FFE4EC;
    --disk-shadow: rgba(255, 0, 110, 0.4);
    --halftone-color: rgba(255, 0, 110, 0.08);
}

/* --------------------------------------------------------------------------
   Theme: Chill - Vaporwave Lavender
   -------------------------------------------------------------------------- */
[data-theme="chill"] {
    --primary: #9D8DF1;
    --primary-dark: #8A7ADE;
    --secondary: #B8C0FF;
    --text: #2D2A4A;
    --text-muted: #6B6490;
    --bg-start: #F0EDFF;
    --bg-end: #E4E0FF;
    --disk-shadow: rgba(157, 141, 241, 0.4);
    --halftone-color: rgba(157, 141, 241, 0.1);
}

/* --------------------------------------------------------------------------
   Reset & Base Styles
   -------------------------------------------------------------------------- */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
                }
                
                body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
    color: var(--text);
    min-height: 100vh;
    transition: background var(--transition-theme), color var(--transition-theme);
    overflow-x: hidden;
                }
                
                button {
    font-family: inherit;
                    cursor: pointer;
                    border: none;
                    background: none;
}

/* --------------------------------------------------------------------------
   App Container
   -------------------------------------------------------------------------- */

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* --------------------------------------------------------------------------
   ON AIR Button (Live Stage Link)
   -------------------------------------------------------------------------- */

.onair-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid #666;
    border-radius: 50px;
    text-decoration: none;
    color: #666;
    font-family: 'Archivo Black', sans-serif;
    font-size: 0.875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    box-shadow: 
        0 0 10px rgba(100, 100, 100, 0.2),
        inset 0 0 5px rgba(100, 100, 100, 0.1);
    transition: all 0.3s ease;
}

.onair-btn:hover {
    transform: scale(1.05);
    border-color: #888;
    color: #888;
    box-shadow: 
        0 0 15px rgba(100, 100, 100, 0.3),
        inset 0 0 8px rgba(100, 100, 100, 0.15);
}

.onair-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #555;
    box-shadow: 0 0 5px #555;
}

.onair-text {
    font-weight: 900;
}

/* Active state (when someone is live) */
.onair-btn.live {
    border-color: #FF006E;
    color: #FF006E;
    box-shadow: 
        0 0 20px rgba(255, 0, 110, 0.4),
        inset 0 0 10px rgba(255, 0, 110, 0.1);
    animation: onair-pulse 2s ease-in-out infinite;
}

.onair-btn.live:hover {
    background: rgba(255, 0, 110, 0.15);
    box-shadow: 
        0 0 30px rgba(255, 0, 110, 0.6),
        inset 0 0 15px rgba(255, 0, 110, 0.2);
}

.onair-btn.live .onair-indicator {
    background: #FF006E;
    box-shadow: 0 0 10px #FF006E;
    animation: onair-blink 1.5s ease-in-out infinite;
}

@keyframes onair-pulse {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(255, 0, 110, 0.4),
            inset 0 0 10px rgba(255, 0, 110, 0.1);
    }
    50% {
        box-shadow: 
            0 0 35px rgba(255, 0, 110, 0.6),
            inset 0 0 15px rgba(255, 0, 110, 0.2);
    }
}

@keyframes onair-blink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 10px #FF006E;
    }
    50% {
        opacity: 0.6;
        box-shadow: 0 0 20px #FF006E;
    }
}

/* --------------------------------------------------------------------------
   Halftone Dot Pattern Overlay (Pop Art Effect)
   -------------------------------------------------------------------------- */

.halftone-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(var(--halftone-color) 1px, transparent 1px);
    background-size: 8px 8px;
    transition: background-image var(--transition-theme);
}

/* --------------------------------------------------------------------------
   Main Content Area
   -------------------------------------------------------------------------- */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    position: relative;
    z-index: 1;
    gap: var(--space-lg);
}

/* --------------------------------------------------------------------------
   Header / Logo
   -------------------------------------------------------------------------- */

.header {
    text-align: center;
}

.logo {
    font-family: var(--font-display);
    font-size: clamp(2rem, 8vw, 4rem);
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--text);
    transition: color var(--transition-theme);
}

.logo-accent {
    color: var(--primary);
    transition: color var(--transition-theme);
}

.tagline {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    margin-top: var(--space-xs);
    transition: color var(--transition-theme);
}

/* --------------------------------------------------------------------------
   Floppy Disk Stack (Horizontal Fan)
   -------------------------------------------------------------------------- */

.floppy-stack {
    display: flex;
    align-items: center;
    justify-content: center;
                    position: relative;
    height: 220px;
    padding: 0 20px;
}

/* --------------------------------------------------------------------------
   Floppy Disk Component
   -------------------------------------------------------------------------- */

.floppy {
    --disk-color: #333;
    --label-bg: #fff;
    
    width: 160px;
    height: 160px;
    background: var(--disk-color);
    border-radius: 8px;
    flex-shrink: 0;
    margin-left: -50px;
    transition: 
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease,
        margin 0.3s ease;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        0 2px 6px rgba(0, 0, 0, 0.15);
}

.floppy:first-child {
    margin-left: 0;
}

/* Fan rotation */
.floppy:nth-child(1) { transform: rotate(-10deg); z-index: 1; }
.floppy:nth-child(2) { transform: rotate(-5deg); z-index: 2; }
.floppy:nth-child(3) { transform: rotate(0deg); z-index: 3; }
.floppy:nth-child(4) { transform: rotate(5deg); z-index: 4; }
.floppy:nth-child(5) { transform: rotate(10deg); z-index: 5; }

.floppy:hover {
    transform: translateY(-20px) rotate(0deg) scale(1.08);
    z-index: 10 !important;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.2);
}

.floppy:active {
    transform: translateY(-10px) rotate(0deg) scale(1.02);
}

.floppy.active {
    transform: translateY(-30px) rotate(0deg) scale(1.12);
    z-index: 10 !important;
    box-shadow: 
        0 0 0 4px var(--primary),
        0 0 50px var(--disk-shadow),
        0 24px 48px rgba(0, 0, 0, 0.25);
}

/* Metal slider at top */
.floppy__slider {
                        position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 20px;
    background: linear-gradient(180deg, #D0D0D0 0%, #888 50%, #A8A8A8 100%);
    border-radius: 3px;
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.6);
}

.floppy__slider::after {
    content: '';
                        position: absolute;
    right: 8px;
    top: 5px;
    width: 28px;
    height: 10px;
    background: #555;
    border-radius: 2px;
}

/* Label area */
.floppy__label {
                    position: absolute;
    top: 40px;
    left: 14px;
    right: 14px;
    bottom: 40px;
    background: var(--label-bg);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.floppy__label-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    color: var(--disk-color);
}

/* Hole cutout at bottom */
.floppy__hole {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 14px;
    background: rgba(0,0,0,0.35);
    border-radius: 7px;
}

/* --------------------------------------------------------------------------
   Floppy Disk Color Variants
   -------------------------------------------------------------------------- */

.floppy--lounge {
    --disk-color: #FF6B6B;
    --label-bg: #FFF5E6;
}

.floppy--cool {
    --disk-color: #4ECDC4;
    --label-bg: #E8F8F5;
}

.floppy--rock {
    --disk-color: #E63946;
    --label-bg: #1D3557;
}

.floppy--rock .floppy__label-text {
    color: #F1FAEE;
}

.floppy--rock .floppy__label-sub {
    color: #A8DADC;
}

.floppy--party {
    --disk-color: #FF006E;
    --label-bg: #FFBE0B;
}

.floppy--party .floppy__label-text {
    color: #2B2D42;
}

.floppy--chill {
    --disk-color: #9D8DF1;
    --label-bg: #F0EDFF;
}

/* --------------------------------------------------------------------------
   Now Playing Display
   -------------------------------------------------------------------------- */

.now-playing {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    max-width: 400px;
}

.now-playing__label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    transition: color var(--transition-theme);
}

.now-playing__station {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--primary);
    transition: color var(--transition-theme);
}

/* --------------------------------------------------------------------------
   Track Info (Artist & Song)
   -------------------------------------------------------------------------- */

.track-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: var(--space-xs);
    min-height: 48px;
}

.track-info__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    transition: color var(--transition-theme);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-info__artist {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color var(--transition-theme);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Track update animation */
@keyframes track-fade-in {
                    from {
                        opacity: 0;
        transform: translateY(8px);
    }
    to {
                        opacity: 1;
        transform: translateY(0);
    }
}

.track-update {
    animation: track-fade-in 0.4s ease-out;
}

/* --------------------------------------------------------------------------
   Play/Pause Button
   -------------------------------------------------------------------------- */

.play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 
        background var(--transition-theme),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
    box-shadow: 
        0 4px 16px var(--disk-shadow),
        0 2px 4px rgba(0,0,0,0.1);
}

.play-btn:hover {
    transform: scale(1.08);
    background: var(--primary-dark);
    box-shadow: 
        0 8px 32px var(--disk-shadow),
        0 4px 8px rgba(0,0,0,0.15);
}

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

.play-btn__icon {
    width: 32px;
    height: 32px;
}

.play-btn__icon--play {
    margin-left: 4px; /* Visual centering for play triangle */
}

.play-btn__icon--pause {
    display: none;
}

.play-btn.playing .play-btn__icon--play {
    display: none;
}

.play-btn.playing .play-btn__icon--pause {
                    display: block;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
    padding: var(--space-md);
    text-align: center;
                    position: relative;
    z-index: 1;
}

.footer__link {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    text-decoration: none;
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--text-muted);
    border-radius: 4px;
    transition: 
        color var(--transition-fast),
        border-color var(--transition-fast),
        background var(--transition-fast);
}

.footer__link:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(255,255,255,0.5);
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */

/* Tablet and up */
@media (min-width: 640px) {
    .floppy-stack {
        height: 280px;
    }
    
    .floppy {
        width: 200px;
        height: 200px;
        margin-left: -60px;
    }
    
    .floppy:first-child {
        margin-left: 0;
    }
    
    .floppy__slider {
        width: 100px;
        height: 22px;
        top: 14px;
    }
    
    .floppy__slider::after {
        width: 32px;
        height: 11px;
        right: 9px;
        top: 5px;
    }
    
    .floppy__label {
        top: 44px;
        left: 16px;
        right: 16px;
        bottom: 44px;
    }
    
    .floppy__label-text {
        font-size: 1.3rem;
    }
    
    .floppy__hole {
        width: 40px;
        height: 15px;
        bottom: 16px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .floppy-stack {
        height: 320px;
    }
    
    .floppy {
        width: 240px;
        height: 240px;
        margin-left: -70px;
    }
    
    .floppy:first-child {
        margin-left: 0;
    }
    
    .floppy__slider {
        width: 120px;
        height: 26px;
        top: 16px;
    }
    
    .floppy__slider::after {
        width: 40px;
        height: 13px;
        right: 11px;
        top: 6px;
    }
    
    .floppy__label {
        top: 52px;
        left: 20px;
        right: 20px;
        bottom: 52px;
    }
    
    .floppy__label-text {
        font-size: 1.6rem;
    }
    
    .floppy__hole {
        width: 48px;
        height: 17px;
        bottom: 20px;
    }
    
    .play-btn {
        width: 100px;
        height: 100px;
    }
    
    .play-btn__icon {
        width: 40px;
        height: 40px;
    }
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .main-content {
        padding: var(--space-sm);
        gap: var(--space-md);
    }
    
    .onair-btn {
        top: 10px;
        left: 10px;
        padding: 8px 14px;
        font-size: 0.75rem;
        gap: 8px;
    }
    
    .onair-indicator {
        width: 10px;
        height: 10px;
    }
    
    .floppy-stack {
        height: auto;
        flex-wrap: nowrap;
        overflow: visible;
        justify-content: center;
        padding: 30px 10px 50px;
        margin: 0;
                    width: 100%;
                }
    
    .floppy {
        width: 90px;
        height: 90px;
        margin-left: -25px;
    }
    
    .floppy:first-child {
        margin-left: 0;
    }
    
    /* Keep fan rotation on mobile */
    .floppy:nth-child(1) { transform: rotate(-10deg); }
    .floppy:nth-child(2) { transform: rotate(-5deg); }
    .floppy:nth-child(3) { transform: rotate(0deg); }
    .floppy:nth-child(4) { transform: rotate(5deg); }
    .floppy:nth-child(5) { transform: rotate(10deg); }
    
    .floppy:hover {
        transform: translateY(-15px) rotate(0deg) scale(1.05);
    }
    
    .floppy.active {
        transform: translateY(-20px) rotate(0deg) scale(1.1);
    }
    
    .floppy__slider {
        width: 45px;
        height: 11px;
        top: 6px;
    }
    
    .floppy__slider::after {
        width: 15px;
        height: 5px;
        right: 4px;
        top: 3px;
    }
    
    .floppy__label {
        top: 22px;
        left: 8px;
        right: 8px;
        bottom: 22px;
    }
    
    .floppy__label-text {
        font-size: 0.65rem;
    }
    
    .floppy__hole {
        width: 18px;
        height: 7px;
        bottom: 8px;
    }
    
    .play-btn {
        width: 64px;
        height: 64px;
    }
    
    .play-btn__icon {
        width: 28px;
        height: 28px;
    }
    
    .now-playing__station {
        font-size: 1.25rem;
    }
}

/* Accessibility - Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .floppy {
        border: 2px solid currentColor;
    }
    
    .play-btn {
        border: 2px solid currentColor;
    }
}
