*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: #08050F; color: #E8E4DE; min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2A2535; border-radius: 4px; }
.hidden { display: none !important; }
img { user-select: none; -webkit-user-drag: none; }

/* ── Splash ───────────────────────────── */
#splash { position: fixed; inset: 0; z-index: 9999; background: #08050F; display: flex; align-items: center; justify-content: center; transition: opacity 0.5s ease, visibility 0.5s ease; }
#splash.splash-hide { opacity: 0; visibility: hidden; }
.splash-logo { font-size: 80px; font-weight: 800; color: #E6D15B; letter-spacing: 6px; animation: pulse-glow 2s ease-in-out infinite; }
@keyframes pulse-glow {
  0%, 100% { text-shadow: 0 0 20px rgba(230,209,91,0.4), 0 0 60px rgba(230,209,91,0.1); }
  50% { text-shadow: 0 0 40px rgba(230,209,91,0.7), 0 0 100px rgba(230,209,91,0.2); }
}

/* ── Header ───────────────────────────── */
#appHeader { position: sticky; top: 0; z-index: 100; background: #0a0714; padding: 12px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.logo { color: #E6D15B; font-size: 28px; font-weight: 800; letter-spacing: 3px; flex-shrink: 0; user-select: none; }
.search-wrap { flex: 1; position: relative; display: flex; align-items: center; }
.search-icon { position: absolute; left: 12px; width: 16px; height: 16px; color: #5A5550; pointer-events: none; }
#searchInput { width: 100%; background: #151220; border: 1px solid #2A2535; color: #E8E4DE; padding: 10px 12px 10px 36px; border-radius: 12px; font-size: 14px; font-family: inherit; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
#searchInput:focus { border-color: #E6D15B; box-shadow: 0 0 0 3px rgba(230,209,91,0.1); }
#searchInput::placeholder { color: #5A5550; }

/* ── Filters ──────────────────────────── */
#filterBar { padding: 10px 16px 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
#filterBar::-webkit-scrollbar { display: none; }
#categoryChips { display: flex; gap: 8px; white-space: nowrap; }
.chip { background: #151220; color: #8A8480; border: 1px solid transparent; padding: 7px 16px; border-radius: 24px; font-size: 13px; font-family: inherit; cursor: pointer; transition: all 0.2s; white-space: nowrap; flex-shrink: 0; }
.chip.active { background: rgba(230,209,91,0.12); color: #E6D15B; border-color: rgba(230,209,91,0.25); }
.chip:hover { background: #1E1A2A; }
.chip:active { transform: scale(0.96); }

/* ── Sort ─────────────────────────────── */
#sortBar { padding: 6px 16px 2px; display: flex; justify-content: space-between; align-items: center; }
#sortSelect { background: #151220; color: #8A8480; border: 1px solid #2A2535; padding: 6px 10px; border-radius: 8px; font-size: 12px; font-family: inherit; cursor: pointer; outline: none; }
#songCount { color: #5A5550; font-size: 12px; }

/* ── Main Content ─────────────────────── */
#mainContent { flex: 1; padding: 4px 8px 100px; }
#songList { display: flex; flex-direction: column; gap: 1px; }

/* ── Song Card ────────────────────────── */
.song-card { display: flex; align-items: center; padding: 10px 12px; border-radius: 12px; cursor: pointer; transition: background 0.15s; gap: 12px; }
.song-card:hover { background: #15112080; }
.song-card:active { background: #1A1725; }
.song-card.playing { background: rgba(230,209,91,0.06); border-left: 3px solid #E6D15B; padding-left: 9px; }
.song-cover { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: linear-gradient(135deg, #1A1725 0%, #12101A 100%); }
.song-info { flex: 1; min-width: 0; }
.song-title { font-size: 14px; font-weight: 600; color: #E8E4DE; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; line-height: 1.3; }
.song-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.btn-action { background: none; border: none; padding: 6px; cursor: pointer; color: #8A8480; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.2s; text-decoration: none; }
.btn-action svg { width: 20px; height: 20px; fill: currentColor; }
.btn-action:hover { background: rgba(255,255,255,0.1); color: #E8E4DE; }
.btn-action.btn-like.liked { color: #ff3b3b; }
.btn-action.btn-like.liked svg { animation: pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }
.song-artist { font-size: 12px; color: #8A8480; display: block; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-meta { font-size: 11px; color: #5A5550; margin-top: 3px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.song-badge { display: inline-flex; align-items: center; font-size: 9px; background: rgba(230,209,91,0.12); color: #E6D15B; padding: 2px 6px; border-radius: 4px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.song-badge.ru-badge { background: rgba(91, 164, 230, 0.15); color: #7cbcf0; }
.song-badge.play-count-badge { background: rgba(255, 255, 255, 0.08); color: #A09A95; font-size: 9px; text-transform: none; letter-spacing: 0; }
.song-end { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; gap: 2px; margin-left: auto; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── Load More ────────────────────────── */
#loadMoreBtn { display: block; margin: 20px auto; padding: 12px 36px; background: #151220; color: #E6D15B; border: 1px solid rgba(230,209,91,0.15); border-radius: 12px; font-size: 14px; font-family: inherit; cursor: pointer; transition: all 0.2s; }
#loadMoreBtn:hover { background: #1E1A2A; border-color: rgba(230,209,91,0.35); }

/* ── Spinner ──────────────────────────── */
.spinner { width: 32px; height: 32px; border: 3px solid #2A2535; border-top-color: #E6D15B; border-radius: 50%; animation: spin 0.7s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty State ──────────────────────── */
#emptyState { text-align: center; padding: 60px 20px; color: #5A5550; font-size: 15px; }
.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }

/* ── Playlists View ───────────────────── */
#playlistView, #playlistDetailView { padding: 0 12px 120px; }
.playlist-sub-tabs { display: flex; gap: 8px; padding: 12px 0 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.playlist-sub-tabs::-webkit-scrollbar { display: none; }
.pl-tab { background: rgba(255,255,255,0.06); border: none; color: #8A8480; font-size: 13px; font-weight: 600; font-family: inherit; padding: 7px 16px; border-radius: 20px; cursor: pointer; white-space: nowrap; transition: all 0.18s; }
.pl-tab.active { background: #E6D15B; color: #08050F; }
.pl-tab:hover:not(.active) { background: rgba(255,255,255,0.1); color: #E8E4DE; }
.playlist-sub-section { display: none; }
.playlist-sub-section.visible { display: block; }
.playlists-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding-bottom: 8px; }
@media (min-width: 600px) { .playlists-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .playlists-grid { grid-template-columns: repeat(4, 1fr); } }
.playlist-card { background: #12101A; border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform 0.2s, background 0.2s; position: relative; }
.playlist-card:hover, .playlist-card:active { transform: scale(0.97); background: #1A1725; }
.playlist-card-cover-wrap { width: 100%; aspect-ratio: 1; overflow: hidden; position: relative; max-height: 200px; }
.playlist-card-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.playlist-card-cover-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #1E1A2E 0%, #12101A 100%); display: flex; align-items: center; justify-content: center; font-size: 36px; aspect-ratio: 1; }
.playlist-card-body { padding: 8px 10px 10px; }
.playlist-card-name { font-size: 13px; font-weight: 700; color: #E8E4DE; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playlist-card-meta { font-size: 11px; color: #5A5550; margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.playlist-card-author { color: #8A8480; }
.playlist-visibility-badge { font-size: 9px; padding: 1px 5px; border-radius: 4px; font-weight: 700; }
.playlist-visibility-badge.public { background: rgba(76, 175, 80, 0.15); color: #66bb6a; }
.playlist-visibility-badge.private { background: rgba(255,255,255,0.07); color: #5A5550; }
.playlist-card-add-btn { display: flex; align-items: center; gap: 4px; background: rgba(230,209,91,0.12); border: none; color: #E6D15B; font-size: 10px; font-weight: 700; font-family: inherit; padding: 4px 10px; border-radius: 20px; cursor: pointer; margin-top: 6px; transition: background 0.18s; white-space: nowrap; }
.playlist-card-add-btn:hover { background: rgba(230,209,91,0.22); }
.playlist-card-add-btn.added { background: rgba(76,175,80,0.15); color: #66bb6a; cursor: default; }

/* ── Playlist Detail ──────────────────── */
.playlist-detail-header { padding: 8px 0 4px; }
.playlist-back-btn { background: none; border: none; color: #E6D15B; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 8px 4px; font-family: inherit; }
.playlist-back-btn svg { width: 20px; height: 20px; }
.playlist-detail-hero { display: flex; gap: 16px; align-items: flex-start; padding: 8px 0 20px; }
.playlist-detail-cover { width: 130px; height: 130px; border-radius: 14px; object-fit: cover; flex-shrink: 0; background: linear-gradient(135deg, #1A1725, #12101A); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.playlist-detail-cover-placeholder { width: 130px; height: 130px; border-radius: 14px; flex-shrink: 0; background: linear-gradient(135deg, #1E1A2E, #12101A); display: flex; align-items: center; justify-content: center; font-size: 48px; }
.playlist-detail-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.playlist-detail-name { font-size: 20px; font-weight: 800; color: #E8E4DE; line-height: 1.25; }
.playlist-detail-meta { font-size: 13px; color: #8A8480; }
.playlist-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.btn-play-playlist { background: #E6D15B; color: #08050F; border: none; border-radius: 50px; padding: 10px 20px; font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all 0.2s; }
.btn-play-playlist:hover { background: #f0dd6b; transform: scale(1.03); }
.btn-play-playlist svg { width: 16px; height: 16px; }
#playlistDetailSongs { display: flex; flex-direction: column; gap: 0; }
#playlistsEmpty, #playlistDetailSongs .pl-empty { text-align: center; padding: 40px 20px; color: #5A5550; font-size: 14px; }

/* ── Playlist Modifications ────────────── */
.playlist-mine-actions { padding: 8px 4px 12px; }
.btn-create-playlist { background: rgba(230, 209, 91, 0.12); color: #E6D15B; border: 1px dashed rgba(230, 209, 91, 0.3); padding: 10px 20px; border-radius: 12px; font-weight: 700; cursor: pointer; transition: all 0.2s; font-family: inherit; font-size: 13px; width: 100%; text-align: center; }
.btn-create-playlist:hover { background: rgba(230, 209, 91, 0.2); border-color: rgba(230, 209, 91, 0.5); }
.playlist-group-section { margin-bottom: 24px; }
.playlist-visibility-badge.subscription { background: rgba(230, 209, 91, 0.15); color: #e6cb5b; }

.btn-playlist-action { background: rgba(255, 255, 255, 0.06); color: #E8E4DE; border: none; border-radius: 50px; padding: 10px 18px; font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all 0.2s; }
.btn-playlist-action:hover { background: rgba(255, 255, 255, 0.12); }
.btn-playlist-action.danger { background: rgba(255, 59, 59, 0.12); color: #ff5252; }
.btn-playlist-action.danger:hover { background: rgba(255, 59, 59, 0.22); }
.btn-playlist-action.active { background: rgba(230, 209, 91, 0.15); color: #E6D15B; }

/* Playlist Add Modal */
.playlist-add-content { max-width: 400px; padding: 24px 20px; }
.playlist-add-create-row { display: flex; gap: 8px; margin: 16px 0; }
.playlist-add-create-row input { flex: 1; background: #12101A; border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 8px 12px; color: #E8E4DE; font-family: inherit; font-size: 13px; outline: none; }
.playlist-add-create-row input:focus { border-color: rgba(230, 209, 91, 0.5); }
.playlist-add-create-row button { background: #E6D15B; color: #08050F; border: none; border-radius: 10px; padding: 8px 16px; font-weight: 700; cursor: pointer; font-family: inherit; font-size: 13px; }
.playlist-add-create-row button:hover { background: #f0dd6b; }
.playlist-add-list { display: flex; flex-direction: column; gap: 8px; max-height: 250px; overflow-y: auto; padding-right: 4px; }
.playlist-add-item { display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,0.03); padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: background 0.15s; }
.playlist-add-item:hover { background: rgba(255,255,255,0.07); }
.playlist-add-item-name { font-size: 13px; font-weight: 600; color: #E8E4DE; }
.playlist-add-item-check { width: 20px; height: 20px; border-radius: 6px; border: 2px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; color: transparent; transition: all 0.15s; }
.playlist-add-item.active .playlist-add-item-check { border-color: #E6D15B; background: #E6D15B; color: #08050F; }
.playlist-add-item-check svg { width: 12px; height: 12px; }

/* Add to playlist button on track */
.song-actions .btn-add-playlist { color: #8A8480; }
.song-actions .btn-add-playlist:hover { color: #E6D15B; }

.playlist-add-done-btn {
  background: #E6D15B;
  color: #08050F;
  border: none;
  border-radius: 12px;
  padding: 12px;
  width: 100%;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  margin-top: 16px;
  transition: background 0.2s;
}
.playlist-add-done-btn:hover {
  background: #f0dd6b;
}

/* ── Player Bar ───────────────────────── */
#playerBar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; background: #0a0812; border-top: 1px solid rgba(230,209,91,0.08); transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.16,1,0.3,1); padding-bottom: env(safe-area-inset-bottom, 0px); }
#playerBar.visible { transform: translateY(0); }
#progressBar { position: absolute; top: -3px; left: 0; right: 0; width: 100%; height: 6px; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; margin: 0; z-index: 2; outline: none; }
#progressBar::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(to right, #E6D15B var(--progress, 0%), #2A2535 var(--progress, 0%)); border-radius: 2px; }
#progressBar::-moz-range-track { height: 3px; background: #2A2535; border-radius: 2px; }
#progressBar::-moz-range-progress { height: 3px; background: #E6D15B; border-radius: 2px; }
#progressBar::-webkit-slider-thumb { -webkit-appearance: none; width: 0; height: 0; }
#progressBar::-moz-range-thumb { width: 0; height: 0; border: none; }
.player-main { display: flex; align-items: center; padding: 8px 12px; gap: 10px; }
#playerCover { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: linear-gradient(135deg, #1A1725, #12101A); cursor: pointer; }
.player-info { flex: 1; min-width: 0; cursor: pointer; }
#playerTitle { font-size: 13px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#playerArtist { font-size: 11px; color: #8A8480; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-time { display: none; font-size: 11px; color: #5A5550; gap: 4px; flex-shrink: 0; white-space: nowrap; }
.player-controls { display: flex; align-items: center; justify-content: center; gap: 4px; flex-shrink: 0; }
.player-btn { background: none; border: none; color: #E8E4DE; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 50%; transition: background 0.15s; flex-shrink: 0; }
.player-btn:hover { background: rgba(255,255,255,0.08); }
.player-btn svg { width: 18px; height: 18px; }
.player-btn span { display: flex; align-items: center; justify-content: center; }
.btn-play { width: 40px; height: 40px; background: rgba(230,209,91,0.12); color: #E6D15B; }
.btn-play:hover { background: rgba(230,209,91,0.22); }
.btn-play svg { width: 20px; height: 20px; }
#btnOpenLyrics { display: none; }
#btnShuffle, #btnRepeat { display: none; }
#btnPrev { }

/* ── Lyrics Panel ─────────────────────── */
#lyricsPanel { 
    position: fixed; 
    inset: 0; 
    z-index: 2000; 
    background: #06040C;
    transform: translateY(100%); 
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1); 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
}
#lyricsPanel.visible { transform: translateY(0); }

#lyricsBg { 
    position: absolute; 
    inset: 0; 
    background-size: cover; 
    background-position: center; 
    opacity: 0.06; 
    pointer-events: none; 
    z-index: 0; 
    transform: translateZ(0);
}

.lyrics-header { padding: 16px 16px 8px; display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.lyrics-header-right { display: flex; gap: 8px; }
.lyrics-header-right .icon-btn.active { color: #E6D15B; }
#lyricsCoverFull {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 20px;
}
#lyricsCoverFull img {
    max-width: 100%;
    max-height: 50vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    object-fit: contain;
}
.lyrics-info { text-align: center; padding: 0 24px 16px; position: relative; z-index: 2; }
#lyricsTitle { font-size: 20px; font-weight: 700; line-height: 1.3; }
#lyricsArtist { font-size: 14px; color: #8A8480; margin-top: 4px; }

#lyricsContent { 
    flex: 1; 
    padding: 20px 14px 80px; 
    overflow-y: auto; 
    text-align: center; 
    position: relative; 
    z-index: 1; 
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
    transform: translate3d(0,0,0);
}

.lyrics-scroll-wrap {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
}

.lyrics-fade-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, #06040C 0%, rgba(6, 4, 12, 0) 100%);
    pointer-events: none;
    z-index: 2;
    will-change: transform;
    transform: translate3d(0,0,0);
}

.lyrics-fade-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, #06040C 0%, rgba(6, 4, 12, 0) 100%);
    pointer-events: none;
    z-index: 2;
    will-change: transform;
    transform: translate3d(0,0,0);
}

.lyric-line { 
    padding: 10px 10px; 
    font-size: 18px; 
    font-weight: 600; 
    color: rgba(232, 228, 222, 0.25); 
    line-height: 1.55; 
    cursor: pointer; 
    border-radius: 10px;
    transition: color 0.25s ease;
    word-break: break-word;
    margin: 2px 0;
}
.lyric-line:hover { color: rgba(232, 228, 222, 0.55); }
.lyric-line.active { 
    color: #E6D15B; 
}
.lyric-line.past { 
    color: rgba(232, 228, 222, 0.42); 
}
.lyrics-no-lyrics { color: #5A5550; font-size: 16px; padding: 40px; }
.lyrics-controls { padding: 8px 20px 4px; display: flex; align-items: center; gap: 10px; position: relative; z-index: 2; }
.lyrics-time { font-size: 11px; color: #5A5550; min-width: 32px; text-align: center; }
#lyricsProgress { flex: 1; -webkit-appearance: none; appearance: none; height: 3px; background: transparent; cursor: pointer; outline: none; }
#lyricsProgress::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(to right, #E6D15B var(--progress, 0%), #2A2535 var(--progress, 0%)); border-radius: 2px; }
#lyricsProgress::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #E6D15B; margin-top: -4.5px; }
#lyricsProgress::-moz-range-track { height: 3px; background: #2A2535; border-radius: 2px; }
#lyricsProgress::-moz-range-progress { height: 3px; background: #E6D15B; border-radius: 2px; }
#lyricsProgress::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #E6D15B; border: none; }
.lyrics-player-controls { 
    padding: 16px 24px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    display: flex; 
    align-items: center; 
    justify-content: center;
    gap: 20px;
    position: relative; 
    z-index: 2;
    background: rgba(6, 4, 12, 0.6);
    border-top: 1px solid rgba(255,255,255,0.04);
}

/* кнопки prev/next */
.lyr-ctrl-btn {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: rgba(232, 228, 222, 0.8);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.lyr-ctrl-btn:active { background: rgba(255,255,255,0.12); color: #fff; }
.lyr-ctrl-btn svg { width: 20px; height: 20px; }

/* кнопка play/pause — большая по центру */
.lyr-ctrl-play {
    width: 52px;
    height: 52px;
    background: #E6D15B;
    color: #08050F;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(230, 209, 91, 0.35);
}
.lyr-ctrl-play:active { background: #d4c04e; box-shadow: 0 2px 10px rgba(230, 209, 91, 0.2); }
.lyr-ctrl-play svg { width: 24px; height: 24px; }
.lyr-ctrl-play span { display: flex; align-items: center; justify-content: center; }

/* оставляем icon-btn для кнопки закрыть и др. */
.icon-btn { background: none; border: none; color: #E8E4DE; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 50%; transition: background 0.15s; }
.icon-btn:hover { background: rgba(255,255,255,0.08); }
.icon-btn svg { width: 20px; height: 20px; }

/* ── Desktop ──────────────────────────── */
@media (min-width: 768px) {
  #appHeader { padding: 14px 24px; }
  #filterBar { padding: 10px 24px 4px; }
  #sortBar { padding: 6px 24px 2px; }
  #mainContent { padding: 4px 16px 100px; }
  #lyricsContent { padding: 20px 32px 80px; }
  #songList { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 4px; }
  .player-main { max-width: 900px; margin: 0 auto; padding: 8px 20px; }
  .player-time { display: flex; }
  #btnPrev { display: flex; }
  #progressBar::-webkit-slider-thumb { width: 12px; height: 12px; border-radius: 50%; background: #E6D15B; margin-top: -4.5px; }
  #progressBar::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #E6D15B; border: none; }
}
@media (min-width: 1200px) {
  #songList { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }
}

/* ── Auth & Profile Styles ─────────────────────── */
.header-profile-btn { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.05); border: none; color: #E8E4DE; cursor: pointer; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; margin-left: 10px; }
.header-profile-btn img { width: 100%; height: 100%; object-fit: cover; }
.header-profile-btn svg { width: 20px; height: 20px; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(8, 5, 15, 0.85); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 1; transition: opacity 0.3s; }
.modal-overlay.hidden { opacity: 0; pointer-events: none; }
.modal-content { background: #12101A; border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; width: 100%; max-width: 360px; padding: 24px; position: relative; transform: translateY(0); transition: transform 0.3s; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.modal-overlay.hidden .modal-content { transform: translateY(20px); }
.modal-close { position: absolute; top: 12px; right: 12px; font-size: 24px; color: #8A8480; width: 32px; height: 32px; background: none; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }

.modal-content h2 { margin: 0 0 20px 0; font-size: 20px; font-weight: 700; color: #E8E4DE; text-align: center; }
.auth-input { width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 14px 16px; color: #E8E4DE; font-size: 15px; margin-bottom: 12px; outline: none; transition: border-color 0.2s; box-sizing: border-box; }
.auth-input:focus { border-color: #E6D15B; }
.auth-btn { width: 100%; background: #E6D15B; color: #08050F; border: none; border-radius: 12px; padding: 14px; font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 8px; transition: background 0.2s; box-sizing: border-box; }
.auth-btn:hover { background: #d4c04e; }
.auth-btn.btn-danger { background: rgba(255, 60, 60, 0.15); color: #ff5555; margin-top: 24px; }
.auth-error { color: #ff5555; font-size: 13px; text-align: center; margin-bottom: 12px; padding: 8px; background: rgba(255, 60, 60, 0.1); border-radius: 8px; }

.auth-switch { text-align: center; margin-top: 20px; font-size: 14px; color: #8A8480; }
.auth-switch button { background: none; border: none; color: #E6D15B; font-weight: 600; cursor: pointer; padding: 0 4px; font-size: 14px; }

.profile-header-ui { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.profile-avatar, .profile-avatar-placeholder { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; color: #8A8480; flex-shrink: 0; }
.profile-avatar-placeholder svg { width: 32px; height: 32px; }
.profile-info { flex: 1; min-width: 0; }
.profile-info h2 { margin: 0 0 4px 0; text-align: left; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-info span { color: #8A8480; font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-stats { display: flex; background: rgba(255,255,255,0.03); border-radius: 12px; padding: 16px; justify-content: center; }
.stat-box { text-align: center; }
.stat-value { display: block; font-size: 24px; font-weight: 700; color: #E6D15B; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: #8A8480; }


/* Detailed Stats (Wrapped) */
.stats-wrapped-content {
  background-color: #121212;
  border: 1px solid rgba(255, 204, 0, 0.2);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.stats-wrapped-header {
  background: linear-gradient(135deg, rgba(255,204,0,0.15) 0%, rgba(20,20,20,1) 100%);
  padding: 24px;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.stats-wrapped-title {
  color: #ffcc00;
  font-size: 1.2rem;
  margin: 0 0 8px 0;
}

.stats-wrapped-subtitle {
  color: #aaa;
  font-size: 0.9rem;
  margin: 0;
  max-width: 80%;
  line-height: 1.4;
}

.stats-wrapped-logo {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(255, 204, 0, 0.3);
  font-family: serif;
  letter-spacing: -2px;
}

.stats-cards-grid {
  display: flex;
  gap: 12px;
  padding: 20px;
}

.stats-card {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stats-card-label {
  font-size: 0.8rem;
  color: #aaa;
  margin-bottom: 8px;
}

.stats-card-value {
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff;
}

.stats-activity-box {
  margin: 0 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 20px;
}

.stats-activity-title {
  font-size: 1rem;
  margin: 0 0 20px 0;
  color: #fff;
}

.stats-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 180px;
  padding-top: 20px;
}

.stats-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 12%;
  height: 100%;
  justify-content: flex-end;
}

.stats-bar-label-top {
  font-size: 0.75rem;
  color: #fff;
  font-weight: bold;
  margin-bottom: 6px;
  text-align: center;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
  animation-delay: 0.8s;
}

.stats-bar {
  width: 100%;
  max-width: 24px;
  background: linear-gradient(180deg, #ffcc00 0%, rgba(255,204,0,0.3) 100%);
  border-radius: 4px 4px 0 0;
  height: 0%;
  transition: height 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stats-bar-label-bottom {
  font-size: 0.75rem;
  color: #888;
  margin-top: 8px;
}

.stats-streak-box {
  margin: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stats-streak-icon {
  width: 24px;
  height: 24px;
  color: #ffcc00;
}

.stats-streak-info {
  display: flex;
  flex-direction: column;
}

.stats-streak-label {
  font-size: 0.8rem;
  color: #aaa;
}

.stats-streak-value {
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
  margin-top: 4px;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@media (max-width: 480px) {
  .stats-wrapped-header { padding: 16px; }
  .stats-wrapped-logo { font-size: 2rem; }
  .stats-cards-grid { padding: 16px; gap: 8px; }
  .stats-card { padding: 12px 8px; }
  .stats-card-value { font-size: 1.1rem; }
  .stats-activity-box { margin: 0 16px; padding: 16px; }
  .stats-streak-box { margin: 16px; }
}

/* Fix for profile stats */
.profile-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 10px 0 15px 0;
  width: 100%;
}
.profile-stats .stat-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.03);
  padding: 10px;
  border-radius: 8px;
}
.profile-stats .stat-value {
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff;
  margin-bottom: 4px;
}
.profile-stats .stat-label {
  font-size: 0.7rem;
  color: #aaa;
  text-align: center;
}

/* ── Track Info Panel (Сведения) ──────── */
#lyricsInfoFull {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 16px 20px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  overflow-y: auto;
  box-sizing: border-box;
  z-index: 2;
  position: relative;
}

.info-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 55vh;
  overflow-y: auto;
  scrollbar-width: thin;
}

.info-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
  text-align: left;
}

.info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.38);
}

.info-value {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  line-height: 1.4;
  word-break: break-word;
}

