* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
}

.player-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2em;
}

/* Loading Section */
.loading-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #666;
    font-size: 0.95em;
}

.file-info {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
    font-size: 0.9em;
    padding: 10px;
    background: #f8f8f8;
    border-radius: 8px;
}

/* Player Section */
.player-section {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.song-info {
    text-align: center;
    margin-bottom: 20px;
}

.song-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.song-time {
    font-size: 0.9em;
    color: #666;
}

/* Progress Bar */
.progress-container {
    position: relative;
    margin-bottom: 25px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #e0e0e0;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.progress-bar::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.progress-bar::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: transform 0.2s;
}

.progress-bar::-moz-range-thumb:hover {
    transform: scale(1.2);
}

.progress-bg {
    position: absolute;
    top: 0;
    left: 0;
    height: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
    z-index: 1;
    width: 0%;
    transition: width 0.1s;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.btn {
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-play {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.5em;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-play:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-control {
    background: #f0f0f0;
    color: #333;
}

.btn-control:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

.btn-toggle {
    background: #f0f0f0;
    color: #666;
}

.btn-toggle.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-toggle:hover {
    transform: scale(1.1);
}

/* Playlist */
.playlist-section {
    margin-top: 30px;
}

.playlist-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.playlist {
    max-height: 300px;
    overflow-y: auto;
    border-radius: 10px;
    background: #f8f8f8;
    padding: 10px;
}

.playlist-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid transparent;
}

.playlist-item:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.playlist-item.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-left-color: #667eea;
    font-weight: 600;
}

.playlist-item-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
}

.playlist-item-duration {
    color: #666;
    font-size: 0.85em;
    margin-left: 10px;
}

/* Scrollbar */
.playlist::-webkit-scrollbar {
    width: 8px;
}

.playlist::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.playlist::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.playlist::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Responsive */
@media (max-width: 600px) {
    .player-card {
        padding: 20px;
    }

    h1 {
        font-size: 1.5em;
    }

    .controls {
        gap: 10px;
    }

    .btn {
        width: 45px;
        height: 45px;
        font-size: 1em;
    }

    .btn-play {
        width: 55px;
        height: 55px;
        font-size: 1.3em;
    }
}

