* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #e94560, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cache-status {
    font-size: 0.9rem;
    color: #aaa;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    main {
        grid-template-columns: 1fr;
    }
}

.player-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.now-playing {
    text-align: center;
    margin-bottom: 30px;
}

.album-art {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #e94560, #0f3460);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    box-shadow: 0 10px 40px rgba(233, 69, 96, 0.3);
}

.track-info h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    word-break: break-all;
}

.track-info p {
    color: #aaa;
    font-size: 1rem;
}

.progress-section {
    margin-bottom: 25px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e94560, #ff6b6b);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.time-display {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #aaa;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.control-btn.active {
    background: #e94560;
}

.play-btn {
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    border: none;
    color: #fff;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.8rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(233, 69, 96, 0.4);
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(233, 69, 96, 0.5);
}

.volume-section {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.volume-section input[type="range"] {
    width: 150px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

.volume-section input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #e94560;
    border-radius: 50%;
    cursor: pointer;
}

.volume-section input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #e94560;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.playlist-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.playlist-header h3 {
    font-size: 1.3rem;
}

.playlist-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(233, 69, 96, 0.3);
    border-color: #e94560;
}

.playlist-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.playlist-filter input,
.playlist-filter select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    outline: none;
}

.playlist-filter input {
    flex: 1;
}

.playlist-filter input::placeholder {
    color: #888;
}

.playlist-filter select option {
    background: #1a1a2e;
}

.playlist {
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
}

.playlist::-webkit-scrollbar {
    width: 8px;
}

.playlist::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.playlist::-webkit-scrollbar-thumb {
    background: rgba(233, 69, 96, 0.5);
    border-radius: 4px;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(233, 69, 96, 0.3);
}

.playlist-item.active {
    background: rgba(233, 69, 96, 0.2);
    border-color: #e94560;
}

.playlist-item.cached::after {
    content: "💾";
    margin-left: 8px;
    font-size: 0.8rem;
}

.track-number {
    width: 30px;
    color: #888;
    font-size: 0.9rem;
}

.track-details {
    flex: 1;
    min-width: 0;
}

.track-name {
    font-weight: 500;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-meta {
    font-size: 0.8rem;
    color: #888;
}

.track-actions {
    display: flex;
    gap: 8px;
}

.track-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.track-btn:hover {
    background: #e94560;
}

.empty-message {
    text-align: center;
    color: #888;
    padding: 40px;
    font-style: italic;
}

.notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(233, 69, 96, 0.9);
    color: #fff;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 0.95rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #e94560;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.offline-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ff6b6b;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
}

.offline-indicator.show {
    display: block;
}
