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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --hover-color: #2563eb;
    --success-color: #10b981;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
}

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.header h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.header h1 i {
    -webkit-text-fill-color: var(--primary-color);
    margin-right: 10px;
}

.btn-back {
    display: inline-block;
    padding: 10px 25px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s;
    margin-top: 15px;
    font-weight: 600;
}

.btn-back:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

/* Albums Grid */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.album-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
}

.album-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.3);
}

.album-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.album-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.album-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Player Section */
.player-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.album-info {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.album-cover {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.spinning {
    animation: spin 3s linear infinite;
}

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

.album-info h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.song-count {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Audio Player */
.audio-player {
    margin-bottom: 30px;
}

#audioPlayer {
    width: 100%;
    height: 60px;
    background: var(--bg-color);
    border-radius: 15px;
    outline: none;
    margin-bottom: 15px;
}

.now-playing {
    text-align: center;
    padding: 15px;
    background: var(--bg-color);
    border-radius: 10px;
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* Playlist */
.playlist {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

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

.playlist::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 10px;
}

.playlist::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.song-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: var(--bg-color);
    border-radius: 10px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.song-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.song-item.playing {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border-color: var(--primary-color);
}

.song-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.song-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-muted);
    min-width: 30px;
}

.song-details {
    display: flex;
    flex-direction: column;
}

.song-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 3px;
}

.song-format {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

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

.btn-play,
.btn-download {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s;
    text-decoration: none;
}

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

.btn-play:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.btn-download {
    background: var(--success-color);
    color: white;
}

.btn-download:hover {
    background: #059669;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.empty-state small {
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .album-card {
        padding: 20px;
    }
    
    .album-icon {
        font-size: 3rem;
    }
    
    .player-section {
        padding: 20px;
    }
    
    .album-cover {
        width: 120px;
        height: 120px;
        font-size: 3rem;
    }
    
    .song-item {
        padding: 12px 15px;
    }
    
    .song-name {
        font-size: 0.9rem;
    }
    
    .btn-play,
    .btn-download {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 20px 15px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .albums-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   PWA - Estilos de Instalação e Notificações
   ========================================== */

/* Install Prompt */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    max-width: 90%;
    width: 500px;
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.5);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
}

.install-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.install-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.install-text {
    flex: 1;
}

.install-text h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.install-text p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.install-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-install {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

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

.btn-dismiss:hover {
    background: #ef4444;
    transform: scale(1.1);
}

/* Notification Toast */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: var(--card-bg);
    color: var(--text-color);
    padding: 15px 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: 600;
    border: 2px solid var(--primary-color);
}

.notification-success {
    border-color: var(--success-color);
}

.notification-error {
    border-color: #ef4444;
}

.notification-info {
    border-color: var(--primary-color);
}

/* Update Banner */
.update-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 15px;
    z-index: 9998;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.3s ease;
}

.update-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-weight: 600;
}

.btn-update {
    padding: 8px 20px;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-update:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

/* PWA Mode Adjustments */
body.pwa-mode {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

body.pwa-mode .header {
    padding-top: calc(30px + env(safe-area-inset-top));
}

/* Loading Spinner (para futuras features) */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}

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

/* Offline Indicator */
.offline-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ef4444;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
    z-index: 9997;
    display: none;
}

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

/* Responsive PWA */
@media (max-width: 768px) {
    .install-prompt {
        bottom: 10px;
        max-width: 95%;
    }
    
    .install-content {
        flex-direction: column;
        text-align: center;
    }
    
    .install-icon {
        font-size: 2.5rem;
    }
    
    .install-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .btn-install {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .install-prompt {
        padding: 15px;
    }
    
    .install-text h3 {
        font-size: 1rem;
    }
    
    .install-text p {
        font-size: 0.85rem;
    }
    
    .notification {
        max-width: 90%;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .update-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Splash Screen Customization (iOS) */
@media (display-mode: standalone) {
    body {
        background-attachment: fixed;
    }
}
