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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    color: #fff;
    min-height: 100vh;
}

#app {
    min-height: 100vh;
}

/* Login Screen */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    text-align: center;
    max-width: 400px;
}

.login-box h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

.login-box p {
    color: #b3b3b3;
    margin-bottom: 30px;
}

.btn-spotify {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #1DB954;
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.2s;
}

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

/* Player Screen */
.player-screen {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px 20px;
}

.now-playing {
    text-align: center;
}

.album-art {
    width: 280px;
    height: 280px;
    margin: 0 auto 30px;
    border-radius: 8px;
    overflow: hidden;
    background: #282828;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    position: relative;
}

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

.no-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5em;
    background: linear-gradient(135deg, #1DB954 0%, #191414 100%);
}

.track-info h1 {
    font-size: 1.5em;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-info h2 {
    font-size: 1.1em;
    color: #b3b3b3;
    font-weight: 400;
    margin-bottom: 3px;
}

.track-info p {
    font-size: 0.9em;
    color: #666;
}

/* Progress */
.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 25px 0;
    padding: 0 10px;
}

.progress-container span {
    font-size: 0.8em;
    color: #b3b3b3;
    width: 40px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: #404040;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #1DB954;
    width: 0%;
    transition: width 0.5s linear;
}

/* Controls */
.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.btn-control {
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 10px;
}

.btn-control:hover {
    transform: scale(1.15);
}

.btn-play {
    font-size: 2.5em;
    background: #1DB954;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-play:hover {
    background: #1ed760;
}

/* Device Selector */
.device-selector {
    margin: 25px 0;
}

.device-selector select {
    width: 100%;
    padding: 12px 15px;
    background: #282828;
    border: 1px solid #404040;
    border-radius: 8px;
    color: #fff;
    font-size: 1em;
    cursor: pointer;
}

.device-selector select:focus {
    outline: none;
    border-color: #1DB954;
}

/* History */
.history-section {
    margin-top: 40px;
    border-top: 1px solid #282828;
    padding-top: 25px;
}

.history-section h3 {
    font-size: 0.9em;
    color: #b3b3b3;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #181818;
    border-radius: 8px;
    transition: background 0.2s;
}

.history-item:hover {
    background: #282828;
}

.history-item img {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    object-fit: cover;
}

.history-info {
    flex: 1;
    min-width: 0;
}

.history-track {
    display: block;
    font-size: 0.95em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-artist {
    display: block;
    font-size: 0.8em;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-time {
    font-size: 0.75em;
    color: #666;
    white-space: nowrap;
}

/* Logout */
.logout-section {
    margin-top: 40px;
    text-align: center;
}

.btn-logout {
    color: #666;
    font-size: 0.85em;
    text-decoration: none;
}

.btn-logout:hover {
    color: #b3b3b3;
}

/* DB Error */
.db-error {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px;
    color: #e74c3c;
    text-align: center;
}

/* Mobile */
@media (max-width: 400px) {
    .album-art {
        width: 220px;
        height: 220px;
    }
    
    .track-info h1 {
        font-size: 1.2em;
    }
}
