/* === CLEAN WHITE THEME - TWO BOX LAYOUT === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px;
    color: #1e293b;
}

.radio-app {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* === PLAYER BOX - All player controls in one box === */
.player-box {
    background: #ffffff;
    border-radius: 28px;
    padding: 28px 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cover-art {
    width: 120px;
    height: 120px;
    background: #eef2ff;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}
.cover-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.fallback-icon {
    width: 100%;
    height: 100%;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: #3b82f6;
}

.station-info {
    margin-bottom: 20px;
    width: 100%;
}
#stationName {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 4px;
    word-break: break-word;
}
#stationAuthor {
    font-size: 0.9rem;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
#stationAuthor i {
    color: #3b82f6;
    font-size: 0.8rem;
}

.controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    width: 100%;
}

.control-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
    color: #3b82f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.07s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.control-btn:active {
    background: #eef2ff;
    transform: translateY(2px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.play-pause {
    background: #3b82f6;
    color: white;
    width: 68px;
    height: 68px;
    font-size: 2rem;
    border: none;
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.25);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    width: 100%;
    max-width: 260px;
    margin: 0 auto 16px auto;
}
.volume-control i {
    color: #3b82f6;
    font-size: 1.2rem;
    width: 24px;
}
input[type=range] {
    flex: 1;
    height: 5px;
    -webkit-appearance: none;
    background: linear-gradient(90deg, #3b82f6, #a855f7);
    border-radius: 20px;
    outline: none;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    border: 2px solid #3b82f6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
}

.loading-audio {
    background: #eef2ff;
    padding: 8px 20px;
    border-radius: 40px;
    color: #4f46e5;
    font-size: 0.9rem;
    border: 1px solid #cbd5e1;
    font-weight: 500;
    display: inline-block;
    margin: 0 auto;
}
.hidden {
    display: none !important;
}

/* === STATIONS BOX - All stations in separate box === */
.stations-box {
    background: #ffffff;
    border-radius: 24px;
    padding: 5px 5px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.stations-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}
.stations-header i {
    color: #3b82f6;
    font-size: 1.1rem;
}
.stations-header span {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}
.station-count {
    margin-left: auto;
    background: #eef2ff;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.8rem;
    color: #4f46e5;
    font-weight: 500;
}

.station-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.station-item {
    background: #f8fafc;
    border-radius: 18px;
    padding: 16px 8px 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.1s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}
.station-item:active {
    background: #eef2ff;
    transform: scale(0.98);
}
.station-item.active {
    border: 2px solid #3b82f6;
    background: #ffffff;
}

.station-img {
    width: 60px;
    height: 60px;
    background: #ffffff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #3b82f6;
    margin-bottom: 8px;
    border: 1px solid #cbd5e1;
    overflow: hidden;
}
.station-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.station-img .fallback-icon {
    font-size: 2rem;
    background: transparent;
    display: flex;
    color: #3b82f6;
}

.station-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: #0f172a;
    word-break: break-word;
    padding: 0 4px;
    margin-bottom: 4px;
}
.station-author {
    font-size: 0.6rem;
    color: #64748b;
    padding: 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    margin-bottom: 8px;
}

/* Status Indicator - Green for LIVE, Red for OFFLINE */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 30px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 4px;
}

.status-indicator.live {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.status-indicator.live i {
    color: #22c55e;
    font-size: 0.5rem;
}

.status-indicator.offline {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
.status-indicator.offline i {
    color: #ef4444;
    font-size: 0.5rem;
}

/* Pulse animation for live indicator */
@keyframes pulse-green {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

.status-indicator.live i {
    animation: pulse-green 1.5s infinite;
}

.footer-note {
    text-align: center;
    color: #94a3b8;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 0;
}
.footer-note i {
    color: #3b82f6;
}

.error-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #ef4444;
    color: white;
    padding: 10px 20px;
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}