/* ОСНОВНОЙ ФОН */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #281D55; /* Тёмно-сиреневый */
    color: #E1E1E1;
}

/* ШАПКА — ТЕПЕРЬ ФИКСИРОВАННАЯ */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: #111;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    z-index: 1000;
    box-sizing: border-box;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
}

.nav-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #dbe6ff;
    font-size: 18px;
}

.nav-link.active {
    font-weight: bold;
    color: #ffffff;
}

.username-btn {
    color: #fffff0;
    font-size: 18px;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    transition: 0.25s ease;
}

.username-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

/* ЛОГАУТ (если где-то используется) */
.logout-btn {
    display: inline-block;
    padding: 10px 22px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 0.5px;
    backdrop-filter: blur(6px);
    transition: 0.25s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

/* ФИКСИРОВАННЫЙ SIDEBAR (НОВЫЙ LAYOUT) */
.sidebar {
    position: fixed;
    top: 80px;
    bottom: 80px;
    left: 0;
    width: 260px;
    background: #111;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden; /* ← sidebar больше НЕ скроллится */
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.sidebar h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 22px;
    color: #E1E1E1;
    border-bottom: 2px solid rgba(31, 59, 112, 0.2);
    padding-bottom: 8px;
}

/* ССЫЛКИ ЖАНРОВ */
.cat-link {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    color: #E1E1E1;
    border-radius: 6px;
    transition: 0.2s;
}

.cat-link:hover {
    background: rgba(31, 59, 112, 0.08);
}

.cat-link.active {
    background: rgba(0, 0, 225, 0.25);
    font-weight: bold;
    color: #FAFEF0;
}

/* ПРОКРУЧИВАЕМАЯ ЦЕНТРАЛЬНАЯ ОБЛАСТЬ */
.content-area {
    position: fixed;
    top: 80px;
    bottom: 80px;
    left: 260px;
    right: 0;
    overflow-y: auto;
    padding: 30px;
    box-sizing: border-box;
}

/* ЗАГОЛОВКИ СТРАНИЦ */
.page-title,
.content-area h1 {
    margin: 0 0 25px;
    font-size: 32px;
    font-weight: 600;
}

/* ЖАНРЫ (если есть отдельная страница всех жанров) */
.genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.genre-card {
    display: block;
    padding: 30px;
    background: #f5f5f5;
    border-radius: 12px;
    text-align: center;
    font-size: 20px;
    color: #333;
    text-decoration: none;
    transition: 0.2s;
}

.genre-card:hover {
    background: #e8e8e8;
    transform: translateY(-3px);
}

.genres-scroll {
    overflow-y: auto;
    height: calc(100% - 220px); 
    padding-right: 10px;
}

/* СЕТКА АЛЬБОМОВ (если используется grid) */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 25px;
}

/* АЛЬБОМЫ В ГОРИЗОНТАЛЬНОЙ ЛЕНТЕ (genre.php) */
.album-scroll-row {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 0;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.album-scroll-row::-webkit-scrollbar {
    display: none;
}

.album-card {
    flex: 0 0 auto;
    width: 160px;
    text-align: center;
    text-decoration: none;
    color: #fff;
    transition: transform 0.35s ease, opacity 0.35s ease;
    opacity: 0;
    transform: translateX(40px);
}

.album-card.visible {
    opacity: 1;
    transform: translateX(0);
}

.album-card.active {
    transform: translateY(-10px) scale(1.05);
}

/* ОБЛОЖКА АЛЬБОМА */
.album-cover {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.album-title {
    margin-top: 8px;
    font-size: 16px;
}

/* ИНФО ОБ АЛЬБОМЕ (если нужно) */
.album-info {
    padding: 4px 2px 0;
}

.album-page-title {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    color: #E1E1E1;
    border-radius: 6px;
    transition: 0.2s;
}

.album-page-title:hover {
    background: rgba(150, 80, 225, 0.12);
}

/* ТРЕКИ В АЛЬБОМЕ */
.track {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #181818;
    margin-bottom: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.track:hover {
    background: #222;
}

.track-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    transition: transform 0.3s ease;
}

/* Мини-обложка трека (если есть) */
.track-cover {
    width: 52px !important;
    height: 52px !important;
    object-fit: cover !important;
    border-radius: 6px;
    flex-shrink: 0;
}

/* Активный трек */
.track.active {
    background: rgba(255, 255, 255, 0.15);
    border-left: 4px solid #4da3ff;
    padding-left: 10px;
    transition: 0.2s;
}

.track.active p {
    color: #4da3ff;
}

/* АНИМАЦИЯ CD */
.track-icon {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    width: 20px;
    height: 14px;
    margin-right: 8px;
}

.bar {
    width: 4px;
    background: #1db954; /* Spotify green */
    display: inline-block;
    animation: eqBars 0.6s infinite ease-in-out;
}

/* Разные задержки для разных столбиков */
.bar1 { animation-delay: 0s; }
.bar2 { animation-delay: 0.2s; }
.bar3 { animation-delay: 0.4s; }

@keyframes eqBars {
    0%   { height: 3px; }
    50%  { height: 12px; }
    100% { height: 3px; }
}

/* ПЛЕЕР ВНИЗУ */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: #111;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
    z-index: 9999;
    box-sizing: border-box;
}

.player-cover img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.player-info {
    flex: 1;
    margin-left: 15px;
    font-size: 16px;
}

/* ПРОГРЕСС-БАР */
.player-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 420px;
    margin: 0 20px;
}

#progressBar {
    flex: 1;
    appearance: none;
    height: 4px;
    background: #444;
    border-radius: 2px;
    cursor: pointer;
}

#progressBar::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background: #1ED760;
    border-radius: 50%;
    cursor: pointer;
}

#currentTime,
#duration {
    font-size: 14px;
    color: #ccc;
    width: 40px;
    text-align: center;
}

/* КНОПКИ ПЛЕЕРА */
.player-controls {
    display: flex;
    gap: 10px;
}

.player-btn {
    background: #222;
    border: none;
    color: #fff;
    padding: 10px 14px;
    font-size: 18px;
    border-radius: 6px;
    cursor: pointer;
}

.player-btn:hover {
    background: #333;
}

.player-btn.play {
    background: #1ED760;
    color: #000;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background 0.15s ease;
}

.player-btn.play:hover {
    transform: scale(1.08);
    background: #1fdf64;
}

.track {
    position: relative;
}

/* Лайк всегда поверх кликабельного блока */
.like {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.5);
    transition: background .2s, color .2s, transform .15s;
}

.like:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}

.like.liked {
    background: rgba(29,185,84,.15);
    color: #1db954;
    transform: scale(1.2);
}

/* Счётчик лайков */
.like-count {
    margin-left: 5px;
    font-size: 14px;
    opacity: 0.8;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    color: #ddd; /* ← добавляем светлый цвет */
}

.like-btn {
    background: rgba(255, 255, 255, 0.05); /* спокойный, мягкий фон */
    border: none;
    padding: 2px 6px;
    border-radius: 6px;
    cursor: pointer;
}

.like-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.like-count {
    background: transparent;
}

/* Чтобы клики по лайку не перехватывал .track */
.track * {
    pointer-events: none;
}

/* Но включаем клики для нужных элементов */
.track .like,
.track .like-count,
.track p,
.track .track-icon {
    pointer-events: auto;
}

