:root {
    --bg-dark: #0f0f13;
    --accent: #ffb400;
    --accent-glow: rgba(255, 180, 0, 0.4);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --glass-bg: rgba(20, 20, 25, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(10px);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --sidebar-width: 260px;
    --player-height: 95px;
    --mobile-player-height: 70px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; -webkit-tap-highlight-color: transparent; }

body {
    background: #121212;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(30, 30, 50, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(40, 25, 10, 0.4) 0%, transparent 40%);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.app-container { display: flex; flex: 1; height: calc(100vh - var(--player-height)); position: relative; z-index: 1; }

.sidebar {
    width: var(--sidebar-width);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--glass-border);
    padding: 30px 24px;
    display: flex; flex-direction: column; gap: 15px;
    z-index: 100; transition: transform 0.3s ease;
}

.logo { margin-bottom: 30px; display: flex; align-items: center; gap: 12px; }

.nav-item {
    color: var(--text-secondary); font-size: 15px; font-weight: 500;
    padding: 12px 16px; border-radius: 12px; display: flex; align-items: center; gap: 16px;
    transition: all 0.2s ease; cursor: pointer; border-left: 3px solid transparent;
}
.nav-item:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }

.nav-item.active { 
    color: #000 !important; 
    background: var(--accent) !important; 
    font-weight: 700; 
    box-shadow: 0 4px 15px var(--accent-glow);
    border-left: 3px solid transparent; 
}
.nav-item.active i { color: #000; }

.sidebar-spacer { flex-grow: 1; }
.sidebar-footer { border-top: 1px solid var(--glass-border); padding-top: 15px; display: flex; flex-direction: column; gap: 5px; }

.main-content {
    flex: 1; overflow-y: auto; padding: 40px 50px; position: relative;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.2) transparent;
    padding-bottom: 20px;
}

.header { margin-bottom: 40px; display: flex; justify-content: space-between; align-items: center; }
.page-title { font-size: 42px; font-weight: 800; letter-spacing: -1px; }

.glass-search {
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px; border-radius: 20px; color: white; outline: none; width: 250px;
}
.search-wrapper { position: relative; }
.search-wrapper i { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,0.3); }

.track-list { display: flex; flex-direction: column; gap: 8px; }
.track-row {
    display: flex; align-items: center; padding: 12px 20px; border-radius: 12px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02); border: 1px solid transparent;
    transition: background-color 0.2s, transform 0.2s; 
}
.track-row:hover { background: rgba(255, 255, 255, 0.07); transform: translateY(-1px); }
.track-row.playing { background: rgba(255, 180, 0, 0.15); border-color: rgba(255, 180, 0, 0.3); }

.track-play-btn {
    color: var(--text-primary); margin-right: 20px; cursor: pointer; width: 32px; height: 32px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.1); flex-shrink: 0;
    overflow: hidden;
}
.track-play-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.track-row:hover .track-play-btn { background: var(--text-primary); color: #000; }
.track-row.playing .track-play-btn { background: var(--accent); color: #000; }

.track-info { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.track-title { color: var(--text-primary); font-size: 15px; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-artist { font-size: 13px; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.track-actions { display: flex; align-items: center; gap: 10px; margin-left: 15px; }
.action-btn {
    background: transparent; width: 32px; height: 32px; border-radius: 8px; border: none;
    color: var(--text-secondary); cursor: pointer; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
}
.action-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.1); }
.action-btn.active { color: #ff4757; }

.upload-container {
    max-width: 700px; background: rgba(30, 30, 40, 0.6); 
    padding: 40px; border-radius: 24px; border: 1px solid var(--glass-border);
}
.form-group { margin-bottom: 24px; }
.form-label { display: block; margin-bottom: 10px; font-weight: 600; font-size: 14px; color: var(--text-secondary); }
.form-input {
    width: 100%; padding: 16px; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.1);
    color: white; border-radius: 12px; outline: none; font-size: 15px;
}
.form-input:focus { border-color: var(--accent); background: rgba(0, 0, 0, 0.5); }
.btn-primary {
    background: var(--accent); color: black; border: none; padding: 16px 40px; border-radius: 16px;
    font-weight: 700; font-size: 14px; cursor: pointer; width: 100%;
    text-transform: uppercase;
}

.player-bar {
    height: var(--player-height); background: #18181b; 
    border-top: 1px solid var(--glass-border); padding: 0 30px;
    display: flex; align-items: center; justify-content: space-between; z-index: 200;
}
.player-left { width: 30%; display: flex; align-items: center; overflow: hidden; }

.current-track-img {
    width: 64px; height: 64px; background: #222;
    margin-right: 18px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    color: #666; flex-shrink: 0;
    overflow: hidden;
}
.current-track-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.current-track-info { min-width: 0; overflow: hidden; }
.current-track-info h4 {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 4px; font-size: 14px;
}
.current-track-info p {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-size: 12px; color: #888;
}

.player-center { width: 40%; display: flex; flex-direction: column; align-items: center; }
.player-controls { display: flex; align-items: center; gap: 24px; margin-bottom: 10px; }
.control-btn { background: none; border: none; color: var(--text-secondary); font-size: 18px; cursor: pointer; }
.control-btn:hover { color: white; }
.play-pause-btn {
    width: 48px; height: 48px; border-radius: 50%; background: var(--text-primary); color: black;
    display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; border: none;
}
.play-pause-btn:hover { transform: scale(1.05); background: var(--accent); }

.progress-container { width: 100%; display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-secondary); }
.progress-bar-wrapper { flex: 1; height: 4px; background: rgba(255,255,255,0.1); border-radius: 10px; cursor: pointer; position: relative; }
.progress-bar-fill { height: 100%; background: var(--accent); border-radius: 10px; width: 0%; }

.player-right { width: 30%; display: flex; justify-content: flex-end; align-items: center; }

.music-notification {
    position: fixed; bottom: 120px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--accent); color: #000;
    padding: 10px 25px; border-radius: 50px; font-weight: 700; opacity: 0; pointer-events: none;
    transition: all 0.3s; z-index: 500; font-size: 14px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.music-notification.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.music-notification.error { background: #ff4757; color: white; }
.music-notification.success { background: #2ecc71; color: black; }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 1000; align-items: center; justify-content: center; }
.modal.show { display: flex; }
.modal-content { background: #1a1a20; padding: 30px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); width: 90%; max-width: 400px; }
.modal-header { display: flex; justify-content: space-between; margin-bottom: 20px; }
.modal-close { background: none; border: none; color: white; font-size: 24px; cursor: pointer; }

.view-section { display: none; animation: fadeIn 0.3s ease-out; }
.view-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.menu-toggle { display: none; background: none; border: none; color: white; font-size: 24px; cursor: pointer; }

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.filters-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 0;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    font-weight: 600;
}

.filter-btn.active i {
    color: #000;
}

.loading-indicator {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.loading-indicator i {
    margin-right: 10px;
}

.all-loaded-message {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 20px;
    opacity: 0.8;
}

.all-loaded-message i {
    color: var(--accent);
    margin-right: 8px;
}

/* Стили для артистов - добавьте в конец файла */
.artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.artist-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.artist-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: var(--accent);
}

.artist-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 15px;
    overflow: hidden;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--accent);
}

.artist-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artist-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.artist-track-count {
    font-size: 12px;
    color: var(--text-secondary);
}

.artist-header {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.artist-header-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: var(--accent);
    flex-shrink: 0;
}

.artist-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artist-header-info h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.artist-header-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

.back-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.2s;
    margin-bottom: 20px;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Стили для автодополнения артистов */
.artist-autocomplete {
    position: relative;
    width: 100%;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.suggestion-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.suggestion-item.selected {
    background: rgba(255, 180, 0, 0.15);
    border-left: 3px solid var(--accent);
}

.suggestion-artist {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.suggestion-artist strong {
    color: var(--accent);
    font-weight: 700;
}

.suggestion-count {
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Анимация появления */
@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.autocomplete-dropdown {
    animation: fadeInDropdown 0.2s ease-out;
}

/* Скроллбар для dropdown */
.autocomplete-dropdown::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        width: 280px;
        background: #141419;
        box-shadow: 10px 0 30px rgba(0,0,0,0.5);
        transition: left 0.3s ease;
        z-index: 1001;
    }
    .sidebar.mobile-open { 
        left: 0; 
        box-shadow: 10px 0 30px rgba(0,0,0,0.7);
    }
    
    .sidebar.mobile-open::before {
        content: '';
        position: fixed;
        left: 280px;
        top: 0;
        width: calc(100vw - 280px);
        height: 100vh;
        background: transparent;
        z-index: 1000;
    }
    
    .menu-toggle { 
        display: block; 
        position: relative;
        z-index: 1002;
    }
    
    .main-content {
        padding: 15px;
        padding-top: 10px;
        padding-bottom: calc(var(--mobile-player-height) + 20px);
    }
    .header {
        margin-bottom: 20px;
        gap: 15px;
    }
    .page-title { font-size: 24px; margin: 0; }
    
    .header { flex-wrap: wrap; }
    .search-wrapper {
        order: 3;
        width: 100%;
        margin-top: 10px;
    }
    .glass-search { width: 100%; }
    
    .track-row {
        padding: 10px;
        gap: 12px;
    }
    .track-play-btn {
        margin-right: 0;
        width: 36px; height: 36px;
        font-size: 12px;
    }
    .track-title { font-size: 14px; }
    .track-artist { font-size: 12px; }
    
    .track-actions .download-btn,
    .track-actions .share-btn,
    .track-duration {
        display: none; 
    }
    
    .player-bar {
        height: var(--mobile-player-height);
        padding: 0 15px;
        bottom: 0;
        position: fixed;
        width: 100%;
        background: rgba(20, 20, 25, 0.98);
        border-top: 1px solid rgba(255,255,255,0.1);
        
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 10px;
    }
    
    .progress-container {
        position: absolute;
        top: -2px; left: 0;
        width: 100%;
        height: 3px;
        gap: 0;
        padding: 0;
        margin: 0;
    }
    .progress-bar-wrapper {
        height: 3px;
        background: rgba(255,255,255,0.2);
        border-radius: 0;
    }
    .progress-bar-fill { border-radius: 0; }
    .progress-container span { display: none; }

    .player-left { width: auto; margin: 0; }
    .current-track-img {
        width: 42px; height: 42px;
        margin-right: 0;
        border-radius: 8px;
    }
    
    .current-track-info {
        margin-left: 10px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .current-track-info h4 { font-size: 13px; max-width: 160px; }
    
    .player-center { 
        display: contents;
    }
    .player-right { display: none; }
    
    .player-controls {
        grid-column: 3;
        display: flex;
        gap: 15px;
        margin: 0;
    }
    
    #shuffleBtn, #repeatBtn, #prevBtn { display: none; }
    
    .play-pause-btn {
        width: 38px; height: 38px;
        font-size: 16px;
        background: transparent;
        border: 1px solid rgba(255,255,255,0.2);
        color: white;
    }
    .play-pause-btn:hover { transform: none; background: rgba(255,255,255,0.1); }
    
    #nextBtn {
        font-size: 20px;
        color: white;
    }
    
    .upload-container { padding: 25px; }
    .upload-rules { font-size: 11px; }
    
    .admin-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .admin-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }

    .filters-container {
        padding: 0 15px;
        margin-bottom: 15px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .artists-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .artist-image {
        width: 80px;
        height: 80px;
        font-size: 30px;
    }
    
    .artist-name {
        font-size: 14px;
    }
    
    .artist-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .artist-header-image {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }
    
    .artist-header-info h1 {
        font-size: 24px;
    }

    .autocomplete-dropdown {
        position: fixed;
        top: auto;
        bottom: calc(var(--mobile-player-height) + 20px);
        left: 15px;
        right: 15px;
        max-height: 200px;
        z-index: 1001;
    }
    
    .suggestion-item {
        padding: 10px 12px;
    }
    
    .suggestion-artist {
        font-size: 13px;
    }
    
    .suggestion-count {
        font-size: 11px;
        padding: 2px 6px;
    }
}