:root {
    --bg-primary: #0a0000;
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --accent-color: #ff000d;
    --accent-glow: rgba(255, 0, 13, 0.6);
    --glass-bg: rgba(20, 0, 0, 0.6);
    --glass-border: rgba(255, 0, 13, 0.2);
    --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Removed overflow: hidden so page can scroll if needed */
}

.landing-background {
    position: fixed;
    /* Changed from absolute so it stays behind while scrolling */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    background-size: cover;
    background-position: center top;
    z-index: -1;
    transition: opacity 1s var(--ease-smooth);
    opacity: 0.8;
    /* Slight dim before load */
}

.landing-background.loaded {
    opacity: 1;
}

.vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dark radial gradient vignette similar to netflix */
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.3) 0%, rgba(10, 0, 0, 1) 100%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(10, 0, 0, 0.9) 100%);
}

.landing-content {
    text-align: center;
    z-index: 10;
    width: 100%;
    max-width: 800px;
    padding: 4rem 2rem;
    /* Add padding top/bottom */
    margin-top: auto;
    /* Push down */
    margin-bottom: auto;
    /* Push up from footer */
}

.landing-title {
    font-size: 5.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: -2px;
}

.accent-text {
    color: var(--accent-color);
    text-shadow: 0 0 30px var(--accent-glow), 0 0 80px var(--accent-glow);
    animation: textPulse 3s infinite alternate ease-in-out;
}

.landing-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 3.5rem;
    font-weight: 400;
}

.landing-search-box {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    margin-bottom: 3.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s var(--ease-smooth);
    width: 90%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.landing-search-box:focus-within {
    border-color: rgba(255, 0, 13, 0.5);
    box-shadow: 0 15px 40px rgba(255, 0, 13, 0.15);
    transform: translateY(-2px);
    background: rgba(30, 0, 0, 0.8);
}

.search-icon {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-right: 1rem;
}

#landing-search {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    padding: 1rem 0;
    outline: none;
}

#landing-search::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    box-shadow: 0 4px 15px var(--accent-glow);
    position: relative;
    overflow: hidden;
}

.search-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-20deg);
    transition: all 0.5s ease;
}

.search-btn:hover::after {
    left: 150%;
}

.search-btn:hover {
    background: #ff1a26;
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(255, 0, 13, 0.7);
}

.landing-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    /* Removed max-height and custom scrollbar so it expands page */
    background: rgba(15, 2, 2, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 0, 13, 0.3);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
    margin-bottom: 3rem;
    /* Push the footer down when expanded */
}

.landing-suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text-primary);
    text-decoration: none;
    text-align: left;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.landing-suggestion-item:last-child {
    border-bottom: none;
}

.landing-suggestion-item:hover {
    background: rgba(255, 0, 13, 0.15);
}

.landing-suggestion-img {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.btn-enter {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.15rem;
    font-weight: 600;
    transition: all 0.3s var(--ease-smooth);
    backdrop-filter: blur(10px);
}

.btn-enter:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.landing-footer {
    position: relative;
    /* Changed from absolute to prevent overlap */
    margin-top: calc(auto + 20vh);
    /* Push to bottom of flex container, and push further down out of view */
    width: 100%;
    padding: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    z-index: 10;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    animation: fadeUp 1s var(--ease-smooth) forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.landing-footer .footer-links {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.landing-footer .footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s;
}

.landing-footer .footer-links a:hover {
    color: var(--text-primary);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- New Animations & Lighting --- */

.animate-item {
    opacity: 0;
    will-change: opacity, transform;
    animation: fadeUp 1s var(--ease-smooth) forwards;
}

.animation-delay-1 {
    animation-delay: 0.2s;
}

.animation-delay-2 {
    animation-delay: 0.4s;
}

.animation-delay-3 {
    animation-delay: 0.6s;
}

.floating-element {
    will-change: transform;
    animation: floatUpDown 6s ease-in-out infinite;
}

.pulsing-btn {
    will-change: box-shadow;
    animation: gentlePulse 3s infinite alternate ease-in-out;
}

@keyframes floatUpDown {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes gentlePulse {
    0% {
        box-shadow: 0 0 10px rgba(255, 0, 13, 0.1);
    }

    100% {
        box-shadow: 0 0 30px rgba(255, 0, 13, 0.4);
    }
}

@keyframes textPulse {
    0% {
        text-shadow: 0 0 20px rgba(255, 0, 13, 0.4), 0 0 60px rgba(255, 0, 13, 0.3);
    }

    100% {
        text-shadow: 0 0 40px rgba(255, 0, 13, 0.8), 0 0 100px rgba(255, 0, 13, 0.6);
    }
}

/* Ambient Orbs */
.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.4;
    mix-blend-mode: screen;
    pointer-events: none;
    will-change: transform;
    animation: drift 20s infinite alternate ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 0, 13, 0.6) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    animation-duration: 25s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(200, 0, 10, 0.4) 0%, transparent 70%);
    bottom: -150px;
    right: -100px;
    animation-duration: 30s;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 50, 50, 0.3) 0%, transparent 70%);
    top: 30%;
    left: 40%;
    animation-duration: 20s;
    animation-direction: alternate-reverse;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(50px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-30px, 40px) scale(0.9);
    }

    100% {
        transform: translate(20px, 20px) scale(1);
    }
}

@media (max-width: 768px) {
    .landing-content {
        padding: 2rem 1rem;
    }

    .landing-title {
        font-size: 3.5rem;
    }

    .landing-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem !important;
    }

    /* Reduce shadow intensity for better mobile performance */
    .accent-text {
        text-shadow: 0 0 20px var(--accent-glow), 0 0 50px var(--accent-glow);
    }

    @keyframes textPulse {
        0% {
            text-shadow: 0 0 10px rgba(255, 0, 13, 0.4), 0 0 30px rgba(255, 0, 13, 0.3);
        }

        100% {
            text-shadow: 0 0 20px rgba(255, 0, 13, 0.8), 0 0 50px rgba(255, 0, 13, 0.6);
        }
    }

    /* Remove floating animation on mobile to save battery/performance */
    .floating-element {
        animation: none;
        transform: none;
    }

    .landing-search-box {
        flex-direction: column;
        background: transparent;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
        padding: 0;
        gap: 0.8rem;
    }

    .landing-search-box:focus-within {
        transform: none;
        box-shadow: none;
        background: transparent;
    }

    .search-icon {
        display: none;
    }

    #landing-search {
        width: 100%;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 50px;
        padding: 1rem 1.5rem;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        text-align: center;
        font-size: 1rem;
    }

    .search-btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }

    .landing-suggestions {
        position: relative;
        /* Change from absolute to sit smoothly in column layout */
        top: 0;
        margin-top: 5px;
        margin-bottom: 1rem;
        border-radius: 15px;
    }

    /* Reduce ambient orb size/blur for mobile rendering speed */
    .ambient-orb {
        filter: blur(50px);
        opacity: 0.3;
    }

    .orb-1 {
        width: 250px;
        height: 250px;
    }

    .orb-2 {
        width: 300px;
        height: 300px;
    }

    .orb-3 {
        width: 200px;
        height: 200px;
    }

    .btn-enter {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        font-size: 1rem;
    }
}