@import url(https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,700);

/*
 * Style Guide:
 * Rule 1: Never gonna give you up
 * Rule 2: Never gonna let you down
 * Rule 3: Never gonna run around and desert you
 * Rule 4: Never gonna make you cry
 * Rule 5: Never gonna say goodbye
 * Rule 6: Never gonna tell a lie and hurt you
 */

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

body {
    background: #000;
    margin: 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.container {
    width: 100%;
    height: 100vh;
    position: relative;
}

.rick-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.rick-bg.visible {
    opacity: 1;
}

.lyrics {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 700;
    font-size: clamp(1.2em, 4vw, 2.5em);
    color: #fff;
    text-align: center;
    line-height: 1.4;
    z-index: 1;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    padding: 0 1em;
}

.lyrics-line {
    margin: 0.4em 0;
    opacity: 0;
    transform: translateY(0.5em);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.lyrics-line.visible {
    opacity: 1;
    transform: translateY(0);
}

.mute-btn {
    position: fixed;
    top: 1em;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    width: 5em;
    height: 5em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.6s ease, background 0.3s ease;
}

.mute-btn.visible {
    opacity: 1;
}

.mute-btn:hover,
.mute-btn:focus {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    text-decoration: none;
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.bottom-links {
    position: fixed;
    bottom: 1em;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.8em;
}

.generate-link {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8em;
    text-decoration: none;
    transition: color 0.3s ease;
}

.generate-link:hover,
.generate-link:focus {
    color: rgba(255, 255, 255, 0.8);
}

.about-link {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8em;
    text-decoration: none;
    transition: color 0.3s ease;
}

.about-link:hover,
.about-link:focus {
    color: rgba(255, 255, 255, 0.8);
}

.karaoke-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.3s ease;
}

.karaoke-link:hover,
.karaoke-link:focus {
    color: rgba(255, 255, 255, 0.8);
}

/* Fake loading overlay for themed URLs */
.fake-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.fake-loading.visible {
    opacity: 1;
    pointer-events: auto;
}

.fake-loading-text {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 1.5em;
}

.fake-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.fake-loading-actions {
    margin-top: 2em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8em;
    opacity: 0;
    animation: fadeIn 1s ease 1.2s forwards;
}

.fake-loading-actions .skip-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 0.85em;
    cursor: pointer;
    text-decoration: underline;
    padding: 0.3em 0.6em;
}

.fake-loading-actions .skip-btn:hover {
    color: #333;
}

.fake-loading-progress {
    width: 200px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.fake-loading-progress-bar {
    height: 100%;
    background: #3b82f6;
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

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

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

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

@media (prefers-reduced-motion: reduce) {
    .lyrics-line {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .rick-bg {
        opacity: 1;
        transition: none;
    }

    .mute-btn {
        opacity: 1;
        transition: none;
    }

    .fake-loading {
        display: none;
    }

    .fake-loading-spinner {
        animation: none;
    }
}
