/*
╔═══════════════════════════════════════════════════════════════════════════════════════╗
║  CINEVERSE - Modern Movie Search Website Stylesheet                                  ║
║  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  ║
║  Design System: Dark Theme with Glassmorphism                                        ║
║  Primary Color Palette: Purple, Blue, Cyan Gradients                                 ║
║  Typography: Inter (Body) & Poppins (Headings)                                       ║
╚═══════════════════════════════════════════════════════════════════════════════════════╝
*/

/* 
═══════════════════════════════════════════════════════════════════════════════════════
CSS CUSTOM PROPERTIES (DESIGN TOKENS)
These variables define the core design system for consistent styling throughout
═══════════════════════════════════════════════════════════════════════════════════════
*/
:root {
    /* ━━━━━━━━━━ PRIMARY COLOR PALETTE ━━━━━━━━━━ */
    --primary-purple: #8B5CF6;
    /* Main accent color */
    --primary-blue: #3B82F6;
    /* Secondary accent */
    --primary-cyan: #06B6D4;
    /* Tertiary accent */
    --primary-pink: #EC4899;
    /* Highlight color */

    /* ━━━━━━━━━━ BACKGROUND COLORS ━━━━━━━━━━ */
    --bg-primary: #0F0F1A;
    /* Main background - deep dark blue */
    --bg-secondary: #1A1A2E;
    /* Card backgrounds */
    --bg-tertiary: #16213E;
    /* Elevated surfaces */
    --bg-glass: rgba(26, 26, 46, 0.7);
    /* Glassmorphism background */

    /* ━━━━━━━━━━ TEXT COLORS ━━━━━━━━━━ */
    --text-primary: #FFFFFF;
    /* Main text */
    --text-secondary: #A0AEC0;
    /* Muted text */
    --text-tertiary: #718096;
    /* Subtle text */

    /* ━━━━━━━━━━ GRADIENT DEFINITIONS ━━━━━━━━━━ */
    --gradient-primary: linear-gradient(135deg, #8B5CF6 0%, #3B82F6 50%, #06B6D4 100%);
    --gradient-card: linear-gradient(145deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.05));
    --gradient-glow: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(59, 130, 246, 0.4));

    /* ━━━━━━━━━━ GLASSMORPHISM EFFECTS ━━━━━━━━━━ */
    --glass-blur: blur(20px);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);

    /* ━━━━━━━━━━ SHADOWS ━━━━━━━━━━ */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.3);

    /* ━━━━━━━━━━ BORDER RADIUS ━━━━━━━━━━ */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;

    /* ━━━━━━━━━━ TRANSITIONS ━━━━━━━━━━ */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* ━━━━━━━━━━ SPACING ━━━━━━━━━━ */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* ━━━━━━━━━━ LAYOUT DIMENSIONS ━━━━━━━━━━ */
    --header-height: 80px;
    --sidebar-width: 340px;
    --max-content-width: 1400px;
}

/* 
═══════════════════════════════════════════════════════════════════════════════════════
CSS RESET & BASE STYLES
Normalize browser defaults and set foundational styles
═══════════════════════════════════════════════════════════════════════════════════════
*/
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

/* Base body styles - dark theme foundation */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Remove default link styles */
a {
    text-decoration: none;
    color: inherit;
}

/* Remove default button styles */
button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* Remove default list styles */
ul,
ol {
    list-style: none;
}

/* 
═══════════════════════════════════════════════════════════════════════════════════════
ANIMATED BACKGROUND
Floating gradient orbs that create ambient depth and movement
═══════════════════════════════════════════════════════════════════════════════════════
*/
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

/* Floating gradient orbs - creates depth and visual interest */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

/* Purple orb - top left */
.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-purple) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

/* Blue orb - center right */
.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-blue) 0%, transparent 70%);
    top: 40%;
    right: -100px;
    animation-delay: -7s;
}

/* Cyan orb - bottom left */
.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--primary-cyan) 0%, transparent 70%);
    bottom: -50px;
    left: 30%;
    animation-delay: -14s;
}

/* Floating animation keyframes */
@keyframes float {

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

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

    50% {
        transform: translate(-30px, 30px) scale(0.95);
    }

    75% {
        transform: translate(30px, 50px) scale(1.05);
    }
}

/* 
═══════════════════════════════════════════════════════════════════════════════════════
HEADER STYLES
Fixed navigation bar with glassmorphism effect
Contains: Logo, Navigation, Search Bar
═══════════════════════════════════════════════════════════════════════════════════════
*/
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: var(--glass-border);
    z-index: 1000;
    transition: var(--transition-normal);
}

.header-container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-xl);
}

/* 
━━━━━━━━━━ LOGO STYLES ━━━━━━━━━━
Brand identity with animated icon
*/
.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-normal);
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 1.8rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.logo-text {
    color: var(--text-primary);
}

.logo-highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 
━━━━━━━━━━ NAVIGATION MENU ━━━━━━━━━━
Horizontal menu with hover effects
*/
.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-normal);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.1);
}

.nav-link.active {
    color: var(--text-primary);
    background: var(--gradient-primary);
}

.nav-link i {
    font-size: 1rem;
}

/* 
━━━━━━━━━━ SEARCH BAR ━━━━━━━━━━
Search input with suggestion dropdown
*/
.search-container {
    position: relative;
    flex: 1;
    max-width: 500px;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xs) var(--spacing-sm);
    transition: var(--transition-normal);
}

.search-wrapper:focus-within {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.search-icon {
    color: var(--text-tertiary);
    padding: 0 var(--spacing-sm);
    font-size: 1rem;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    padding: var(--spacing-sm);
}

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

/* Clear and Search buttons */
.clear-btn,
.search-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.clear-btn {
    color: var(--text-tertiary);
    opacity: 0;
    visibility: hidden;
}

.clear-btn.visible {
    opacity: 1;
    visibility: visible;
}

.clear-btn:hover {
    color: var(--primary-pink);
    background: rgba(236, 72, 153, 0.1);
}

.search-btn {
    background: var(--gradient-primary);
    color: white;
    margin-left: var(--spacing-xs);
}

.search-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

/* 
━━━━━━━━━━ SEARCH SUGGESTIONS DROPDOWN ━━━━━━━━━━
Appears below search bar when user types
*/
.suggestions-container {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-normal);
    z-index: 100;
}

.suggestions-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Individual suggestion item */
.suggestion-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    cursor: pointer;
    transition: var(--transition-fast);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.suggestion-item:hover,
.suggestion-item.selected {
    background: rgba(139, 92, 246, 0.15);
}

.suggestion-poster {
    width: 45px;
    height: 65px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-tertiary);
}

.suggestion-info {
    flex: 1;
}

.suggestion-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.suggestion-meta {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* Loading state in suggestions */
.suggestions-loading {
    padding: var(--spacing-lg);
    text-align: center;
    color: var(--text-tertiary);
}

.suggestions-loading i {
    animation: spin 1s linear infinite;
    margin-right: var(--spacing-sm);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: var(--transition-normal);
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 
━━━━━━━━━━ MOBILE SEARCH BAR ━━━━━━━━━━
Appears only on mobile devices, positioned next to logo
*/
.mobile-search {
    position: relative;
    display: none;
    /* Hidden by default, shown only on mobile */
}

.mobile-search input {
    width: 150px;
    padding: 8px 34px 8px 12px;
    border-radius: 20px;
    border: none;
    outline: none;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.mobile-search input::placeholder {
    color: rgba(203, 213, 255, 0.7);
}

.mobile-search i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #8b9cff;
    pointer-events: none;
}

/* Mobile Suggestions Container */
.mobile-suggestions-container {
    position: fixed;
    top: 120px;
    /* Below mobile header */
    left: 16px;
    right: 16px;
    background: var(--bg-secondary);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-normal);
    z-index: 1000;
    display: none;
    /* Hidden by default, shown only on mobile */
}

.mobile-suggestions-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .mobile-suggestions-container {
        display: block;
        /* Show on mobile */
    }
}

/* 
═══════════════════════════════════════════════════════════════════════════════════════
MAIN CONTENT WRAPPER
Contains the main content area and sidebar in a grid layout
═══════════════════════════════════════════════════════════════════════════════════════
*/
.main-wrapper {
    padding-top: calc(var(--header-height) + var(--spacing-xl));
    padding-bottom: var(--spacing-2xl);
    min-height: 100vh;
}

/* Grid layout for main content and sidebar */
.content-grid {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: var(--spacing-xl);
}

/* 
━━━━━━━━━━ MAIN CONTENT AREA ━━━━━━━━━━
Primary content display area
*/
.main-content {
    width: 100%;
}

/* 
═══════════════════════════════════════════════════════════════════════════════════════
HERO SECTION
Displayed when no movie is searched - Welcome screen
═══════════════════════════════════════════════════════════════════════════════════════
*/
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-2xl) 0;
    gap: var(--spacing-2xl);
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.hero-content {
    flex: 1;
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    margin-bottom: var(--spacing-lg);
}

.title-line {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
}

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

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: var(--spacing-xl);
    line-height: 1.8;
}

/* Hero stats - animated counters */
.hero-stats {
    display: flex;
    gap: var(--spacing-xl);
}

.stat-item {
    text-align: center;
    padding: var(--spacing-md);
    background: var(--gradient-card);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    min-width: 100px;
    transition: var(--transition-normal);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.stat-item i {
    font-size: 1.5rem;
    color: var(--primary-purple);
    margin-bottom: var(--spacing-sm);
    display: block;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* 
━━━━━━━━━━ RECENT SEARCHES DROPDOWN ━━━━━━━━━━
Styles for the clear history dropdown menu
*/
.recent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}

.clear-recent-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.clear-recent-btn:hover {
    color: var(--primary-pink);
    background: rgba(255, 255, 255, 0.05);
}

.recent-actions {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--bg-secondary);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.5);
    z-index: 100;
    border-radius: var(--radius-md);
    border: var(--glass-border);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.dropdown-content.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-content a {
    color: var(--text-primary);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

/* Hero visual - floating cards animation */
.hero-visual {
    flex: 0.8;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-cards {
    position: relative;
    width: 300px;
    height: 400px;
}

.float-card {
    position: absolute;
    border-radius: var(--radius-lg);
    background: var(--gradient-card);
    border: var(--glass-border);
    box-shadow: var(--shadow-lg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.card-1 {
    width: 180px;
    height: 270px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-5deg);
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    animation: floatCard1 5s ease-in-out infinite;
    z-index: 3;
}

.card-2 {
    width: 160px;
    height: 240px;
    top: 40%;
    left: 30%;
    transform: rotate(10deg);
    background: linear-gradient(145deg, #252545, #1e1e3f);
    animation: floatCard2 5s ease-in-out infinite;
    animation-delay: -1.5s;
    z-index: 2;
}

.card-3 {
    width: 150px;
    height: 220px;
    top: 60%;
    right: 10%;
    transform: rotate(-10deg);
    background: linear-gradient(145deg, #2a2a4a, #1f1f3d);
    animation: floatCard3 5s ease-in-out infinite;
    animation-delay: -3s;
    z-index: 1;
}

@keyframes floatCard1 {

    0%,
    100% {
        transform: translate(-50%, -50%) rotate(-5deg);
    }

    50% {
        transform: translate(-50%, -55%) rotate(-3deg);
    }
}

@keyframes floatCard2 {

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

    50% {
        transform: rotate(8deg) translateY(-15px);
    }
}

@keyframes floatCard3 {

    0%,
    100% {
        transform: rotate(-10deg) translateY(0);
    }

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

/* 
═══════════════════════════════════════════════════════════════════════════════════════
MOVIE DETAILS SECTION
Displayed when a movie is searched - Main content display
═══════════════════════════════════════════════════════════════════════════════════════
*/
.movie-details {
    animation: fadeInUp 0.6s ease-out;
}

.hidden {
    display: none !important;
}

/* Loading skeleton animation */
.loading-skeleton {
    display: flex;
    gap: var(--spacing-xl);
}

.skeleton-poster {
    width: 300px;
    height: 450px;
    border-radius: var(--radius-lg);
    background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--bg-tertiary) 50%, var(--bg-secondary) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-info {
    flex: 1;
}

.skeleton-title,
.skeleton-meta,
.skeleton-text {
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--bg-tertiary) 50%, var(--bg-secondary) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    margin-bottom: var(--spacing-md);
}

.skeleton-title {
    height: 40px;
    width: 60%;
}

.skeleton-meta {
    height: 24px;
    width: 40%;
}

.skeleton-text {
    height: 16px;
    width: 100%;
}

.skeleton-text.short {
    width: 70%;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Movie content layout */
.movie-content {
    display: flex;
    gap: var(--spacing-2xl);
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
}

/* Poster section */
.poster-section {
    flex-shrink: 0;
}

.poster-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.movie-poster {
    width: 300px;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
}

.poster-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
}

.poster-wrapper:hover .poster-overlay {
    opacity: 1;
}

.play-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: var(--transition-normal);
}

.poster-wrapper:hover .play-btn {
    transform: scale(1);
}

.play-btn:hover {
    box-shadow: var(--shadow-glow);
}

/* Info section */
.info-section {
    flex: 1;
}

.title-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.movie-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.movie-year {
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Meta row - rating, runtime, rated */
.meta-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.rating-badge {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-md);
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: var(--radius-xl);
    font-weight: 700;
    color: #1a1a2e;
}

.rating-badge i {
    color: inherit;
}

.meta-separator {
    color: var(--text-tertiary);
}

.runtime {
    color: var(--text-secondary);
}

.rated-badge {
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--text-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Genre tags */
.genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.genre-tag {
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    color: var(--primary-purple);
    transition: var(--transition-fast);
}

.genre-tag:hover {
    background: rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

/* Plot section */
.plot-section {
    margin-bottom: var(--spacing-lg);
}

.section-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.section-title i {
    color: var(--primary-purple);
}

.movie-plot {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Crew section */
.crew-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
}

.crew-item {
    display: flex;
    gap: var(--spacing-md);
}

.crew-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    min-width: 100px;
    font-weight: 600;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.crew-label i {
    color: var(--primary-purple);
    width: 16px;
}

.crew-value {
    color: var(--text-secondary);
    flex: 1;
}

/* Info cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.info-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.info-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-3px);
}

.info-card i {
    font-size: 1.2rem;
    color: var(--primary-purple);
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Ratings section */
.ratings-section {
    margin-bottom: var(--spacing-lg);
}

.external-ratings {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.rating-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

.rating-source {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.rating-value {
    font-weight: 700;
    color: var(--primary-cyan);
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-normal);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.btn-imdb {
    background: linear-gradient(135deg, #f5c518, #e6b800);
    color: #000;
}

.btn-imdb:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(245, 197, 24, 0.4);
}

/* 
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SUBTITLE DOWNLOAD BUTTONS
English (OpenSubtitles) and Sinhala (CineSubz) subtitle download buttons
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
*/
.subtitle-buttons {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.subtitle-btn-group {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* Base subtitle button styles */
.btn-subtitle {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-lg);
    font-weight: 600;
    color: white;
    min-width: 180px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-subtitle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-subtitle:hover::before {
    left: 100%;
}

.btn-subtitle i {
    font-size: 1.3rem;
}

.btn-subtitle .btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.btn-subtitle .btn-label {
    font-size: 1rem;
    font-weight: 700;
}

.btn-subtitle .btn-source {
    font-size: 0.7rem;
    opacity: 0.8;
    font-weight: 400;
}

/* English Subtitle Button - Green gradient */
.btn-english {
    background: linear-gradient(135deg, #10B981, #059669);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-english:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* Sinhala Subtitle Button - Orange gradient */
.btn-sinhala {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.btn-sinhala:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

/* Responsive: Stack buttons on mobile */
@media (max-width: 480px) {
    .subtitle-btn-group {
        flex-direction: column;
    }

    .btn-subtitle {
        width: 100%;
        justify-content: center;
    }
}

/* 
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WATCH ONLINE BUTTON
Button below movie poster for watching with Sinhala subtitles
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
*/
.btn-watch-online {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    width: 100%;
    margin-top: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: linear-gradient(135deg, #EF4444, #DC2626);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-lg);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-watch-online::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-watch-online:hover::before {
    left: 100%;
}

.btn-watch-online:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

.btn-watch-online i {
    font-size: 1.5rem;
}

.btn-watch-online .btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.btn-watch-online .btn-label {
    font-size: 1rem;
    font-weight: 700;
}

.btn-watch-online .btn-source {
    font-size: 0.7rem;
    opacity: 0.9;
    font-weight: 400;
}

/* 
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MODAL - NOT AVAILABLE POPUP
Animated modal for when movie is not available for online watching
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
*/
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 26, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-secondary);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    max-width: 450px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

/* Modal close button */
.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

/* Animated icon */
.modal-icon {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto var(--spacing-lg);
}

.icon-circle {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(245, 158, 11, 0.2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: iconBounce 2s ease-in-out infinite;
}

.icon-circle i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #EF4444, #F59E0B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.icon-pulse {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid rgba(239, 68, 68, 0.3);
    animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes iconBounce {

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

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

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }

    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* Modal text */
.modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.modal-message {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--spacing-lg);
}

.modal-message .highlight-text {
    color: var(--primary-purple);
    font-weight: 600;
}

.modal-hint {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin-bottom: var(--spacing-md);
}

/* Modal action buttons */
.modal-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.modal-actions .btn {
    width: 100%;
    justify-content: center;
}

/* 
═══════════════════════════════════════════════════════════════════════════════════════
ERROR SECTION
Displayed when movie search fails
═══════════════════════════════════════════════════════════════════════════════════════
*/
.error-section {
    padding: var(--spacing-2xl);
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

.error-content {
    max-width: 400px;
    margin: 0 auto;
}

.error-icon {
    font-size: 4rem;
    color: var(--text-tertiary);
    margin-bottom: var(--spacing-lg);
}

.error-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

/* 
═══════════════════════════════════════════════════════════════════════════════════════
RECENT SEARCHES SECTION
Shows user's search history
═══════════════════════════════════════════════════════════════════════════════════════
*/
.recent-searches {
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-lg);
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
}

.section-heading {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.section-heading i {
    color: var(--primary-purple);
}

.recent-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.recent-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.recent-item:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.3);
    color: var(--text-primary);
}

.recent-item i {
    font-size: 0.8rem;
}

/* 
═══════════════════════════════════════════════════════════════════════════════════════
SIDEBAR STYLES
Right sidebar containing advertisement and quick links
═══════════════════════════════════════════════════════════════════════════════════════
*/
.sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--spacing-xl));
    height: fit-content;
}

/* 
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ADVERTISEMENT CONTAINER STYLES
These styles define the appearance of ad placements
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
*/
.ad-container {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Sidebar ad - 300x600 */
.ad-sidebar {
    margin-bottom: var(--spacing-lg);
}

/* 
PLACEHOLDER STYLES FOR AD DISPLAY
These show where ads will be placed before Adstera code is added
Remove these placeholder styles when adding actual ad code
*/
.ad-placeholder {
    width: 300px;
    height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.05));
    text-align: center;
    padding: var(--spacing-md);
}

.ad-placeholder-bottom {
    width: 728px;
    height: 90px;
    max-width: 100%;
    flex-direction: row;
    gap: var(--spacing-lg);
}

.ad-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-sm);
}

.ad-size {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-tertiary);
    margin-bottom: var(--spacing-sm);
}

.ad-placeholder-bottom .ad-size {
    font-size: 1.2rem;
    margin-bottom: 0;
}

.ad-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

.ad-placeholder-bottom .ad-text {
    margin-bottom: 0;
}

.ad-note {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Sidebar widget */
.sidebar-widget {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.widget-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.widget-title i {
    color: var(--primary-purple);
}

.quick-links li {
    margin-bottom: var(--spacing-sm);
}

.quick-links a {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.quick-links a:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-primary);
}

.quick-links a i {
    width: 20px;
    color: var(--primary-purple);
}

/* 
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
BOTTOM ADVERTISEMENT BANNER
728x90 Leaderboard banner above footer
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
*/
.ad-bottom {
    max-width: var(--max-content-width);
    margin: var(--spacing-2xl) auto 0;
    display: flex;
    justify-content: center;
}

/* 
═══════════════════════════════════════════════════════════════════════════════════════
FOOTER STYLES
Website footer with links and copyright
═══════════════════════════════════════════════════════════════════════════════════════
*/
.footer {
    background: var(--bg-secondary);
    border-top: var(--glass-border);
    margin-top: var(--spacing-2xl);
}

.footer-container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: var(--spacing-2xl);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-2xl);
}

.footer-brand {}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.footer-logo i {
    color: var(--primary-purple);
}

.footer-logo .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-lg);
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.social-link:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-3px);
}

.footer-links h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.footer-links ul li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

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

.footer-bottom {
    border-top: var(--glass-border);
    padding: var(--spacing-lg);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.footer-bottom a {
    color: var(--primary-purple);
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* 
═══════════════════════════════════════════════════════════════════════════════════════
RESPONSIVE STYLES
Mobile-first responsive adjustments
═══════════════════════════════════════════════════════════════════════════════════════
*/

/* Tablet breakpoint (768px - 1024px) */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 300px;
    }

    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-title .title-line {
        font-size: 2.5rem;
    }

    .floating-cards {
        display: none;
    }

    .hero-section {
        justify-content: center;
    }

    .movie-content {
        flex-direction: column;
    }

    .poster-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .movie-poster {
        width: 250px;
    }

    .btn-watch-online {
        max-width: 250px;
        width: 100%;
    }
}

/* Mobile breakpoint (below 768px) */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .header-container {
        padding: 0 var(--spacing-md);
    }

    .search-container {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        padding: var(--spacing-md);
        background: var(--bg-glass);
        backdrop-filter: var(--glass-blur);
        -webkit-backdrop-filter: var(--glass-blur);
        border-bottom: var(--glass-border);
        max-width: 100%;
        display: none;
    }

    .search-container.mobile-active {
        display: block;
    }

    .content-grid {
        grid-template-columns: 1fr;
        padding: 0 var(--spacing-md);
    }

    .sidebar {
        position: relative;
        top: 0;
        order: 2;
    }

    .ad-placeholder {
        width: 100%;
        height: auto;
        min-height: 250px;
    }

    .ad-placeholder-bottom {
        width: 320px;
        height: 100px;
        flex-direction: row;
    }

    .hero-title .title-line {
        font-size: 2rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }

    .stat-item {
        flex: 1;
        min-width: 80px;
    }

    /* Poster section - stack vertically on mobile */
    .poster-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .movie-poster {
        width: 200px;
    }

    /* Watch Online button below poster on mobile */
    .btn-watch-online {
        max-width: 200px;
        width: 100%;
        margin: var(--spacing-md) auto 0;
        padding: var(--spacing-md) var(--spacing-lg);
        position: static;
        transform: none;
        background: linear-gradient(135deg, #EF4444, #DC2626);
        border: 1px solid rgba(239, 68, 68, 0.3);
        border-radius: var(--radius-lg);
        color: white;
        box-shadow: none;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--spacing-md);
    }

    .btn-watch-online:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
    }

    .btn-watch-online .btn-label {
        font-size: 1rem;
    }

    .btn-watch-online i {
        font-size: 1.5rem;
    }

    .btn-watch-online .btn-source {
        font-size: 0.7rem;
        opacity: 0.9;
    }

    .title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .movie-title {
        font-size: 1.5rem;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        margin-bottom: var(--spacing-lg);
    }

    .footer-logo {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* Small mobile breakpoint (below 480px) */
@media (max-width: 480px) {
    .hero-title .title-line {
        font-size: 1.6rem;
    }

    .poster-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .movie-poster {
        width: 100%;
        max-width: 280px;
    }

    .btn-watch-online {
        max-width: 280px;
        width: 100%;
    }

    .meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    .meta-separator {
        display: none;
    }

    .crew-item {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    .external-ratings {
        flex-direction: column;
    }
}

/* 
═══════════════════════════════════════════════════════════════════════════════════════
UTILITY CLASSES
Reusable utility classes for quick styling
═══════════════════════════════════════════════════════════════════════════════════════
*/

/* Text utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Spacing utilities */
.mt-1 {
    margin-top: var(--spacing-sm);
}

.mt-2 {
    margin-top: var(--spacing-md);
}

.mt-3 {
    margin-top: var(--spacing-lg);
}

.mb-1 {
    margin-bottom: var(--spacing-sm);
}

.mb-2 {
    margin-bottom: var(--spacing-md);
}

.mb-3 {
    margin-bottom: var(--spacing-lg);
}

/* Display utilities */
.d-flex {
    display: flex;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-purple);
}

/* Selection styling */
::selection {
    background: rgba(139, 92, 246, 0.3);
    color: white;
}

/* Skeleton loader styles */
/* ================= IMDb Gallery ================= */
.imdb-showcase {
    margin-top: 80px
}

.showcase-header {
    text-align: center;
    margin-bottom: 20px
}

.showcase-header h2 {
    font-size: 2rem
}

.showcase-header p {
    opacity: .7
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px
}

.tab {
    padding: 10px 22px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: #1c1c1c;
    color: #fff
}

.tab.active {
    background: linear-gradient(135deg, #f5c518, #ffdd55);
    color: #000;
    font-weight: 600
}

.gallery-grid {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px
}

.gallery-grid.active {
    display: grid
}

.movie-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: #111;
    cursor: pointer;
    transition: .4s
}

.movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.movie-card:hover {
    transform: scale(1.06)
}

.movie-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .9), transparent 60%);
    opacity: 0;
    transition: .3s
}

.movie-card:hover .movie-overlay {
    opacity: 1
}

.movie-info {
    position: absolute;
    bottom: 14px;
    left: 14px;
    right: 14px
}

.movie-title {
    font-weight: 600;
    font-size: .95rem
}

.movie-meta {
    font-size: .8rem;
    opacity: .8
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #f5c518;
    color: #000;
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 700
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, .7);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px
}

/* 
═══════════════════════════════════════════════════════════════════════════════════════
RESPONSIVE DESIGN - MEDIA QUERIES
Mobile-first responsive breakpoints for all screen sizes
═══════════════════════════════════════════════════════════════════════════════════════
*/

/* Tablet and below (1024px) */
@media(max-width:1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr)
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .sidebar {
        display: none;
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-xl);
    }

    .hero-content {
        align-items: center;
    }

    .hero-subtitle {
        max-width: 100%;
    }

    .hero-stats {
        justify-content: center;
    }

    .floating-cards {
        width: 250px;
        height: 350px;
    }

    .card-1 {
        width: 150px;
        height: 225px;
    }

    .card-2 {
        width: 130px;
        height: 195px;
    }

    .card-3 {
        width: 120px;
        height: 180px;
    }
}

/* Mobile landscape and below (768px) */
@media(max-width:768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    /* Header adjustments - MOBILE OPTIMIZED */
    .header {
        height: auto;
        min-height: var(--header-height);
        padding: var(--spacing-sm) 0;
    }

    .header-container {
        padding: 0 var(--spacing-md);
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--spacing-xs);
        align-items: center;
        justify-content: space-between;
    }

    /* Row 1: Logo (left) + Search Bar (right) - Side by Side */
    .logo {
        font-size: 1.3rem;
        order: 1;
        flex: 0 0 auto;
    }

    .logo-icon {
        font-size: 1.5rem;
    }

    .mobile-menu-btn {
        display: none;
        /* Not needed, nav always visible */
    }

    /* Show mobile search bar on mobile devices */
    .mobile-search {
        display: block !important;
    }

    /* Hide desktop search bar on mobile */
    .search-container {
        display: none !important;
    }

    /* Row 2: Navigation Icons - FULL WIDTH - Forces new row */
    .nav-menu {
        display: flex;
        width: 100%;
        min-width: 100%;
        order: 3;
        flex-basis: 100%;
        flex-wrap: wrap;
        justify-content: space-around;
        gap: var(--spacing-xs);
        padding: var(--spacing-sm) 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        margin-top: var(--spacing-sm);
    }

    .nav-link {
        padding: var(--spacing-sm);
        font-size: 0.85rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        min-width: 60px;
        max-width: 80px;
    }

    .nav-link span {
        display: block;
        font-size: 0.7rem;
        text-align: center;
    }

    .nav-link i {
        font-size: 1.3rem;
    }

    /* Hero section mobile */
    .hero-section {
        padding: var(--spacing-lg) 0;
    }

    .title-line {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }

    .stat-item {
        min-width: 80px;
        padding: var(--spacing-sm);
    }

    .stat-item i {
        font-size: 1.2rem;
    }

    .stat-number {
        font-size: 1.2rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    /* Show floating cards on mobile - centered and smaller */
    .hero-visual {
        display: flex !important;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
        position: relative;
        margin: var(--spacing-lg) 0;
        order: 2;
        /* Ensure hero visual is visible on mobile */
        visibility: visible !important;
        opacity: 1 !important;
    }

    .hero-content {
        order: 1;
    }

    .floating-cards {
        width: 240px;
        height: 320px;
        /* Ensure floating cards container is visible */
        display: block !important;
        visibility: visible !important;
    }

    .card-1 {
        width: 160px;
        height: 240px;
        /* Ensure individual cards are visible */
        display: block !important;
        visibility: visible !important;
    }

    .card-2 {
        width: 140px;
        height: 210px;
        display: block !important;
        visibility: visible !important;
    }

    .card-3 {
        width: 130px;
        height: 195px;
        display: block !important;
        visibility: visible !important;
    }

    /* Recent searches mobile */
    .recent-searches {
        margin-top: var(--spacing-md);
    }

    .recent-label {
        font-size: 0.9rem;
    }

    .recent-list {
        gap: var(--spacing-xs);
    }

    /* Movie details mobile */
    .movie-content {
        flex-direction: column;
        padding: var(--spacing-md);
        gap: var(--spacing-lg);
    }

    .movie-poster {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }

    .poster-section {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .movie-title {
        font-size: 1.5rem;
    }

    .info-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Content padding - OPTIMIZED for compact 3-row header */
    .content-grid {
        padding: 0 var(--spacing-md);
    }

    .main-wrapper {
        padding-top: 160px;
        /* Accounts for compact 3-row mobile header */
        padding-bottom: var(--spacing-lg);
    }

    /* Gallery adjustments */
    .gallery-section {
        margin-top: var(--spacing-lg);
    }

    .section-heading {
        font-size: 1.2rem;
    }

    /* Advertisement sections - Mobile responsive */
    .sidebar {
        display: block !important;
        width: 100%;
        margin-top: var(--spacing-xl);
    }

    .ad-container.ad-sidebar {
        max-width: 300px;
        margin: 0 auto var(--spacing-lg);
    }

    .ad-placeholder {
        min-height: 250px;
    }

    .ad-container.ad-bottom {
        margin: var(--spacing-xl) auto;
        max-width: 100%;
    }

    .ad-placeholder-bottom {
        min-height: 90px;
        max-width: 728px;
        margin: 0 auto;
    }
}

/* Mobile portrait (480px) */
@media(max-width:480px) {
    .gallery-grid {
        grid-template-columns: 1fr
    }

    /* Header even more compact */
    .header-container {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo-icon {
        font-size: 1.2rem;
    }

    /* Navigation - keep labels but smaller */
    .nav-menu {
        gap: 2px;
    }

    .nav-link {
        padding: var(--spacing-xs);
        min-width: 55px;
        max-width: 75px;
    }

    .nav-link span {
        font-size: 0.65rem;
    }

    .nav-link i {
        font-size: 1.2rem;
    }

    /* Search bar more compact */
    .search-container {
        max-width: 180px;
    }

    .search-wrapper {
        padding: 4px var(--spacing-xs);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.12);
        border: 1.5px solid rgba(255, 255, 255, 0.25);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    .search-input {
        font-size: 0.8rem;
        padding: 2px 4px;
    }

    /* Add spacing between search and navigation */
    .search-container {
        margin-bottom: var(--spacing-sm);
    }

    .nav-menu {
        margin-top: var(--spacing-sm);
        padding-top: var(--spacing-sm);
    }

    .clear-btn,
    .search-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    /* Hero section very small screens */
    .title-line {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-stats {
        width: 100%;
    }

    .stat-item {
        flex: 1;
        min-width: 70px;
        padding: var(--spacing-xs);
    }

    .stat-number {
        font-size: 1rem;
    }

    /* Floating cards smaller */
    .floating-cards {
        width: 200px;
        height: 280px;
        display: block !important;
        visibility: visible !important;
    }

    .card-1 {
        width: 120px;
        height: 180px;
        display: block !important;
        visibility: visible !important;
    }

    .card-2 {
        width: 100px;
        height: 150px;
        display: block !important;
        visibility: visible !important;
    }

    .card-3 {
        width: 85px;
        height: 128px;
        display: block !important;
        visibility: visible !important;
    }

    /* Movie details */
    .movie-title {
        font-size: 1.3rem;
    }

    .movie-poster {
        max-width: 200px;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    /* Content padding - adjusted for mobile header */
    .content-grid {
        padding: 0 var(--spacing-sm);
    }

    .main-wrapper {
        padding-top: 150px;
        /* Adjusted for optimized header */
    }

    /* Advertisement - smaller on very small screens */
    .ad-container.ad-sidebar {
        max-width: 250px;
    }

    .ad-placeholder {
        min-height: 200px;
    }

    .ad-placeholder-bottom {
        min-height: 60px;
        max-width: 320px;
    }
}

/* Very small screens (360px) */
@media(max-width:360px) {
    .title-line {
        font-size: 1.3rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
    }

    .stat-item {
        min-width: 60px;
    }

    .stat-number {
        font-size: 0.9rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .floating-cards {
        width: 170px;
        height: 240px;
        display: block !important;
        visibility: visible !important;
    }

    .card-1 {
        width: 105px;
        height: 158px;
        display: block !important;
        visibility: visible !important;
    }

    .card-2 {
        width: 88px;
        height: 132px;
        display: block !important;
        visibility: visible !important;
    }

    .card-3 {
        width: 75px;
        height: 113px;
        display: block !important;
        visibility: visible !important;
    }
}