/* ============================================
   LANDING PAGE — MoviesAndSeriesHub
   ============================================ */

.landing-body {
    margin: 0;
    padding: 0;
    background: #0a0a0a;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== Hero ===== */
.landing-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.landing-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(6px);
    transform: scale(1.1);
    opacity: 0.35;
    transition: opacity 1.2s ease;
}

.landing-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(20,20,20,0.5) 0%, rgba(10,10,10,0.95) 80%),
        linear-gradient(135deg, rgba(10,10,10,0.85), rgba(20,20,20,0.7));
    z-index: 1;
}

[data-theme="light"] .landing-overlay {
    background:
        radial-gradient(circle at center, rgba(245,245,245,0.55) 0%, rgba(230,230,230,0.95) 80%),
        linear-gradient(135deg, rgba(255,255,255,0.85), rgba(240,240,240,0.9));
}

.landing-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px 20px;
    max-width: 700px;
    width: 100%;
}

/* ----- Logo ----- */
.landing-logo {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    color: #fff;
    letter-spacing: -0.5px;
}
[data-theme="light"] .landing-logo {
    color: #1a1a2e;
}
.landing-logo i {
    color: var(--primary);
    font-size: 48px;
}
.landing-logo .accent { color: var(--primary); }

.landing-tagline {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.5;
    font-weight: 300;
}

/* ===== Search ===== */
.landing-search-row {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
}

.landing-search-box {
    display: flex;
    align-items: center;
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 4px;
    transition: background 0.2s ease,
                border-color 0.2s ease,
                box-shadow 0.2s ease,
                width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
}

.landing-search-box:focus-within {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
}

[data-theme="light"] .landing-search-box {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .landing-search-box:focus-within {
    background: rgba(0, 0, 0, 0.08);
}

/* Mobile-only icon button */
.landing-search-icon-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
}
[data-theme="light"] .landing-search-icon-btn {
    color: #1a1a2e;
}
.landing-search-icon-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* Input wrapper */
.landing-search-input-wrap {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 10px;
    padding: 0 16px;
    min-width: 0;
}

.landing-search-inside-icon {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    flex-shrink: 0;
}
[data-theme="light"] .landing-search-inside-icon {
    color: rgba(20, 20, 20, 0.45);
}

.landing-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 15px;
    padding: 12px 0;
    font-family: inherit;
    min-width: 0;
    text-overflow: ellipsis;
}
[data-theme="light"] .landing-search-input {
    color: #1a1a2e;
}

.landing-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    text-overflow: ellipsis;
}
[data-theme="light"] .landing-search-input::placeholder {
    color: rgba(20, 20, 20, 0.45);
}

/* Mobile-only close button */
.landing-search-close-btn {
    display: none;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-right: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}
[data-theme="light"] .landing-search-close-btn {
    color: rgba(20, 20, 20, 0.55);
}
.landing-search-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
[data-theme="light"] .landing-search-close-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #1a1a2e;
}

/* ===== CTA ===== */
.landing-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 44px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(229, 9, 20, 0.4);
    font-family: inherit;
}
.landing-cta:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
    box-shadow: 0 12px 48px rgba(229, 9, 20, 0.6);
}
.landing-cta i {
    font-size: 16px;
}

/* ===== Trending ===== */
.landing-trending {
    max-width: 1440px;
    margin: 0 auto;
    padding: 60px 4%;
    border-top: 1px solid var(--border-color);
}

.landing-trending h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.landing-trending h2 i { color: var(--primary); }

.landing-trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.landing-trending-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 2/3;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: var(--bg-secondary);
}
.landing-trending-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}
.landing-trending-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.landing-attribution {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 40px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .landing-logo { font-size: 28px; }
    .landing-logo i { font-size: 32px; }
    .landing-tagline { font-size: 15px; margin-bottom: 24px; }
    .landing-cta { padding: 14px 32px; font-size: 16px; }
    .landing-trending-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
    .landing-trending h2 { font-size: 20px; }

    /* Mobile search — collapsed to icon */
    .landing-search-box {
        width: 52px;
        padding: 4px;
        justify-content: center;
    }
    .landing-search-box.expanded {
        width: 100%;
        justify-content: flex-start;
    }

    .landing-search-icon-btn {
        display: flex;
    }
    .landing-search-box.expanded .landing-search-icon-btn {
        display: none;
    }

    .landing-search-input-wrap {
        display: none;
        padding: 0 12px 0 4px;
    }
    .landing-search-box.expanded .landing-search-input-wrap {
        display: flex;
    }

    .landing-search-inside-icon {
        display: none;
    }

    .landing-search-box.expanded .landing-search-close-btn {
        display: flex;
    }

    .landing-search-input {
        font-size: 16px; /* prevents iOS auto-zoom */
        padding: 10px 0;
    }
}
