/**
 * MovieGuy Main Stylesheet
 * 
 * Design inspired by itagent.com
 * Features:
 * - Dark mode as default
 * - Light/Dark mode toggle with cookie storage
 * - Responsive design
 * - Fast loading animations
 * - Modern UI components
 */

/* ============================================
   CSS VARIABLES - THEME COLORS
   ============================================ */

/* Dark Mode (Default) */
:root[data-bs-theme="dark"] {
    /* Primary Colors */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #818cf8;
    
    /* Background Colors */
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #252542;
    --bg-card: #1e1e32;
    --bg-hover: #2a2a4a;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b7280;
    
    /* Border Colors */
    --border-color: #2d2d4a;
    --border-light: #3d3d5a;
    
    /* Accent Colors */
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-info: #3b82f6;
    
    /* Gradient */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-hero: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #252542 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
    
    /* Navbar */
    --navbar-bg: rgba(15, 15, 26, 0.95);
    --navbar-border: rgba(255, 255, 255, 0.05);
}

/* Light Mode */
:root[data-bs-theme="light"] {
    /* Primary Colors */
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #6366f1;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-hover: #e2e8f0;
    
    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    /* Border Colors */
    --border-color: #e2e8f0;
    --border-light: #cbd5e1;
    
    /* Accent Colors */
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-info: #3b82f6;
    
    /* Gradient */
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --gradient-hero: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    
    /* Navbar */
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --navbar-border: rgba(0, 0, 0, 0.05);
}

/* ============================================
   BASE STYLES
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--navbar-border);
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    z-index: 1030;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary) !important;
}

.brand-icon {
    color: var(--primary-color);
    font-size: 1.75rem;
}

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

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--text-primary) !important;
    background: var(--bg-hover);
}

.navbar-spacer {
    height: 76px;
}

/* Search Form */
.search-form {
    position: relative;
}

.search-input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 0.5rem 0 0 0.5rem !important;
    padding: 0.5rem 1rem;
    min-width: 200px;
}

.search-input:focus {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
}

.btn-search {
    background: var(--gradient-primary);
    border: none;
    color: white;
    border-radius: 0 0.5rem 0.5rem 0 !important;
    padding: 0.5rem 1rem;
}

.btn-search:hover {
    opacity: 0.9;
    color: white;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
    transform: rotate(20deg);
}

/* Login Button */
.btn-login {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
}

.btn-login:hover {
    opacity: 0.9;
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    min-height: calc(100vh - 76px - 300px);
    padding-bottom: 3rem;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    background: var(--gradient-hero);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="%236366f1" stroke-width="0.5" opacity="0.1"/></svg>');
    background-size: 100px 100px;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ============================================
   CAROUSEL SECTION
   ============================================ */

.carousel-section {
    position: relative;
    margin-top: -76px; /* Overlap navbar */
    padding-top: 76px;
}

.carousel-section .carousel-item {
    height: 70vh;
    min-height: 500px;
    max-height: 700px;
}

.carousel-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, var(--bg-primary) 0%, rgba(15, 15, 26, 0.7) 40%, rgba(15, 15, 26, 0.3) 100%);
}

.carousel-caption {
    position: absolute;
    bottom: 15%;
    left: 5%;
    right: 5%;
    text-align: left;
    z-index: 10;
}

.carousel-caption h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    max-width: 700px;
}

.carousel-caption p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 600px;
    line-height: 1.6;
}

.carousel-indicators button {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    margin: 0 6px !important;
    background-color: rgba(255, 255, 255, 0.5) !important;
    border: none !important;
}

.carousel-indicators button.active {
    background-color: var(--primary-color) !important;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.7;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .carousel-section .carousel-item {
        height: 50vh;
        min-height: 350px;
    }
    
    .carousel-caption h1 {
        font-size: 1.75rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
        display: none;
    }
}

/* ============================================
   SECTION HEADERS
   ============================================ */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.view-all-link {
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-all-link:hover {
    gap: 0.75rem;
}

/* ============================================
   MOVIE CARDS
   ============================================ */

.movie-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 576px) {
    .movie-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 768px) {
    .movie-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 992px) {
    .movie-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .movie-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 1.5rem;
    }
}

.movie-card {
    background: var(--bg-card);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.movie-poster {
    position: relative;
    padding-top: 150%; /* 2:3 Aspect Ratio */
    overflow: hidden;
}

.movie-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.05);
}

.movie-rating {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    color: #fbbf24;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.movie-quality {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.movie-info {
    padding: 1rem;
}

.movie-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.movie-year {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ============================================
   FEATURED MOVIE (Hero Card)
   ============================================ */

.featured-movie {
    background: var(--bg-card);
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .featured-movie {
        flex-direction: row;
        min-height: 400px;
    }
}

.featured-backdrop {
    position: relative;
    flex: 1;
    min-height: 250px;
}

.featured-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-backdrop::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, var(--bg-card) 0%, transparent 50%);
}

@media (min-width: 768px) {
    .featured-backdrop::after {
        background: linear-gradient(to right, var(--bg-card) 0%, transparent 50%);
    }
}

.featured-content {
    padding: 2rem;
    flex: 0 0 100%;
}

@media (min-width: 768px) {
    .featured-content {
        flex: 0 0 400px;
    }
}

.featured-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.featured-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.featured-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.featured-overview {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.featured-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary-custom {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    opacity: 0.9;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary-custom {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-secondary-custom:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ============================================
   MOVIE DETAILS PAGE
   ============================================ */

.movie-details-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    padding: 3rem 0;
}

.movie-details-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

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

.movie-details-backdrop::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, var(--bg-primary) 0%, rgba(15, 15, 26, 0.8) 50%, rgba(15, 15, 26, 0.4) 100%);
}

.movie-details-content {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.movie-details-poster {
    flex: 0 0 300px;
}

.movie-details-poster img {
    width: 100%;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.movie-details-info {
    flex: 1;
    min-width: 300px;
}

.movie-details-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.movie-details-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.movie-details-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.movie-details-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.rating-stars {
    color: #fbbf24;
}

.rating-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.movie-details-overview {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.movie-details-genres {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.genre-tag {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.genre-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Download Section */
.download-section {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid var(--border-color);
}

.download-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.download-table {
    width: 100%;
}

.download-table th,
.download-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.download-table th {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
}

.download-table td {
    color: var(--text-primary);
}

.btn-download {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-download:hover {
    opacity: 0.9;
    color: white;
    transform: translateY(-2px);
}

/* ============================================
   CAST SECTION
   ============================================ */

.cast-section {
    margin-top: 3rem;
}

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

.cast-card {
    text-align: center;
}

.cast-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 0.75rem;
    border: 2px solid var(--border-color);
}

.cast-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cast-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.cast-character {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* ============================================
   SIMILAR MOVIES
   ============================================ */

.similar-section {
    margin-top: 3rem;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination {
    display: flex;
    gap: 0.5rem;
}

.page-link {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.page-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: white;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-brand .brand-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

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

.footer-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 0.5rem;
}

.footer-divider {
    border-color: var(--border-color);
    margin: 2rem 0;
}

.copyright {
    color: var(--text-secondary);
    margin: 0;
}

.attribution {
    color: var(--text-muted);
    margin: 0;
}

.attribution a {
    color: var(--primary-color);
}

/* ============================================
   MODAL STYLES
   ============================================ */

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.modal-title {
    font-weight: 700;
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
}

.btn-close {
    filter: invert(1);
    opacity: 0.5;
}

.btn-close:hover {
    opacity: 1;
}

/* Auth Tabs */
.nav-pills .nav-link {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 0.5rem;
    font-weight: 600;
}

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

/* Form Styles */
.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-text {
    color: var(--text-muted);
}

.form-check-input {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

.form-check-input:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   LOADING STATES
   ============================================ */

.loading-skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.5rem;
}

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

/* Lazy Load Images */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    border-radius: 0.5rem;
    border: none;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-warning);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-info);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--bg-secondary);
        padding: 1rem;
        border-radius: 1rem;
        margin-top: 1rem;
    }
    
    .search-form {
        margin: 1rem 0;
    }
    
    .search-input {
        min-width: auto;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .movie-details-title {
        font-size: 1.75rem;
    }
    
    .movie-details-poster {
        flex: 0 0 200px;
    }
}

@media (max-width: 767.98px) {
    .navbar-spacer {
        height: 70px;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .movie-details-hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .movie-details-poster {
        flex: 0 0 150px;
    }
    
    .movie-details-title {
        font-size: 1.5rem;
    }
    
    .featured-title {
        font-size: 1.5rem;
    }
    
    .download-table {
        font-size: 0.875rem;
    }
    
    .download-table th,
    .download-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .scroll-to-top {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        bottom: 1rem;
        right: 1rem;
    }
}

@media (max-width: 575.98px) {
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cast-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .featured-buttons {
        flex-direction: column;
    }
    
    .btn-primary-custom,
    .btn-secondary-custom {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease forwards;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

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

/* ============================================
   SELECTION
   ============================================ */

::selection {
    background: var(--primary-color);
    color: white;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

.bg-gradient {
    background: var(--gradient-primary);
}

.border-gradient {
    border-image: var(--gradient-primary) 1;
}

.shadow-card {
    box-shadow: var(--shadow-card);
}

/* No results message */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--border-light);
}

.no-results h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* ============================================
   SEARCH PAGE - SPACIOUS LAYOUT
   ============================================ */

.search-hero {
    background: var(--gradient-hero);
    padding: 4rem 0 3rem;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.search-hero-content {
    text-align: center;
    margin-bottom: 2.5rem;
}

.search-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.search-hero-title i {
    color: var(--primary-color);
    font-size: 2rem;
}

.search-hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0;
}

.search-query {
    color: var(--primary-color);
    font-weight: 600;
}

/* Search Box - Clean & Spacious */
.search-box-wrapper {
    max-width: 800px;
    margin: 0 auto 2rem;
}

.search-box-form {
    display: flex;
    gap: 1rem;
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1.125rem;
}

.search-box-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    color: var(--text-primary);
    padding: 1rem 3rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.search-box-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.search-clear {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.search-clear:hover {
    color: var(--text-primary);
}

.search-filters {
    display: flex;
    gap: 0.75rem;
}

.search-select {
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    color: var(--text-primary);
    padding: 0 2.5rem 0 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.search-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-submit {
    background: var(--gradient-primary);
    border: none;
    color: white;
    width: 50px;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-submit:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Quick Filters */
.quick-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.quick-filter-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.quick-filter {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.quick-filter:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    text-decoration: none;
}

.quick-filter.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Results Section */
.results-section {
    padding: 3rem 0 5rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.results-count {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.results-sort {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.results-sort select {
    min-width: 140px;
}

/* Results Grid - Better Spacing */
.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 576px) {
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 768px) {
    .results-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) {
    .results-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Result Card - Enhanced */
.result-card {
    background: var(--bg-card);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.result-card-link {
    display: block;
    color: inherit;
}

.result-card-link:hover {
    color: inherit;
    text-decoration: none;
}

.result-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.result-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.result-card:hover .result-poster img {
    transform: scale(1.05);
}

.result-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.result-card:hover .result-overlay {
    opacity: 1;
}

.view-details {
    background: var(--gradient-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.result-card:hover .view-details {
    transform: translateY(0);
}

.content-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.result-info {
    padding: 1.25rem;
}

.result-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

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

.result-rating {
    color: #fbbf24;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.empty-icon {
    width: 100px;
    height: 100px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.empty-icon.no-results {
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.empty-state > p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.trending-searches {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.trending-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.trending-tag {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.trending-tag:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

.suggestions {
    background: var(--bg-tertiary);
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.suggestions-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
    color: var(--text-secondary);
}

.suggestions li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.suggestions li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0.5rem;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.page-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--primary-color);
    text-decoration: none;
}

.page-item.active .page-link {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: white;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .search-hero {
        padding: 2rem 0;
    }
    
    .search-hero-title {
        font-size: 1.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-box-form {
        flex-direction: column;
    }
    
    .search-filters {
        justify-content: stretch;
    }
    
    .search-select {
        flex: 1;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .results-grid {
        gap: 1rem;
    }
    
    .result-info {
        padding: 1rem;
    }
}