/* ==========================================================================
   BASE STYLES & RESET
   ========================================================================== */

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

html {
    background-color: #0f1419; /* fallback color to cover rubber-band overscroll */
    color-scheme: dark;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f1419 100%);
    color: #e8e8e8;
    line-height: 1.6;
    min-height: 100vh;
}

/* ==========================================================================
   LAYOUT CONTAINER
   ========================================================================== */

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

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 4px 0 8px;
    margin-bottom: 8px;
}

.site-logo-link {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease;
}

.site-logo-link:hover {
    transform: translateY(-1px);
}

.site-logo-link:active {
    transform: translateY(0);
}

.site-header h1.site-logo {
    font-size: 1.6rem;
    margin: 0;
    text-align: left;
    line-height: 1.2;
    color: #a8b2d1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    font-weight: 600;
    transition: color 0.2s ease;
    user-select: none;
}

.site-logo-link:hover .site-logo {
    color: #c8d2f1;
}

/* Legacy header styles (kept for compatibility) */
header h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
    color: #a8b2d1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}


/* ==========================================================================
   SONG DETAIL VIEW
   ========================================================================== */

.song-content {
    max-width: 600px;
    margin: 0 auto;
}

#songDetail .song-content {
    max-width: 650px;
    margin: 0 auto;
    background: rgba(40,44,52,0.4);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(168,178,209,0.15);
    backdrop-filter: blur(6px);
}

.song-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(168, 178, 209, 0.2);
}

.song-header h1 {
    font-size: 2.2rem;
    color: #a8b2d1;
    margin-bottom: 0.5rem;
}

.lyrics-content {
    background: rgba(40, 44, 52, 0.4);
    padding: 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    line-height: 1.8;
    white-space: pre-line;
    border: 1px solid rgba(168, 178, 209, 0.1);
    backdrop-filter: blur(5px);
    margin-top: 1rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

footer {
    margin-top: 1rem;
    padding-top: 1rem;
    text-align: center;
    border-top: 1px solid rgba(168, 178, 209, 0.1);
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .footer-links {
        gap: 1.5rem;
        flex-direction: column;
    }
}

/* ==========================================================================
   BUTTONS & CONTROLS
   ========================================================================== */

.close-btn {
    background: #2b3242;
    color: #e8e8e8;
    border: 1px solid rgba(168, 178, 209, 0.2);
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease;
}

.close-btn:hover {
    background: #3a4354;
}

.close-btn:active {
    transform: translateY(1px);
}



/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    .container {
        padding: 8px 12px 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .site-header h1.site-logo {
        font-size: 1.4rem;
    }
    
    #search {
        padding: 0.8rem 1.2rem;
        font-size: 1rem;
    }
    
    .song-item {
        padding: 0.8rem;
    }
    
    .song-title {
        font-size: 1.1rem;
    }
    
    .song-header h1 {
        font-size: 1.8rem;
    }
    
    .lyrics-content {
        padding: 1.2rem;
    }
    
    #songDetail .song-content {
        padding: 1.5rem;
        margin: 0 5px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px 8px 12px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .site-header h1.site-logo {
        font-size: 1.25rem;
    }
    
    .lyrics-content {
        padding: 0.8rem;
        margin-top: 0.8rem;
    }
    
    #songDetail .song-content {
        padding: 1rem;
        margin: 0 2px;
    }
    
    .song-header {
        margin-bottom: 1.5rem;
        padding-bottom: 0.8rem;
    }
}