/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-logo {
    font-size: 80px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.splash-text {
    color: white;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.splash-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 16px;
    text-align: center;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* PWA Banner */
.pwa-banner {
    background: linear-gradient(135deg, #76d802 0%, #5bb002 100%);
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-weight: 600;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    animation: slideDown 0.5s ease-out;
}

.pwa-banner.hidden {
    display: none;
}

.banner-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.banner-btn:hover {
    background: rgba(255,255,255,0.3);
}

.banner-close {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.banner-close:hover {
    background: rgba(255,255,255,0.2);
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Header */
.header {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.version {
    font-size: 0.6em;
    opacity: 0.7;
}

.header p {
    opacity: 0.8;
    font-size: 0.95rem;
}

/* Main Content */
.main-content {
    display: flex;
    min-height: calc(100vh - 120px);
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: rgba(0,0,0,0.3);
    padding: 20px;
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.sidebar h3 {
    color: #76d802;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.song-list {
    list-style: none;
    margin-bottom: 30px;
}

.song-list li {
    padding: 15px;
    margin: 8px 0;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
    gap: 12px;
}

.song-list li:hover {
    background: rgba(255,255,255,0.2);
    border-left-color: #76d802;
    transform: translateX(5px);
}

.song-list li.active {
    background: rgba(118, 216, 2, 0.2);
    border-left-color: #76d802;
}

.song-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.song-title {
    flex: 1;
    font-weight: 500;
}

.song-key {
    background: rgba(118, 216, 2, 0.3);
    color: #76d802;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.stats {
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}

.stats h4 {
    color: #76d802;
    margin-bottom: 10px;
    font-size: 1rem;
}

.stats p {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.6;
}

/* Content */
.content {
    flex: 1;
    padding: 30px;
    min-width: 0;
}

.song-display {
    background: rgba(255,255,255,0.05);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.1);
    min-height: 500px;
}

.song-title {
    font-size: 2.2rem;
    margin-bottom: 25px;
    color: #76d802;
    text-align: center;
    font-weight: 600;
}

/* Transpose Controls */
.transpose-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.1);
    padding: 15px 20px;
    border-radius: 25px;
    margin-bottom: 25px;
    justify-content: center;
}

.current-key {
    font-size: 1.4rem;
    font-weight: bold;
    color: #76d802;
    min-width: 40px;
    text-align: center;
    background: rgba(118, 216, 2, 0.2);
    padding: 8px 16px;
    border-radius: 15px;
}

.key-label {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-left: auto;
}

/* Controls */
.controls {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn.secondary {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
}

.btn.secondary:hover {
    background: rgba(255,255,255,0.2);
}

/* Song Content */
.song-content {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    line-height: 2;
    white-space: pre-wrap;
    background: rgba(0,0,0,0.2);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    min-height: 300px;
}

.chord {
    color: #76d802;
    font-weight: bold;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-block;
}

.chord:hover {
    background: rgba(118, 216, 2, 0.2);
    transform: scale(1.05);
}

.section-title {
    color: #667eea;
    font-weight: bold;
    margin: 20px 0 10px 0;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Install Button */
.install-button {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: linear-gradient(135deg, #76d802 0%, #5bb002 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 25px rgba(118, 216, 2, 0.3);
    display: none;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.install-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(118, 216, 2, 0.4);
}

.install-button.show {
    display: flex;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        max-height: 250px;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .content {
        padding: 20px 15px;
    }
    
    .song-display {
        padding: 20px;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .transpose-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .key-label {
        margin-left: 0;
        text-align: center;
        width: 100%;
    }
}

/* PWA específico */
@media (display-mode: standalone) {
    .pwa-banner {
        display: none;
    }
    
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}
