/* =============================================================
   CinePhrase - Homepage 3D Stylesheet
   Exclusively using CSS Root Variables for Light & Dark Modes
   ============================================================= */

/* Hero Section */
.hero-section {
    background: var(--card-bg);
    position: relative;
    overflow: hidden;
    padding: 4.5rem 1rem 3.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* Subtle 3D Ambient Mesh Glow */
.hero-section::before {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 1;
    filter: blur(50px);
}

.hero-section .container-lg {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.hero-section h1 i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section .lead {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-muted-custom);
    max-width: 620px;
    margin: 0 auto 2.5rem;
}

/* 3D Floating Search Bar */
.search-form {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

.search-form .input-group {
    background: var(--card-bg);
    border-radius: 50px;
    padding: 6px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-3d-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-form .input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow:
        0 20px 40px -10px var(--primary-glow),
        0 0 0 4px var(--primary-glow);
    transform: translateY(-2px);
}

.search-form .form-control {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0.85rem 1.5rem !important;
    font-size: 1.05rem;
    color: var(--text-color) !important;
}

.search-form .form-control::placeholder {
    color: var(--text-muted-custom);
    opacity: 0.7;
}

.search-form .btn {
    border-radius: 50px !important;
    padding: 0.85rem 1.85rem;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.search-hint {
    color: var(--text-hint);
    font-size: 0.9rem;
}

/* Loading State */
.loading-container {
    padding: 4rem 1rem;
}

.loading-container .spinner-border {
    width: 3.5rem;
    height: 3.5rem;
    border-width: 0.3em;
    color: var(--primary-color) !important;
}

/* 3D Video Cards Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.video-card {
    background: var(--card-bg) !important;
    background: var(--card-gradient) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    box-shadow: var(--shadow-3d-md);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-3d-hover);
    border-color: var(--primary-color) !important;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--card-thumb-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-thumbnail::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--card-thumb-radial);
    transition: opacity 0.3s ease;
}

.video-thumbnail i {
    font-size: 2.8rem;
    color: var(--card-thumb-icon);
    z-index: 2;
    filter: drop-shadow(var(--shadow-3d-sm));
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-card:hover .video-thumbnail i {
    transform: scale(1.22);
    color: var(--card-thumb-icon-hover);
}

.video-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-color) !important;
    padding: 1.15rem 1.25rem;
    line-height: 1.5;
    text-align: center;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Load More Button */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.load-more-container .btn {
    padding: 0.85rem 2.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
}

/* Responsive Adaptations */
@media (max-width: 768px) {
    .hero-section {
        padding: 2.5rem 0.75rem 1.75rem;
    }

    .hero-section h1 {
        font-size: clamp(1.5rem, 4vw, 2rem);
    }

    .hero-section .lead {
        font-size: clamp(0.9rem, 2vw, 1rem);
        margin-bottom: 1.5rem;
    }

    .search-form {
        padding: 0 0.75rem;
    }

    .search-form .input-group {
        border-radius: 12px;
        flex-wrap: wrap;
        padding: 6px;
        gap: 6px;
    }

    .search-form .form-control {
        font-size: 0.95rem;
        padding: 0.7rem 1rem !important;
        flex: 1 1 100%;
        min-width: 0;
    }

    .search-form .btn {
        flex: 1 1 100%;
        width: 100%;
        padding: 0.7rem 1rem !important;
        font-size: 0.9rem;
        border-radius: 10px !important;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }

    .video-title {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }

    .load-more-container .btn {
        padding: 0.7rem 2rem !important;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 1.75rem 0.5rem 1rem;
    }

    .hero-section h1 {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
        gap: 8px;
    }

    .hero-section h1 i {
        font-size: 1.3em;
    }

    .hero-section .lead {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .search-form {
        padding: 0 0.5rem;
        max-width: 100%;
    }

    .search-form .input-group {
        border-radius: 10px;
        padding: 5px;
        gap: 5px;
    }

    .search-form .form-control {
        font-size: 0.9rem;
        padding: 0.6rem 0.75rem !important;
    }

    .search-form .form-control::placeholder {
        font-size: 0.85rem;
    }

    .search-form .btn {
        padding: 0.6rem 0.75rem !important;
        font-size: 0.85rem;
    }

    .search-form .btn i {
        font-size: 0.9em;
    }

    .video-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .video-card {
        border-radius: 12px;
    }

    .video-thumbnail {
        aspect-ratio: 16 / 9;
    }

    .video-thumbnail i {
        font-size: 2rem;
    }

    .video-title {
        font-size: 0.85rem;
        padding: 0.7rem 0.9rem;
    }

    .load-more-container {
        margin-top: 2rem;
    }

    .load-more-container .btn {
        padding: 0.6rem 1.5rem !important;
        font-size: 0.85rem;
    }
}

@media (max-width: 360px) {
    .hero-section {
        padding: 1.5rem 0.4rem 0.75rem;
    }

    .hero-section h1 {
        font-size: 1.25rem;
    }

    .hero-section .lead {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }

    .search-form {
        padding: 0 0.4rem;
    }

    .search-form .form-control {
        font-size: 0.85rem;
        padding: 0.55rem 0.6rem !important;
    }

    .search-form .btn {
        font-size: 0.8rem;
        padding: 0.55rem 0.6rem !important;
    }

    .video-title {
        font-size: 0.8rem;
        padding: 0.65rem 0.8rem;
    }
}

