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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1DB954, #191414);
    color: white;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.connection-status {
    position: absolute;
    top: 0;
    right: 0;
}

.status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.status.online {
    background-color: #1DB954;
    color: white;
}

.status.offline {
    background-color: #e22134;
    color: white;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.current-song {
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.progress-container {
    margin-top: 20px;
    padding: 15px 0;
}

.time-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #ccc;
}

.current-time, .total-time {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    transition: height 0.2s ease;
}

.progress-bar-container:hover {
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
}

.progress-bar {
    width: 100%;
    height: 100%;
    position: relative;
}

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

.song-display .no-song h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #ccc;
}

.authentication-prompt {
    text-align: center;
    padding: 40px;
}

.authentication-prompt h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #1DB954;
}

.authentication-prompt p {
    margin-bottom: 20px;
    color: #ccc;
}

.auth-btn {
    display: inline-block;
    background: linear-gradient(45deg, #1DB954, #1ed760);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(29, 185, 84, 0.3);
    margin: 10px;
}

.auth-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(29, 185, 84, 0.4);
    background: linear-gradient(45deg, #1ed760, #21e065);
}

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

.song-cover {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.song-info h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #1DB954;
}

.song-info .artist {
    font-size: 1.5rem;
    color: #ccc;
    margin-bottom: 5px;
}

.song-info .album {
    font-size: 1rem;
    color: #888;
}

.song-info .added-by {
    font-size: 0.9rem;
    color: #1DB954;
    margin-top: 5px;
    font-style: italic;
}

.player-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.control-btn {
    background: linear-gradient(45deg, #1DB954, #1ed760);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(29, 185, 84, 0.3);
    white-space: nowrap;
}

.control-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(29, 185, 84, 0.4);
    background: linear-gradient(45deg, #1ed760, #21e065);
}

.control-btn:disabled {
    background: #555;
    cursor: not-allowed;
    box-shadow: none;
}

.control-btn.pause-btn {
    background: linear-gradient(45deg, #ff9500, #ffb84d);
    box-shadow: 0 4px 15px rgba(255, 149, 0, 0.3);
}

.control-btn.pause-btn:hover:not(:disabled) {
    background: linear-gradient(45deg, #ffb84d, #ffc266);
    box-shadow: 0 6px 20px rgba(255, 149, 0, 0.4);
}

.control-btn.stop-btn {
    background: linear-gradient(45deg, #e22134, #ff6b6b);
    box-shadow: 0 4px 15px rgba(226, 33, 52, 0.3);
}

.control-btn.stop-btn:hover:not(:disabled) {
    background: linear-gradient(45deg, #ff6b6b, #ff5252);
    box-shadow: 0 6px 20px rgba(226, 33, 52, 0.4);
}

.queue-section {
    background: rgba(0,0,0,0.2);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.queue-section h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #1DB954;
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-section {
    background: rgba(0,0,0,0.15);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.history-section h3 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: #ff9500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.queue-count, .history-count {
    background: #1DB954;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.history-count {
    background: #ff9500;
}

.queue-list, .history-list {
    max-height: 300px;
    overflow-y: auto;
}

.queue-item {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background 0.3s ease;
}

.queue-item:hover {
    background: rgba(255,255,255,0.15);
}

.history-item {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.history-item:hover {
    background: rgba(255,255,255,0.12);
    border-left-color: #ff9500;
}

.history-item.skipped {
    border-left-color: #e22134;
}

.history-item.completed {
    border-left-color: #1DB954;
}

.queue-item .song-info, .history-item .song-info {
    flex: 1;
}

.queue-item .song-name, .history-item .song-name {
    font-weight: bold;
    font-size: 1.1rem;
    color: white;
}

.queue-item .artist-name, .history-item .artist-name {
    color: #ccc;
    font-size: 0.9rem;
}

.queue-item .song-duration, .history-item .song-duration {
    color: #888;
    font-size: 0.8rem;
}

.history-item .played-time {
    color: #999;
    font-size: 0.8rem;
    font-style: italic;
}

.history-item .status-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.history-item .status-badge.skipped {
    background: rgba(226, 33, 52, 0.2);
    color: #ff6b6b;
}

.history-item .status-badge.completed {
    background: rgba(29, 185, 84, 0.2);
    color: #1ed760;
}

.re-add-btn {
    background: #ff9500;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.re-add-btn:hover {
    background: #ffb84d;
    transform: scale(1.05);
}

.empty-queue, .empty-history {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

footer {
    margin-top: 30px;
    text-align: center;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    padding: 20px;
}

.instructions p {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.instructions strong {
    color: #1DB954;
    font-family: monospace;
    background: rgba(0,0,0,0.3);
    padding: 4px 8px;
    border-radius: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .connection-status {
        position: static;
        margin-top: 10px;
    }
    
    .song-display .playing-song {
        flex-direction: column;
        text-align: center;
    }
    
    .song-info h2 {
        font-size: 1.8rem;
    }
    
    .player-controls {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .control-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

/* Custom Scrollbar */
.queue-list::-webkit-scrollbar {
    width: 8px;
}

.queue-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.queue-list::-webkit-scrollbar-thumb {
    background: #1DB954;
    border-radius: 4px;
}

.queue-list::-webkit-scrollbar-thumb:hover {
    background: #1ed760;
}
