/* Playlists page styles */
.playlists-header {
    text-align: center;
    padding: 20px 15px;
    margin-bottom: 20px;
    background: var(--card-bg, #fff);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.playlists-header h1 {
    font-size: 1.8rem;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.playlists-header h1 i {
    color: var(--text-muted, #888);
}
.playlists-header p {
    color: var(--text-muted, #666);
    margin: 0;
    font-size: 1rem;
}
.playlists-stats {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}
.playlists-stat {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}
.playlists-stat.blue {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-muted, #666);
}

/* Tabs */
.playlists-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding: 8px;
    background: var(--card-bg, #fff);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.playlists-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: var(--bg-secondary, #f5f5f5);
    color: var(--text-color, #333);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    outline: none;
}
.playlists-tab:focus {
    outline: none;
}
.playlists-tab:hover {
    background: #e9e9e9;
}
.playlists-tab.active {
    background: #555;
    color: #fff;
}
.playlists-tab .tab-count {
    padding: 2px 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    font-size: 0.8rem;
}
.playlists-tab.active .tab-count {
    background: rgba(255,255,255,0.3);
}
.playlists-tab-content {
    display: none;
}
.playlists-tab-content.active {
    display: block;
}

/* Live Feed */
.live-feed-header {
    margin-bottom: 15px;
    padding: 10px 15px;
    background: var(--card-bg, #fff);
    border-radius: 8px;
}
.live-feed-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.1rem;
}
.live-feed-title .live-dot {
    width: 10px;
    height: 10px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}
.live-feed-refresh {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: var(--bg-secondary, #f0f0f0);
    color: var(--text-color, #333);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.live-feed-refresh:hover {
    background: #e0e0e0;
}
.live-feed-refresh:focus {
    outline: none;
}
.live-feed-refresh.loading i {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.live-feed-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.live-feed-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: var(--card-bg, #fff);
    border-bottom: 1px solid var(--border-color, #eee);
    transition: background 0.2s;
}
.live-feed-item:first-child {
    border-radius: 8px 8px 0 0;
}
.live-feed-item:last-child {
    border-radius: 0 0 8px 8px;
    border-bottom: none;
}
.live-feed-item:only-child {
    border-radius: 8px;
}
.live-feed-item:hover {
    background: var(--bg-hover, #f9f9f9);
}
.live-feed-item.track-updated {
    animation: track-pulse 1s ease-out;
}
@keyframes track-pulse {
    0% { background: rgba(40, 167, 69, 0.2); }
    100% { background: transparent; }
}
.live-feed-time {
    flex-shrink: 0;
    width: 70px;
    font-size: 0.8rem;
    color: var(--text-muted, #888);
    text-align: center;
}
.live-feed-station {
    flex-shrink: 0;
    width: auto;
}
.live-feed-station a {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.live-feed-station a span {
    display: none;
}
.live-feed-station a:hover img {
    opacity: 0.8;
}
.live-feed-station img,
.live-feed-item.station-card .station-logo {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
.live-feed-station .station-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: var(--bg-secondary, #f0f0f0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #999);
    font-size: 0.85rem;
    flex-shrink: 0;
}
.live-feed-track {
    flex: 1;
    min-width: 0;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.live-feed-links {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}
.live-feed-link {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    font-size: 0.7rem;
    opacity: 0.8;
    transition: transform 0.2s, opacity 0.2s;
}
.live-feed-link:hover {
    transform: scale(1.1);
    opacity: 1;
    color: #fff;
}
.live-feed-link.vk { background: #0077ff; }
.live-feed-link.ya { background: #ffcc00; color: #000; }
.live-feed-link.ya:hover { color: #000; }
.live-feed-link.yt { background: #ff0000; }

/* Mobile: More button with popup */
.live-feed-more-btn {
    display: none;
    position: relative;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--bg-secondary, #f0f0f0);
    color: var(--text-muted, #666);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    outline: none;
}
.live-feed-more-btn:hover {
    background: #e0e0e0;
}
.live-feed-more-btn:focus {
    outline: none;
}
.live-feed-popup {
    display: none;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) translateX(-40px);
    background: var(--card-bg, #fff);
    border-radius: 20px;
    padding: 6px 10px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
    gap: 6px;
    z-index: 50;
    white-space: nowrap;
}
.live-feed-more-btn.active .live-feed-popup {
    display: flex;
}
.live-feed-popup .live-feed-link {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
}
.dark-theme .live-feed-more-btn {
    background: #444;
    color: #aaa;
}
.dark-theme .live-feed-more-btn:hover {
    background: #555;
}
.dark-theme .live-feed-popup {
    background: #333;
    box-shadow: 0 3px 12px rgba(0,0,0,0.4);
}

/* Play button in live feed - use standard .play-button styles */
.live-feed-play {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
}
.live-feed-play i {
    font-size: 12px;
}
.live-feed-play i.fa-play {
    transform: translateX(1px);
}

.live-feed-empty {
    text-align: center;
    padding: 40px 20px;
    background: var(--card-bg, #fff);
    border-radius: 8px;
    color: var(--text-muted, #666);
}
.live-feed-empty i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 15px;
}

/* Search Tab */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--card-bg, #fff);
    border-radius: 8px;
}
.search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 25px;
    padding: 0 20px;
}
.search-input-wrap i {
    color: var(--text-muted, #888);
}
.search-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 1rem;
    color: var(--text-color, #333);
    outline: none;
}
.search-input-wrap input::placeholder {
    color: var(--text-muted, #999);
}
.search-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background: #28a745;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.search-btn:hover {
    background: #218838;
}
.search-btn:focus {
    outline: none;
}
.search-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}
.search-btn.loading i {
    animation: spin 1s linear infinite;
}

.search-results-info {
    padding: 10px 15px;
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}
.search-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: var(--card-bg, #fff);
    border-bottom: 1px solid var(--border-color, #eee);
}
.search-result-item:first-child {
    border-radius: 8px 8px 0 0;
}
.search-result-item:last-child {
    border-radius: 0 0 8px 8px;
    border-bottom: none;
}
.search-result-item:only-child {
    border-radius: 8px;
}
.search-result-station {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    width: 180px;
}
.search-result-station img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
}
.search-result-station a {
    color: var(--text-color, #333);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}
.search-result-station a:hover {
    color: #28a745;
}
.search-result-date {
    flex-shrink: 0;
    width: 100px;
    font-size: 0.85rem;
    color: var(--text-muted, #666);
}
.search-result-track {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.search-result-time {
    flex-shrink: 0;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-muted, #666);
}
.search-result-link {
    flex-shrink: 0;
    padding: 6px 12px;
    background: var(--bg-secondary, #f0f0f0);
    color: var(--text-muted, #666);
    text-decoration: none;
    border-radius: 15px;
    font-size: 0.8rem;
    transition: all 0.2s;
}
.search-result-link:hover {
    background: #e0e0e0;
    color: var(--text-color, #333);
}

.search-empty {
    text-align: center;
    padding: 40px 20px;
    background: var(--card-bg, #fff);
    border-radius: 8px;
    color: var(--text-muted, #666);
}
.search-empty i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 20px;
}
.search-empty h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: var(--text-color, #333);
}
.search-empty p {
    margin: 0;
    font-size: 0.95rem;
}

/* Station cards grid */
.playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.playlist-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: var(--card-bg, #fff);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}
.playlist-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    text-decoration: none;
    color: inherit;
}

.playlist-card-logo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-secondary, #f5f5f5);
}
.playlist-card-logo-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: var(--bg-secondary, #f5f5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #999);
    font-size: 1.3rem;
    flex-shrink: 0;
}

.playlist-card-info {
    flex: 1;
    min-width: 0;
}
.playlist-card-name {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.playlist-card-country {
    font-size: 0.85rem;
    color: var(--text-muted, #888);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.playlist-card-country .country-flag-sm {
    width: 16px;
    height: 12px;
    flex-shrink: 0;
}
.playlist-card-track {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted, #666);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.playlist-card-track i {
    color: #28a745;
    flex-shrink: 0;
}
.playlist-card-track span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-card-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    background: var(--bg-secondary, #f0f0f0);
    color: var(--text-muted, #666);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.playlist-card:hover .playlist-card-btn {
    background: #e0e0e0;
    color: var(--text-color, #333);
}

/* Empty state */
.playlists-empty {
    text-align: center;
    padding: 40px 20px;
    background: var(--card-bg, #fff);
    border-radius: 8px;
    color: var(--text-muted, #666);
}
.playlists-empty i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 20px;
}

/* Dark theme */
.dark-theme .playlists-header,
.dark-theme .playlists-tabs,
.dark-theme .playlist-card,
.dark-theme .playlists-empty,
.dark-theme .live-feed-header,
.dark-theme .live-feed-item,
.dark-theme .live-feed-empty,
.dark-theme .search-box,
.dark-theme .search-result-item,
.dark-theme .search-empty {
    background: #2a2a2a;
}
.dark-theme .playlists-tab {
    background: #3a3a3a;
    color: #e0e0e0;
}
.dark-theme .playlists-tab:hover {
    background: #4a4a4a;
    color: #fff;
}
.dark-theme .playlists-tab.active {
    background: #555;
    color: #fff;
}
.dark-theme .playlist-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.dark-theme .live-feed-item {
    border-color: #444;
}
.dark-theme .live-feed-item:hover {
    background: #333;
}
.dark-theme .playlist-card-logo-placeholder,
.dark-theme .live-feed-station .station-icon {
    background: #444;
    color: #888;
}
.dark-theme .playlists-stat {
    background: rgba(40, 167, 69, 0.2);
}
.dark-theme .playlists-stat.blue {
    background: rgba(255, 255, 255, 0.08);
}
.dark-theme .breadcrumb {
    background: #2a2a2a;
}
.dark-theme .breadcrumb-item a {
    color: #e0e0e0;
}
.dark-theme .breadcrumb-item.active {
    color: #a0a0a0;
}
.dark-theme .breadcrumb-item + .breadcrumb-item::before {
    color: #666;
}
.dark-theme .live-feed-refresh {
    background: #444;
    color: #e0e0e0;
}
.dark-theme .live-feed-refresh:hover {
    background: #555;
}
.dark-theme .search-input-wrap {
    background: #333;
}
.dark-theme .search-input-wrap input {
    color: #e0e0e0;
}
.dark-theme .search-input-wrap input::placeholder {
    color: #888;
}
.dark-theme .search-results-info {
    background: rgba(40, 167, 69, 0.2);
}
.dark-theme .search-result-item {
    border-color: #444;
}
.dark-theme .search-result-item:hover {
    background: #333;
}
.dark-theme .search-result-station a {
    color: #e0e0e0;
}
.dark-theme .search-result-station a:hover {
    color: #28a745;
}
.dark-theme .search-result-date,
.dark-theme .search-result-time {
    color: #888;
}
.dark-theme .search-result-track {
    color: #e0e0e0;
}
.dark-theme .search-empty h3 {
    color: #e0e0e0;
}
.dark-theme .search-empty p {
    color: #888;
}
.dark-theme .search-btn {
    background: #28a745;
    color: #fff;
}
.dark-theme .search-btn:hover {
    background: #218838;
    color: #fff;
}
.dark-theme .search-btn:disabled {
    background: #444;
    color: #666;
}
.dark-theme .live-feed-empty {
    color: #888;
}
.dark-theme .live-feed-track {
    color: #e0e0e0;
}
.dark-theme .live-feed-time {
    color: #888;
}
.dark-theme .live-feed-station a {
    color: #e0e0e0;
}
.dark-theme .live-feed-station a:hover {
    color: #28a745;
}
.dark-theme .playlist-card-name {
    color: #e0e0e0;
}
.dark-theme .playlist-card-country {
    color: #888;
}
.dark-theme .playlist-card-track {
    color: #888;
}
.dark-theme .playlist-card-btn {
    background: #3a3a3a;
    color: #aaa;
}
.dark-theme .playlist-card:hover .playlist-card-btn {
    background: #4a4a4a;
    color: #e0e0e0;
}
.dark-theme .playlists-empty {
    color: #888;
}

/* Tablet */
@media (max-width: 768px) {
    .live-feed-links {
        display: none;
    }
    .live-feed-more-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .search-result-station {
        width: 140px;
    }
    .search-result-date {
        display: none;
    }
}

/* Mobile */
@media (max-width: 576px) {
    /* Compact header */
    .playlists-header {
        padding: 12px;
    }
    .playlists-header h1 {
        font-size: 1.2rem;
        gap: 8px;
    }
    .playlists-header h1 i {
        display: none;
    }
    .playlists-header p {
        font-size: 0.85rem;
    }
    .playlists-stats {
        gap: 8px;
        margin-top: 10px;
    }
    .playlists-stat {
        padding: 4px 12px;
        font-size: 0.8rem;
    }

    /* Compact tabs */
    .playlists-tabs {
        flex-direction: column;
        gap: 6px;
        padding: 6px;
    }
    .playlists-tab {
        justify-content: flex-start;
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    /* Station cards grid */
    .playlists-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .playlist-card {
        padding: 10px;
        gap: 10px;
    }
    .playlist-card-logo,
    .playlist-card-logo-placeholder {
        width: 48px;
        height: 48px;
    }
    .playlist-card-logo-placeholder {
        font-size: 1rem;
    }
    .playlist-card-name {
        font-size: 0.95rem;
    }
    .playlist-card-country {
        font-size: 0.8rem;
    }
    .playlist-card-track {
        font-size: 0.8rem;
    }
    .playlist-card-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* Live feed - compact items */
    .live-feed-header {
        padding: 8px 10px;
    }
    .live-feed-title {
        font-size: 0.85rem;
        gap: 6px;
    }
    .live-feed-refresh {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    .live-feed-item {
        gap: 8px;
        padding: 8px 10px;
    }
    .live-feed-track {
        font-size: 0.85rem;
        mask-image: none;
        -webkit-mask-image: none;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Search - compact */
    .search-box {
        flex-direction: column;
        padding: 10px;
    }
    .search-input-wrap {
        padding: 0 12px;
    }
    .search-input-wrap input {
        padding: 10px 0;
        font-size: 0.9rem;
    }
    .search-btn {
        width: 100%;
        justify-content: center;
        padding: 10px;
        font-size: 0.9rem;
    }
    .search-result-item {
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px 10px;
    }
    .search-result-station {
        width: 100%;
    }
    .search-result-station img {
        width: 28px;
        height: 28px;
    }
    .search-result-track {
        width: 100%;
        order: 3;
        font-size: 0.85rem;
    }
    .search-result-time {
        order: 2;
        font-size: 0.8rem;
    }
    .search-result-link {
        order: 4;
        margin-top: 4px;
    }
    .search-empty {
        padding: 30px 15px;
    }
    .search-empty i {
        font-size: 3rem;
    }
    .search-empty h3 {
        font-size: 1rem;
    }
    .search-empty p {
        font-size: 0.85rem;
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    .playlists-header {
        padding: 10px;
    }
    .playlists-header h1 {
        font-size: 1rem;
    }
    .playlists-header p {
        font-size: 0.8rem;
    }
    .playlists-stat {
        padding: 3px 8px;
        font-size: 0.75rem;
    }
    .playlist-card-logo,
    .playlist-card-logo-placeholder {
        width: 40px;
        height: 40px;
    }
    .playlist-card-name {
        font-size: 0.85rem;
    }
    .playlist-card-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
}