/* ============================================
   ENHANCEMENTS - Additional visual improvements
   ============================================ */

/* Smooth page load animation */
body {
    opacity: 0;
    animation: pageLoad 0.6s ease-out 0.1s forwards;
}

@keyframes pageLoad {
    to { opacity: 1; }
}

/* Glowing search input focus effect */
.search-form form > input:focus {
    box-shadow:
        0 8px 25px rgba(29, 185, 84, 0.15),
        0 0 0 3px rgba(29, 185, 84, 0.1);
}

/* Animated gradient border on song cards */
.select-song {
    position: relative;
    overflow: hidden;
}

.select-song::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
        transparent 30%,
        rgba(29, 185, 84, 0.3) 50%,
        transparent 70%);
    border-radius: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.select-song:hover::before {
    opacity: 1;
}

/* Ripple effect on buttons */
.primary, .go-to-screen, #download, #last-go-back {
    position: relative;
    overflow: hidden;
}

/* Song image hover glow */
.song-image {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 300ms ease;
}

.song-image:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* Smooth color transition for color picker circles */
.select-color {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease !important;
}

.select-color:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transform: scale(1.15) !important;
}

/* Enhanced switch toggle animation */
.switch {
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-text #light-text .switch,
.spotify-tag #spotify-tag .switch,
.additional-bg #additional-bg .switch {
    background: rgba(29, 185, 84, 0.3);
    border-color: rgba(29, 185, 84, 0.8);
}

.light-text #light-text .switch::after,
.spotify-tag #spotify-tag .switch::after,
.additional-bg #additional-bg .switch::after {
    background-color: rgba(29, 185, 84, 1);
}

/* Lyrics line selection - stagger animation */
.select-line {
    animation: slideInFromBottom 0.4s ease-out backwards;
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Download button pulse */
#download {
    transition: all 0.3s ease;
}

#download:hover {
    color: rgba(29, 185, 84, 1);
    transform: translate(100%, -50%) scale(1.1);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(29, 185, 84, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(29, 185, 84, 0.5);
}

/* Footer enhancement */
footer {
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.1));
    backdrop-filter: blur(10px);
}

footer a {
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

footer a:hover::after {
    width: 100%;
}

footer a:hover {
    text-decoration: none;
}

/* Loading skeleton for song cards */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Tooltip for controls */
.control-group label {
    cursor: default;
    position: relative;
}

/* Better focus states for accessibility */
*:focus-visible {
    outline: 2px solid rgba(29, 185, 84, 0.8);
    outline-offset: 2px;
}

/* Smooth transitions for screen changes */
.lyrics-image-screen {
    will-change: opacity, width;
}

/* Album cover image smooth loading */
.select-song img,
.song-image > .header > img {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
}

/* Responsive typography improvements */
@media screen and (min-width: 1200px) {
    .search-form header h1 {
        font-size: 3.5rem;
        letter-spacing: -0.02em;
    }

    .search-form header .subtitle {
        font-size: 1.4rem;
    }
}

/* Print styles */
@media print {
    .search-form, .search-results, .lyrics-results, footer {
        display: none !important;
    }

    .final-options {
        background: white !important;
    }

    .song-image {
        break-inside: avoid;
    }
}
