/* Nightride FM - Custom Web Receiver Stylesheet */

:root {
    --bg-dark: #0a0614;
    --accent-pink: #ff007f;
    --accent-cyan: #00f3ff;
    --accent-purple: #7928ca;
    --text-main: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.45);
    --glass-bg: rgba(20, 15, 35, 0.65);
    --glass-border: rgba(255, 255, 255, 0.12);
    --font-heading: 'Orbitron', -apple-system, sans-serif;
    --font-body: 'Rajdhani', -apple-system, sans-serif;
}

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

html, body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-dark);
    font-family: var(--font-body);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

#receiver-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background Ambient Blur Layer */
.bg-blur {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-image: url('https://lissen.to/lissen-logo-512.png');
    background-position: center;
    background-size: cover;
    filter: blur(80px) brightness(0.25) saturate(1.8);
    transition: background-image 1.5s ease-in-out;
    z-index: 1;
}

/* Cast Media Player styling overrides */
cast-media-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    --theme-color: var(--accent-pink);
    --progress-color: var(--accent-cyan);
    --watermark-image: none;
    opacity: 0; /* Keep custom overlay visible; media player runs audio behind */
}

/* Custom Overlay Display */
.overlay-container {
    position: relative;
    z-index: 10;
    width: 85vw;
    height: auto;
    max-width: 1400px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 28px;
    padding: 48px;
    display: flex;
    flex-direction: column;
    gap: 48px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6),
                0 0 40px rgba(255, 0, 127, 0.15);
}

/* Header Bar */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.station-badge {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--accent-cyan);
    text-shadow: 0 0 12px rgba(0, 243, 255, 0.5);
    text-transform: uppercase;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    background: rgba(255, 0, 127, 0.2);
    border: 1px solid rgba(255, 0, 127, 0.5);
    padding: 8px 18px;
    border-radius: 20px;
    color: var(--accent-pink);
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.3);
    transition: opacity 0.3s ease;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: var(--accent-pink);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-pink);
    animation: pulse 1.8s infinite;
}

.pulse-dot.paused {
    animation: none;
    background-color: var(--text-muted);
    box-shadow: none;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 18px var(--accent-pink); }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* Main Content Layout */
.main-content {
    display: flex;
    align-items: center;
    gap: 64px;
}

.artwork-wrapper {
    flex-shrink: 0;
}

.cover-art {
    width: 320px;
    height: 320px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7),
                0 0 30px rgba(0, 243, 255, 0.2);
    transition: transform 0.5s ease, box-shadow 0.5s ease, src 0.3s ease;
}

.cover-art:hover {
    transform: scale(1.02);
}

.metadata-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

.track-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-main);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.artist-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-pink);
    text-shadow: 0 0 10px rgba(255, 0, 127, 0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-desc {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Standalone Browser Dev Controls */
.standalone-panel {
    position: absolute;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    background: rgba(10, 6, 20, 0.95);
    border: 1px solid var(--accent-cyan);
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.standalone-panel.hidden,
.overlay-container.hidden,
.error-container.hidden {
    display: none !important;
}

/* Error Overlay Container */
.error-container {
    position: relative;
    z-index: 20;
    width: 80vw;
    max-width: 900px;
    background: var(--glass-bg);
    border: 1px solid rgba(255, 0, 127, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8),
                0 0 30px rgba(255, 0, 127, 0.2);
}

.error-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
}

.error-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--accent-pink);
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.error-message {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 28px;
}

.error-message code {
    background: rgba(0, 243, 255, 0.1);
    color: var(--accent-cyan);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: monospace;
}

.station-shortcuts-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.station-shortcuts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.station-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    padding: 10px 18px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.station-btn:hover {
    background: var(--accent-pink);
    border-color: var(--accent-pink);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 127, 0.4);
}

.standalone-header {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--accent-cyan);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.standalone-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.standalone-body select, .standalone-body button {
    background: #1a142e;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
}

.standalone-body button {
    background: var(--accent-pink);
    border: none;
    font-weight: bold;
}
