/* 
    Index of Movies - Premium "Cosmic Glass" Theme
    Centralized styles for global platform consistency.
*/

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

:root {
    /* Colors */
    --bg-main: #020617; 
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent-glow: rgba(56, 189, 248, 0.3);
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --brand-accent: #38bdf8; 
    
    /* Spacing & Radius */
    --radius-lg: 30px;
    --radius-md: 20px;
    --radius-sm: 12px;
    --max-width: 1300px;
}

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

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(30, 58, 138, 0.3) 0, transparent 50%),
        radial-gradient(at 100% 0%, rgba(126, 34, 206, 0.2) 0, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

/* --- DYNAMIC BACKGROUND BLOBS --- */
.blob-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(80px);
}

.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    opacity: 0.3;
    animation: move 25s infinite alternate;
}

.blob-1 { background: var(--brand-accent); top: -10%; left: -10%; }
.blob-2 { background: #7e22ce; bottom: -10%; right: -10%; animation-delay: -7s; }

@keyframes move {
    from { transform: translate(0, 0) rotate(0deg) scale(1); }
    to { transform: translate(150px, 150px) rotate(45deg) scale(1.1); }
}

/* --- UTILITY CLASSES --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    border-radius: var(--radius-lg);
}

.brand-gradient {
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

.hover-lift {
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

/* --- LAYOUT --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.hero-section {
    padding: 140px 20px 80px;
    text-align: center;
    position: relative;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 900;
    letter-spacing: -4px;
    line-height: 0.9;
    margin-bottom: 25px;
    text-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 50px;
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 1.6;
}

/* --- PREMIUM FLOATING NAVBAR --- */
.navbar {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 10px 10px 10px 25px;
    border-radius: 100px;
    width: calc(100% - 40px);
    max-width: 1100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: 0.3s;
}

.nav-logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 10px 20px rgba(168, 85, 247, 0.3);
}

.nav-logo-text {
    color: white;
    font-weight: 900;
    font-size: 1.6rem;
    letter-spacing: -1.5px;
}

.nav-menu {
    display: flex;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-link {
    font-weight: 800;
    padding: 14px 30px;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-link:not(.nav-highlight):not(.active):hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.nav-link.active {
    background: white;
    color: #0f172a !important;
    box-shadow: 0 15px 30px rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

.nav-highlight {
    position: relative;
    background: var(--brand-accent) !important;
    color: #0f172a !important;
    box-shadow: 0 15px 30px var(--accent-glow) !important;
    transform: translateY(-2px);
}

.nav-highlight::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 12px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 15px #ef4444;
    animation: blink-red 1.5s infinite;
}

@keyframes blink-red {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.nav-highlight:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--brand-accent);
}

/* --- SEARCH BAR --- */
.search-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 60px;
    position: relative;
    z-index: 10;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 10px 10px 10px 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transition: 0.3s;
}

.search-bar:focus-within {
    border-color: var(--brand-accent);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3), 0 0 20px var(--accent-glow);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    padding: 6px 0;
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* --- BUTTONS --- */
.btn-nm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--brand-accent);
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    letter-spacing: 0.3px;
}

.btn-nm:hover {
    background: var(--brand-accent);
    color: #0f172a;
    border-color: var(--brand-accent);
    box-shadow: 0 8px 20px var(--accent-glow);
}

/* --- CATEGORY PILLS --- */
.category-pill {
    padding: 10px 24px;
    border-radius: 50px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    transition: 0.3s;
    cursor: pointer;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.category-pill:hover {
    border-color: var(--brand-accent);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.category-pill.active {
    background: var(--brand-accent);
    color: #0f172a;
    border-color: var(--brand-accent);
    box-shadow: 0 8px 20px var(--accent-glow);
}

/* --- SECTIONS & GRIDS --- */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.section {
    margin-bottom: 80px;
    position: relative;
    z-index: 1;
}

.section-header {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 30px;
    letter-spacing: -1px;
    border-left: 5px solid var(--brand-accent);
    padding-left: 20px;
}

.link-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    height: 140px;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    overflow: hidden;
    position: relative;
}

.link-card:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: var(--brand-accent);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 20px var(--accent-glow);
}

.link-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: 0.3s;
}

/* --- ENHANCED FILTER NAVIGATION --- */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
    overflow-x: auto;
    padding: 10px 0 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.filter-buttons::-webkit-scrollbar {
    display: none;
}

/* --- FEATURED BLOG SECTION --- */
.blog-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.blog-card {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    padding: 30px;
    height: 100%;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.blog-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
    color: var(--brand-accent);
    margin-bottom: 15px;
    display: block;
}

.blog-title {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--text-primary);
    transition: 0.3s;
}

.blog-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0;
}

.blog-card:hover {
    border-color: var(--brand-accent);
    transform: translateY(-8px);
    background: rgba(30, 41, 59, 0.5);
}

.blog-card:hover .blog-title {
    color: var(--brand-accent);
}

/* --- INFO PANELS --- */
.info-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    margin: 40px auto;
    max-width: 900px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.info-icon-box {
    width: 60px;
    height: 60px;
    background: var(--brand-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #0f172a;
    flex-shrink: 0;
    border-radius: 18px;
    box-shadow: 0 10px 20px var(--accent-glow);
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #020617;
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--brand-accent);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .navbar { 
        padding: 10px 15px; 
        width: calc(100% - 20px); 
        top: 10px; 
        border-radius: 20px;
    }
    
    .nav-toggle {
        display: flex !important;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 1100;
    }
    
    .nav-toggle span {
        display: block;
        width: 25px;
        height: 2px;
        background: white;
        transition: 0.3s;
        border-radius: 2px;
    }
    
    /* Toggle Animation */
    .nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle.active span:nth-child(2) { opacity: 0; }
    .nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(10, 18, 35, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 25px;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1050;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link { 
        font-size: 1.4rem; 
        padding: 14px 35px;
    }
    
    .nav-logo-text { font-size: 1.2rem; letter-spacing: -0.5px; }
    .nav-logo { gap: 10px; }
    .nav-logo-icon { width: 32px; height: 32px; font-size: 1rem; border-radius: 10px; }

    .hero-title { font-size: 3rem; letter-spacing: -2px; line-height: 1; }
    .hero-subtitle { font-size: 1.05rem; margin-bottom: 30px; padding: 0 10px; }
    .hero-section { padding: 120px 15px 60px; }
    
    /* Search bar mobile stack */
    .search-container { padding: 0 15px 40px; }
    .search-bar {
        position: relative !important;
        flex-direction: column !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        gap: 12px !important;
        box-shadow: none !important;
    }
    
    .search-bar .search-input {
        background: rgba(15, 23, 42, 0.6) !important;
        border: 1px solid var(--glass-border) !important;
        border-radius: 50px !important;
        padding: 16px 20px 16px 48px !important;
        width: 100% !important;
        backdrop-filter: blur(20px) !important;
        margin: 0 !important;
        font-size: 0.95rem !important;
    }

    .search-bar i.fas.fa-search,
    .search-bar i.fa-search {
        position: absolute !important;
        left: 18px !important;
        top: 18px !important;
        pointer-events: none !important;
        margin: 0 !important;
        z-index: 5 !important;
    }
    
    .search-bar button {
        width: 100% !important;
        padding: 14px !important;
        justify-content: center !important;
        font-size: 0.95rem !important;
        box-shadow: 0 8px 20px var(--accent-glow) !important;
        margin: 0 !important;
        border-radius: 50px !important;
    }
    
    /* Buttons */
    .btn-nm { padding: 12px 20px; font-size: 0.85rem; }
    
    /* Info panel stack */
    .info-panel { flex-direction: column; text-align: center; padding: 20px; gap: 15px; }
    .info-icon-box { margin: 0 auto; width: 50px; height: 50px; font-size: 20px; }
    
    /* Section & grid */
    .section-header { font-size: 1.6rem; margin-bottom: 20px; }
    .links-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; }
    .link-card { height: 100px; padding: 15px; border-radius: 18px; }
    .blog-preview-grid { grid-template-columns: 1fr; gap: 15px; }
    .blog-card { padding: 22px; }
    .blog-title { font-size: 1.2rem; }
    
    /* Filter pills horizontal scroll */
    .filter-buttons { 
        justify-content: flex-start; 
        gap: 8px; 
        padding: 8px 0 15px;
        -webkit-overflow-scrolling: touch;
    }
    .category-pill { padding: 8px 18px; font-size: 0.82rem; }
    
    /* Footer full stack */
    .footer { 
        padding: 35px 20px !important; 
        border-radius: 20px !important; 
        margin: 40px 10px 20px !important;
    }
    .footer > div { 
        grid-template-columns: 1fr !important; 
        gap: 30px !important; 
        text-align: center !important; 
    }
    .footer div[style*="border-left"] { 
        border-left: none !important; 
        border-top: 1px solid rgba(255,255,255,0.05); 
        padding-left: 0 !important; 
        padding-top: 25px; 
    }
    .footer div[style*="display: flex"] { justify-content: center; }

    /* Trending/Blog card on homepage */
    .trending-now { flex-direction: column !important; text-align: center !important; border-left: none !important; border-top: 4px solid var(--brand-accent) !important; }
    .trending-now .btn-nm { width: 100%; justify-content: center; }

    /* CTA Responsiveness */
    .container div[style*="padding: 60px 30px"] {
        padding: 35px 20px !important;
        margin: 40px 10px !important;
        border-radius: 25px !important;
    }
    .container h3[style*="font-size: 2.2rem"] {
        font-size: 1.6rem !important;
        letter-spacing: -0.5px !important;
    }
    .container p[style*="font-size: 1.15rem"] {
        font-size: 1rem !important;
    }

    /* SEO Section */
    .glass-card[style*="margin: 60px 20px"] {
        margin: 30px 10px 10px !important;
        padding: 30px 20px !important;
    }
    .glass-card h2[style*="font-size: 2rem"] {
        font-size: 1.5rem !important;
    }
    .glass-card p[style*="font-size: 1.1rem"] {
        font-size: 0.95rem !important;
    }

    /* Watch Hub CTA inline buttons */
    a[style*="padding: 18px 45px"],
    a[style*="padding: 18px 50px"] {
        padding: 14px 25px !important;
        font-size: 1rem !important;
        width: 100% !important;
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.4rem; letter-spacing: -1.5px; }
    .hero-section { padding: 110px 12px 35px; }
    .hero-subtitle { font-size: 0.95rem; }
    .search-container { padding: 0 10px 30px; }
    .category-pill { padding: 7px 14px; font-size: 0.78rem; }
    
    .nav-logo-text { font-size: 1.1rem; }
    .nav-logo-icon { width: 30px; height: 30px; font-size: 0.9rem; }
    
    .links-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .link-card { height: 85px; padding: 12px; border-radius: 16px; }
    
    /* CTA buttons */
    a[style*="padding: 18px 45px"],
    a[style*="padding: 18px 50px"] {
        padding: 12px 20px !important;
        font-size: 0.95rem !important;
    }

    .glass-card {
        border-radius: 18px !important;
    }

    .section-header {
        font-size: 1.3rem;
        padding-left: 12px;
        border-left-width: 4px;
    }

    .section { margin-bottom: 50px; }

    .info-panel { border-radius: 20px; padding: 18px 15px; }
}

/* Ultra-small screens (320-360px) */
@media (max-width: 360px) {
    .navbar { padding: 8px 12px; top: 8px; }
    .nav-logo-text { font-size: 1rem; }
    .nav-logo-icon { width: 28px; height: 28px; font-size: 0.85rem; }
    .hero-title { font-size: 2rem; letter-spacing: -1px; }
    .hero-subtitle { font-size: 0.88rem; }
    .links-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .link-card { height: 75px; padding: 10px; }
    .category-pill { padding: 6px 12px; font-size: 0.75rem; }
    .blog-card { padding: 18px; }
    .blog-title { font-size: 1.1rem; }
    .blog-desc { font-size: 0.88rem; }
    .footer { padding: 25px 15px !important; }
}
