/* radio.css */

.radio-new {
    width: 100%;
    padding-bottom: 40px;
}

/* Приветствие */
.radio-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.radio-welcome h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.radio-welcome h1 span {
    color: var(--accent);
}

.radio-welcome p {
    font-size: 15px;
    color: var(--text-secondary);
}

.radio-stats-badge {
    background: rgba(255, 102, 46, 0.1);
    border: 1px solid rgba(255, 102, 46, 0.2);
    padding: 10px 20px;
    border-radius: 60px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Основная панель */
.radio-main-panel {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
}

/* Левая область — плеер */
.radio-player-area {
    background: linear-gradient(145deg, var(--card-bg), rgba(20, 20, 30, 0.8));
    border-radius: 40px;
    padding: 40px;
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.3);
}

.vinyl-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin-bottom: 30px;
}

.vinyl-disc {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.05);
    transition: box-shadow 0.3s;
    animation: rotateVinyl 20s linear infinite;
    animation-play-state: paused;
}

.vinyl-disc.playing {
    animation-play-state: running;
    box-shadow: 0 0 30px var(--accent), 0 20px 40px rgba(0, 0, 0, 0.5);
}

@keyframes rotateVinyl {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.vinyl-disc img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vinyl-hole {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: var(--bg-main);
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.vinyl-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 102, 46, 0.3), transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.vinyl-disc.playing + .vinyl-glow {
    opacity: 1;
}

.track-details {
    text-align: center;
    margin-bottom: 30px;
}

.track-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--btn-accent-text); /* светлая тема: белый, тёмная: чёрный */
    padding: 4px 14px;
    border-radius: 40px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.track-details h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.2;
}

.track-details p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.track-meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

.track-meta-row i {
    color: var(--accent);
    margin-right: 6px;
}

.radio-controls-new {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ctrl-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ctrl-btn:hover {
    background: var(--nav-item-hover-bg);
    color: var(--accent);
    border-color: var(--accent);
}

.ctrl-btn.liked {
    color: #f87171;
    border-color: #f87171;
}

.ctrl-btn.disliked {
    color: var(--accent);
    border-color: var(--accent);
}

.ctrl-play-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: var(--btn-accent-text);
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 10px 25px rgba(255, 102, 46, 0.5);
}

.ctrl-play-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

/* Правая область */
.radio-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.genres-panel {
    background: var(--card-bg);
    border-radius: 32px;
    padding: 24px;
    border: 1px solid var(--border-light);
}

.genres-panel h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.genres-panel h3 i {
    color: var(--accent);
}

.genres-scrollable {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--scrollbar-track);
}

.genres-scrollable::-webkit-scrollbar {
    width: 4px;
}

.genres-scrollable::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

.genre-radio-btn {
    background: var(--input-bg);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.genre-radio-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--btn-accent-text); /* светлая: белый, тёмная: чёрный */
    box-shadow: 0 4px 12px rgba(255, 102, 46, 0.3);
}

.genre-radio-btn:hover:not(.active) {
    background: var(--nav-item-hover-bg);
    color: var(--text-primary);
    border-color: var(--accent);
}

.history-panel {
    background: var(--card-bg);
    border-radius: 32px;
    padding: 24px;
    border: 1px solid var(--border-light);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.history-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-header h3 i {
    color: var(--accent);
}

.clear-btn {
    background: none;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.clear-btn:hover {
    background: var(--nav-item-hover-bg);
    color: #ef4444;
    border-color: #ef4444;
}

.history-list-new {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
    overflow-x: hidden;
}

.history-item-new {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: 16px;
    background: var(--input-bg);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.2s;
    max-width: 100%;
    box-sizing: border-box;
}

.history-item-new:hover {
    background: var(--nav-item-hover-bg);
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.history-cover-new {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
}

.history-cover-new img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-info-new {
    flex: 1;
    min-width: 0;
}

.history-title-new {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.history-artist-new {
    font-size: 13px;
    color: var(--text-secondary);
}

.history-time-new {
    font-size: 12px;
    color: var(--accent);
    font-weight: 500;
    flex-shrink: 0;
}

.empty-history {
    color: var(--text-secondary);
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

/* === АДАПТИВ === */
@media (max-width: 1000px) {
    .radio-main-panel {
        grid-template-columns: 1fr;
    }
    .radio-welcome {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (min-width: 1001px) and (max-width: 1150px) {
    .radio-main-panel {
        grid-template-columns: 1fr 0.9fr;
        gap: 24px;
    }
    .radio-player-area {
        padding: 30px 20px;
    }
    .vinyl-container {
        width: 240px;
        height: 240px;
    }
    .track-details h2 {
        font-size: 28px;
    }
    .track-details p {
        font-size: 16px;
    }
    .track-meta-row {
        gap: 16px;
        font-size: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .ctrl-btn {
        width: 44px;
        height: 44px;
    }
    .ctrl-play-btn {
        width: 64px;
        height: 64px;
        font-size: 26px;
    }
    .radio-sidebar {
        min-width: 0;
        overflow-x: hidden;
    }
    .genres-scrollable {
        max-height: 180px;
    }
    .history-list-new {
        max-height: 250px;
    }
}

@media (max-width: 600px) {
    .radio-player-area {
        padding: 24px 20px;
    }
    .vinyl-container {
        width: 220px;
        height: 220px;
    }
    .track-details h2 {
        font-size: 24px;
    }
    .track-details p {
        font-size: 16px;
    }
    .ctrl-btn {
        width: 44px;
        height: 44px;
    }
    .ctrl-play-btn {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}

/* === СВЕТЛАЯ ТЕМА: иконки в панели управления белые, при наведении оранжевые без фона === */
body.light-theme .ctrl-btn:not(.liked):not(.disliked) {
    color: #ffffff;
}
body.light-theme .ctrl-btn:not(.liked):not(.disliked):hover {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
}
body.light-theme .ctrl-btn.liked {
    color: #f87171;
}
body.light-theme .ctrl-btn.disliked {
    color: var(--accent);
}
body.light-theme .ctrl-play-btn {
    color: #ffffff;
}
body.light-theme .ctrl-play-btn:hover {
    background: var(--accent-hover);
    color: #ffffff;
}