/**
 * Radio Stream Player: PIP UI Styles
 */

:root {
    --rp-glass-bg: rgba(255, 255, 255, 0.08);
    --rp-glass-border: 1px solid rgba(255, 255, 255, 0.15);
    --rp-glass-blur: blur(25px);
    --rp-primary: #3b82f6;
    --rp-text: #ffffff;
    --rp-radius: 20px;
}

.radio-player-pip {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 320px;
    background: var(--rp-glass-bg);
    backdrop-filter: var(--rp-glass-blur);
    -webkit-backdrop-filter: var(--rp-glass-blur);
    border: var(--rp-glass-border);
    border-radius: var(--rp-radius);
    padding: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    color: var(--rp-text);
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Minimized State */
.radio-player-pip.minimized {
    width: 60px;
    height: 60px;
    padding: 0;
    overflow: hidden;
    border-radius: 50%;
    cursor: pointer;
}

.radio-player-pip.minimized .rp-expanded-content {
    display: none;
}

.radio-player-pip.minimized .rp-mini-icon {
    display: flex;
}

.rp-mini-icon {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Expanded Content */
.rp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rp-title {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.8;
}

.rp-controls-top {
    display: flex;
    gap: 10px;
}

.rp-btn-icon {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.rp-btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

.rp-body {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rp-visualizer-placeholder {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.rp-station-info {
    flex: 1;
}

.rp-station-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.rp-now-playing {
    font-size: 0.8rem;
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.rp-controls-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 5px;
}

.rp-play-btn {
    width: 50px;
    height: 50px;
    background: var(--rp-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: transform 0.2s;
}

.rp-play-btn:hover {
    transform: scale(1.05);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 0.5; }
}

.rp-live-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* ==========================================================================
   Radio Portal & Hub (/radio) Custom Styles
   ========================================================================== */

.rh-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem 1rem;
    position: relative;
    z-index: 10;
}

.rh-header {
    margin-bottom: 2rem;
    text-align: center;
}

.rh-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #60a5fa;
    margin-bottom: 12px;
}

.rh-pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #ef4444;
    animation: pulse 1.5s infinite;
}

.rh-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.rh-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted, #94a3b8);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Hero Featured Player Card */
.rh-hero-card {
    position: relative;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.rh-hero-glow {
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(0, 0, 0, 0) 65%);
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.rh-hero-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.rh-hero-visualizer {
    width: 90px;
    height: 90px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
}

.rh-wave-bar {
    width: 5px;
    height: 20px;
    background: #3b82f6;
    border-radius: 3px;
    transition: height 0.2s ease;
}

.rh-hero-visualizer.is-playing .rh-wave-bar:nth-child(1) { animation: soundwave 1.1s infinite ease-in-out; }
.rh-hero-visualizer.is-playing .rh-wave-bar:nth-child(2) { animation: soundwave 0.8s infinite ease-in-out 0.2s; }
.rh-hero-visualizer.is-playing .rh-wave-bar:nth-child(3) { animation: soundwave 1.3s infinite ease-in-out 0.4s; }
.rh-hero-visualizer.is-playing .rh-wave-bar:nth-child(4) { animation: soundwave 0.9s infinite ease-in-out 0.1s; }
.rh-hero-visualizer.is-playing .rh-wave-bar:nth-child(5) { animation: soundwave 1.2s infinite ease-in-out 0.3s; }

@keyframes soundwave {
    0%, 100% { height: 10px; background: #3b82f6; }
    50% { height: 45px; background: #60a5fa; box-shadow: 0 0 10px #60a5fa; }
}

.rh-hero-icon {
    font-size: 2.2rem;
    display: block;
}

.rh-hero-visualizer.is-playing .rh-hero-icon {
    display: none;
}

.rh-hero-info {
    flex: 1;
    min-width: 260px;
}

.rh-hero-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.rh-status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rh-status-badge.is-live {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.rh-status-badge.is-buffering {
    background: rgba(234, 179, 8, 0.2);
    color: #fde047;
}

.rh-genre-badge {
    font-size: 0.8rem;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

.rh-hero-station-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 4px 0;
    color: #ffffff;
}

.rh-hero-now-playing {
    font-size: 0.95rem;
    color: #94a3b8;
}

.rh-hero-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rh-btn {
    border: none;
    outline: none;
    cursor: pointer;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.rh-btn-icon {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
}

.rh-btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.rh-btn-play {
    width: 64px;
    height: 64px;
    font-size: 1.6rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.rh-btn-play:hover {
    transform: scale(1.06);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.6);
}

.rh-star-btn {
    font-size: 1.3rem;
    color: #facc15;
}

.rh-hero-volume-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 2;
}

.rh-volume-input {
    flex: 1;
    max-width: 200px;
    accent-color: #3b82f6;
    cursor: pointer;
}

/* Search & Genre Filters */
.rh-filter-section {
    margin-bottom: 2rem;
}

.rh-search-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto 1.5rem auto;
}

.rh-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    font-size: 1.1rem;
}

.rh-search-input {
    width: 100%;
    padding: 14px 44px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 1rem;
    outline: none;
    transition: all 0.25s ease;
}

.rh-search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    background: rgba(15, 23, 42, 0.75);
}

.rh-search-clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
}

.rh-genre-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.rh-pill {
    padding: 8px 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rh-pill:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: translateY(-1px);
}

.rh-pill.active {
    background: #3b82f6;
    border-color: #60a5fa;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.rh-pill-fav {
    color: #facc15;
    border-color: rgba(250, 204, 21, 0.3);
}

.rh-pill-fav.active {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    border-color: #fde047;
    color: #0f172a;
}

/* Station Grid */
.rh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.rh-card {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.rh-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(59, 130, 246, 0.15);
}

.rh-card.is-active {
    border-color: #3b82f6;
    background: rgba(15, 23, 42, 0.75);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.3);
}

.rh-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.rh-card-genre {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    padding: 4px 10px;
    border-radius: 10px;
}

.rh-card-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rh-badge-premium {
    font-size: 0.7rem;
    font-weight: 800;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 2px 8px;
    border-radius: 8px;
}

.rh-fav-star {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
    line-height: 1;
}

.rh-fav-star:hover, .rh-fav-star.is-fav {
    color: #facc15;
    transform: scale(1.15);
}

/* SVG Star Path Toggling */
.rh-svg-star .rh-star-outline {
    display: block;
}
.rh-svg-star .rh-star-fill {
    display: none;
}
.is-fav .rh-svg-star .rh-star-outline {
    display: none;
}
.is-fav .rh-svg-star .rh-star-fill {
    display: block;
    fill: currentColor;
}

/* Loading Spinner Animation */
@keyframes rh-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.rh-spinner {
    animation: rh-spin 1s linear infinite;
    transform-origin: center;
}

.rh-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    color: #ffffff;
    line-height: 1.3;
}

.rh-card-footer {
    margin-top: auto;
}

.rh-card-play-btn {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.rh-card-play-btn:hover {
    background: #3b82f6;
    border-color: #60a5fa;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.rh-card.is-active .rh-card-play-btn {
    background: #2563eb;
    border-color: #3b82f6;
}

.rh-card-locked {
    opacity: 0.7;
}

.rh-locked-btn {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #fca5a5 !important;
    cursor: not-allowed;
}

.rh-empty-state {
    text-align: center;
    padding: 4rem 1rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 24px;
    border: 1px dashed rgba(255, 255, 255, 0.15);
}

.rh-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .rh-title { font-size: 1.8rem; }
    .rh-hero-content { flex-direction: column; text-align: center; }
    .rh-hero-status-row { justify-content: center; }
    .rh-hero-controls { width: 100%; justify-content: center; }
    .rh-grid { grid-template-columns: 1fr; }
}

