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

:root {
    --spotify-green: #1DB954;
    --spotify-black: #191414;
    --spotify-dark: #121212;
    --spotify-gray: #282828;
    --spotify-light-gray: #b3b3b3;
    --spotify-white: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--spotify-dark) 0%, var(--spotify-black) 100%);
    color: var(--spotify-white);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

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

.header h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--spotify-green);
}

.playlist-selectors {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.playlist-selector {
    background: var(--spotify-gray);
    padding: 15px;
    border-radius: 12px;
}

.playlist-selector label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--spotify-light-gray);
}

.playlist-selector select {
    width: 100%;
    padding: 12px;
    background: var(--spotify-dark);
    color: var(--spotify-white);
    border: 2px solid var(--spotify-gray);
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s;
}

.playlist-selector select:focus {
    outline: none;
    border-color: var(--spotify-green);
}

.playlist-selector select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.login-section {
    background: var(--spotify-gray);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
}

.login-card h2 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.login-card p {
    color: var(--spotify-light-gray);
    margin-bottom: 25px;
}

.main-content {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.track-info {
    text-align: center;
    margin-bottom: 30px;
}

.album-art {
    width: 100%;
    aspect-ratio: 1;
    max-width: 350px;
    margin: 0 auto 20px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--spotify-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-art .placeholder {
    font-size: 4rem;
    opacity: 0.3;
}

.track-info h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 20px;
}

.track-info p {
    color: var(--spotify-light-gray);
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 20px;
}

.player-controls {
    background: var(--spotify-gray);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.progress-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.progress-time {
    font-size: 0.75rem;
    color: var(--spotify-light-gray);
    min-width: 40px;
}

.progress-container {
    flex: 1;
    height: 4px;
    background: var(--spotify-dark);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: var(--spotify-green);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.progress-slider {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    transform: translateY(-50%);
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

.progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--spotify-white);
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.progress-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--spotify-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.progress-container:hover .progress-slider::-webkit-slider-thumb,
.progress-container:hover .progress-slider::-moz-range-thumb {
    opacity: 1;
}

.control-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.btn-control {
    background: none;
    border: none;
    color: var(--spotify-white);
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-control svg {
    width: 24px;
    height: 24px;
}

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

.btn-control:active {
    transform: scale(0.95);
}

.btn-play {
    background: var(--spotify-white);
    color: var(--spotify-black);
    width: 56px;
    height: 56px;
}

.btn-play svg {
    width: 28px;
    height: 28px;
}

.btn-play:hover {
    background: var(--spotify-white);
    transform: scale(1.05);
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.btn {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: var(--spotify-green);
    color: var(--spotify-white);
}

.btn-primary:hover {
    background: #1ed760;
    transform: scale(1.02);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--spotify-gray);
    color: var(--spotify-white);
}

.btn-secondary:hover {
    background: #3e3e3e;
    transform: scale(1.02);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.status-message {
    text-align: center;
    padding: 15px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-top: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.status-message.show {
    opacity: 1;
}

.status-message.success {
    background: rgba(29, 185, 84, 0.2);
    color: var(--spotify-green);
}

.status-message.error {
    background: rgba(255, 59, 59, 0.2);
    color: #ff3b3b;
}

.status-message.info {
    background: rgba(29, 185, 84, 0.1);
    color: var(--spotify-light-gray);
}

@media (max-width: 768px) {
    .playlist-selectors {
        gap: 12px;
    }
    
    .playlist-selector {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .track-info h2 {
        font-size: 1.2rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        padding: 14px 20px;
    }
}

@media (max-height: 700px) {
    .album-art {
        max-width: 250px;
    }

    .header {
        margin-bottom: 20px;
    }

    .player-controls {
        padding: 15px;
    }
}