:root {
    --primary-color: #1db954;
    --secondary-color: #191414;
    --text-color: #ffffff;
    --text-secondary: #b3b3b3;
    --card-bg: #282828;
    --player-bg: rgba(40, 40, 40, 0.9);
    --year-color: #ff9f43;
}

body {
    background: var(--secondary-color);
    color: var(--text-color);
    font-family: 'Source Sans Pro', sans-serif;
    padding-bottom: 120px;
    min-height: 100vh;
}

.header {
    background: linear-gradient(to bottom, #000000, var(--secondary-color));
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.logo-link:hover {
    text-decoration: none;
}

.logo {
    font-family: 'Bitter', serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--primary-color);
    line-height: 1;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px);
    text-shadow: 0 2px 5px rgba(29, 185, 84, 0.3);
}

.bitrate-selector-container {
    max-width: 150px;
    margin-left: auto;
}

.song-card {
    background: var(--card-bg);
    border-radius: 10px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.song-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    background: #333;
}

.song-card.active {
    border: 2px solid var(--primary-color);
}

.song-cover-container {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
}

.song-cover {
    width: 100%;
    height: 100%;
    min-height: 150px;
    object-fit: cover;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.song-cover-blur {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    filter: blur(10px);
    opacity: 0.5;
    z-index: 0;
}

.song-info {
    padding: 15px;
}

.song-title {
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1rem;
}

.song-artist {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-year {
    color: var(--year-color);
    font-size: 0.8rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.song-duration {
    color: var(--text-secondary);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

.song-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.action-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1rem;
    margin: 0 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.action-btn.play {
    color: var(--primary-color);
}

.action-btn.download {
    color: #4da6ff;
}

.action-btn.favorite {
    color: #ff4d4d;
}

.player-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--player-bg);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    z-index: 1000;
}

.player-cover-container {
    position: relative;
    width: 60px;
    height: 60px;
    margin-right: 15px;
    border-radius: 5px;
    overflow: hidden;
}

.player-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.player-cover-blur {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    filter: blur(10px);
    opacity: 0.5;
    z-index: 0;
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-title {
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
}

.player-artist {
    color: var(--text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-year {
    color: var(--year-color);
    font-size: 0.85rem;
    font-weight: 600;
}

.progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin: 8px 0;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
    pointer-events: none;
}

.seek-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    left: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
    pointer-events: none;
}

.progress-container:hover .seek-dot {
    opacity: 1;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 5px;
}

.control-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.3rem;
    margin: 0 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.control-btn.play-pause {
    font-size: 1.5rem;
    background: var(--primary-color);
    color: white;
}

.control-btn.play-pause:hover {
    transform: scale(1.05);
}

.volume-container {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.volume-slider {
    width: 80px;
    margin-left: 5px;
    -webkit-appearance: none;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.search-container {
    margin-bottom: 30px;
}

.search-input {
    background: var(--card-bg);
    border: none;
    color: var(--text-color);
    border-radius: 20px;
    padding: 12px 20px;
    height: auto;
}

.search-input:focus {
    background: var(--card-bg);
    color: var(--text-color);
    box-shadow: 0 0 0 0.2rem rgba(29, 185, 84, 0.25);
}

.search-btn {
    background: var(--primary-color);
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    margin-left: 10px;
    color: white;
    font-weight: 600;
    transition: all 0.2s ease;
}

.search-btn:hover {
    background: #1ed760;
    transform: translateY(-1px);
}

.category-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 20px;
    padding: 7px 15px;
    margin: 5px;
    color: white;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.category-btn:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
}

.modal-content {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.close {
    color: var(--text-color);
    opacity: 0.8;
}

.download-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: background 0.2s ease;
}

.download-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.download-cover {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    margin-right: 15px;
    object-fit: cover;
}

.download-info {
    flex: 1;
    min-width: 0;
}

.download-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-album {
    color: var(--text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-status {
    font-size: 0.8rem;
    margin-top: 3px;
}

.download-status.completed {
    color: var(--primary-color);
}

.download-status.failed {
    color: #ff4d4d;
}

#download-float-btn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 50px;
    height: 50px;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#download-float-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.loading-spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.loading-spinner.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#load-more {
    background: var(--primary-color);
    border: none;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#load-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(29, 185, 84, 0.3);
}

.footer {
    background: var(--secondary-color);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.list-inline-item:not(:last-child)::after {
    content: '|';
    color: var(--text-secondary);
    margin: 0 10px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header {
        padding: 15px 0;
    }
    .logo {
        font-size: 2rem;
    }
    .bitrate-selector-container {
        margin-top: 10px;
        max-width: 100%;
    }
    .search-container .col-md-8 {
        padding: 0;
    }
    .search-input {
        padding: 10px 15px;
    }
    .search-btn {
        padding: 8px 15px;
    }
    .category-container {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    .category-btn {
        margin: 0 5px 5px 0;
        padding: 5px 12px;
    }
    .song-card {
        margin-bottom: 15px;
    }
    .player-container .col-md-2 {
        padding-right: 0;
    }
    .player-cover-container {
        width: 50px;
        height: 50px;
        margin-right: 10px;
    }
    .player-title {
        font-size: 0.9rem;
    }
    .player-artist {
        font-size: 0.8rem;
    }
    .control-btn {
        font-size: 1.1rem;
        margin: 0 5px;
    }
    .control-btn.play-pause {
        font-size: 1.3rem;
    }
    .volume-slider {
        width: 60px;
    }
    .list-inline-item:not(:last-child)::after {
        margin: 0 5px;
    }
    #download-float-btn {
        bottom: 80px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 576px) {
    .song-cover {
        min-height: 180px;
    }
    .song-info {
        padding: 12px;
    }
    .player-container {
        padding: 8px 0;
    }
    .player-cover-container {
        width: 40px;
        height: 40px;
    }
    .player-title {
        font-size: 0.85rem;
    }
    .player-artist {
        font-size: 0.75rem;
    }
    .control-btn {
        width: 35px;
        height: 35px;
        margin: 0 3px;
    }
    .volume-slider {
        width: 50px;
    }
    .list-inline-item {
        display: block;
        margin-bottom: 5px;
    }
    .list-inline-item:not(:last-child)::after {
        content: none;
    }
}

.download-item.mp4 .download-status {
    color: orange;
}
.download-item.mp3 .download-status {
    color: green;
}
.a2hs-btn {
    background: var(--primary-color);
    border: none;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
}

.a2hs-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(29, 185, 84, 0.3);
}