.radio-widget {
    font-family: inherit;
}

.radio-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: #f7f7f7;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 4px 4px 0 0;
}

.radio-nav select {
    font-size: 12px;
    padding: 3px 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    max-width: 140px;
}

.radio-nav-country {
    flex: 0 0 auto;
}

.radio-nav-genre {
    flex: 1 1 auto;
    min-width: 0;
}

/* Player */
.radio-player-container {
    position: relative;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 8px;
    overflow: hidden;
    padding: 16px;
}

.radio-player-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.radio-player-logo-wrap {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255,255,255,0.1);
}

.radio-player-logo {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.radio-player-logo-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4A90D9, #2C5AA0);
    border-radius: 8px;
    font-size: 26px;
    color: #fff;
}

.radio-player-logo[style*="display"] + .radio-player-logo-fallback,
.radio-player-logo:not([src=""]) ~ .radio-player-logo-fallback {
    z-index: 0;
}

.radio-player-details {
    flex: 1;
    min-width: 0;
}

.radio-player-now-playing {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #4ecdc4;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.radio-eq-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

.radio-eq-bars span {
    display: block;
    width: 3px;
    background: #4ecdc4;
    border-radius: 1px;
    animation: radio-eq 0.8s ease-in-out infinite alternate;
}

.radio-eq-bars span:nth-child(1) { height: 4px; animation-delay: 0s; }
.radio-eq-bars span:nth-child(2) { height: 8px; animation-delay: 0.2s; }
.radio-eq-bars span:nth-child(3) { height: 5px; animation-delay: 0.4s; }

@keyframes radio-eq {
    0% { height: 3px; }
    100% { height: 12px; }
}

.radio-player-title {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radio-player-genres {
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    margin-top: 2px;
}

.radio-player {
    width: 100%;
    display: block;
    border-radius: 4px;
}

.radio-player-close {
    position: absolute;
    top: 8px;
    right: 12px;
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    line-height: 1;
    opacity: 0.7;
}

.radio-player-close:hover {
    opacity: 1;
}

/* Station list (widget) */
.radio-station-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.radio-station-item {
    border-bottom: 1px solid #eee;
}

.radio-station-item:last-child {
    border-bottom: none;
}

.radio-station-item.radio-active {
    background: #e8f0fe;
    border-left: 3px solid #1a73e8;
}

.radio-station-link {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    text-decoration: none;
    color: #333;
    transition: background 0.15s;
    gap: 8px;
}

.radio-station-link:hover {
    background: #f5f5f5;
}

.radio-station-logo {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.radio-station-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
    border-radius: 4px;
    font-size: 16px;
    color: #999;
    flex-shrink: 0;
}

.radio-station-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radio-station-genre {
    font-size: 11px;
    color: #999;
    text-transform: capitalize;
    margin-left: 8px;
    white-space: nowrap;
}

/* Station grid (page) */
.radio-station-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    padding: 12px 0;
}

.radio-station-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
    background: #fff;
}

.radio-station-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-color: #ccc;
}

.radio-station-card.radio-active {
    border-color: #1a73e8;
    background: #e8f0fe;
    box-shadow: 0 2px 10px rgba(26,115,232,0.2);
}

.radio-station-card-link {
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.radio-card-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.radio-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 8px;
    font-size: 24px;
    color: #fff;
}

.radio-card-name {
    font-size: 13px;
    font-weight: 500;
    word-break: break-word;
}

.radio-card-genre {
    font-size: 11px;
    color: #999;
    text-transform: capitalize;
}

/* Empty message */
.radio-empty-msg {
    color: #666;
    font-size: 13px;
    text-align: center;
    padding: 20px 10px;
}

/* Broken station logo fallback */
.radio-station-logo.radio-logo-error,
.radio-card-logo.radio-logo-error,
.radio-player-logo.radio-logo-error {
    display: none;
}

/* Unavailable stations */
.radio-station-item.radio-unavailable,
.radio-station-card.radio-unavailable {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(1);
}

.radio-station-item.radio-unavailable .radio-station-link,
.radio-station-card.radio-unavailable .radio-station-card-link {
    cursor: default;
}
