:root {
    --bg-color: #f5f5f7;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --primary: #000000;
    --primary-hover: #333333;
    --secondary: #0071e3;
    --text-main: #1d1d1f;
    --text-muted: #86868b;
    --card-bg: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 4px 14px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
}

body.dark-mode {
    --bg-color: #000000;
    --nav-bg: rgba(0, 0, 0, 0.85);
    --primary: #ffffff;
    --primary-hover: #e0e0e0;
    --text-main: #f5f5f7;
    --text-muted: #a1a1a6;
    --card-bg: #1d1d1f;
    --glass-bg: rgba(28, 28, 30, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 4px 14px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 12px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.navbar.scrolled {
    background: var(--nav-bg);
    box-shadow: var(--shadow-sm);
    padding: 10px 5%;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.logo span {
    font-weight: 400;
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 35px;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: opacity 0.3s;
    opacity: 0.7;
}

.nav-links a:hover, .nav-links a.active {
    opacity: 1;
}

/* Dropdown */
.nav-links li {
    position: relative;
}

.nav-links li.dropdown {
    padding-bottom: 20px;
    margin-bottom: -20px; /* Neutralize the padding so it doesn't break flex alignment */
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    backdrop-filter: saturate(180%) blur(20px);
    min-width: 180px;
    box-shadow: var(--shadow-sm);
    border-radius: 12px;
    padding: 8px 0;
    z-index: 1001;
    border: 1px solid var(--glass-border);
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease;
}

.dropdown-content li {
    list-style: none;
}

.dropdown-content li a {
    color: var(--text-main) !important;
    padding: 10px 20px;
    display: block;
    opacity: 0.8 !important;
    text-align: left;
    white-space: nowrap;
}

.dropdown-content li a:hover {
    background: var(--glass-border);
    opacity: 1 !important;
}

/* Custom Scrollbar for Dropdown */
.dropdown-content::-webkit-scrollbar {
    width: 6px;
}
.dropdown-content::-webkit-scrollbar-track {
    background: transparent;
}
.dropdown-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}
.dropdown-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.btn-login {
    background: var(--primary);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-login:hover {
    background: var(--primary-hover);
}

/* Search Form */
.search-form {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 20px;
    padding: 6px 14px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin-right: 20px;
    border: 1px solid transparent;
}

.search-form:focus-within {
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--glass-border);
}

.search-form input {
    background: transparent;
    border: none;
    color: var(--text-main);
    outline: none;
    width: 140px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-form input::placeholder {
    color: var(--text-muted);
}

.search-form input:focus {
    width: 220px;
}

.search-form button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.search-form:focus-within button {
    color: var(--primary);
}

/* Hero Section */
.hero {
    height: 85vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    position: relative;
    background: var(--bg-color);
    overflow: hidden;
}

/* Apple style large background element */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 70%;
    height: 140%;
    background: var(--glass-bg);
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.7;
}

.hero-overlay {
    display: none; /* No dark overlay for light theme */
}

.hero-content {
    max-width: 700px;
    z-index: 2;
    position: relative;
}

.badge {
    display: inline-block;
    background: rgba(0, 113, 227, 0.1);
    color: var(--secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 25px;
}

.hero h1 {
    font-size: 72px;
    line-height: 1.05;
    margin-bottom: 25px;
    font-weight: 800;
    letter-spacing: -2px;
    color: var(--text-main);
}

.hero p {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.5;
    font-weight: 400;
    max-width: 550px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 14px 32px;
    border-radius: 30px; /* Apple pill shape */
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid #d2d2d7;
}

.btn-secondary:hover {
    background: #f5f5f7;
}

/* Catalog */
.catalog {
    padding: 30px 5% 80px 5%;
    position: relative;
    z-index: 2;
    background: var(--bg-color);
}

.catalog h2 {
    font-size: 32px;
    margin-bottom: 40px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Home Carousels */
.home-catalog {
    padding: 60px 0;
    background: var(--bg-color);
    position: relative;
    z-index: 2;
}

.category-row {
    margin-bottom: 40px;
    padding-left: 5%;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-right: 5%;
}

.category-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.see-all {
    font-size: 14px;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
}

.carousel-container {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.carousel-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.carousel-track {
    display: inline-flex;
    gap: 20px;
    padding-right: 5%;
}

.carousel-card {
    display: inline-block;
    width: 280px;
    background: transparent;
    overflow: visible;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    text-decoration: none;
}

.carousel-card:hover {
    transform: translateY(-5px) scale(1.02);
}

.card-image-horizontal {
    width: 100%;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: box-shadow 0.4s ease;
}

.carousel-card:hover .card-image-horizontal {
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.carousel-info {
    padding: 12px 4px;
}

.carousel-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 15px;
}

.movie-card {
    background: transparent;
    overflow: visible;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    text-decoration: none;
}

.movie-card:hover {
    transform: translateY(-5px);
}

.card-image {
    width: 100%;
    aspect-ratio: 2/3;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.4s ease;
}

.movie-card:hover .card-image {
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.placeholder-img {
    background: linear-gradient(135deg, #e5e5ea, #f2f2f7);
}

.card-info {
    padding: 8px 4px 0 4px;
}

.card-info h3 {
    font-size: 14px;
    margin-bottom: 2px;
    font-weight: 600;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

.card-info span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Ticker Statistics */
.stats-ticker-container {
    width: 100%;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    padding: 12px 0;
    margin-bottom: 20px;
    display: flex;
    white-space: nowrap;
    position: relative;
    z-index: 10;
}

.stats-ticker {
    display: flex;
    align-items: center;
    animation: scrollTicker 35s linear infinite;
    width: max-content;
}

.stats-ticker:hover {
    animation-play-state: paused;
}

.ticker-item {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    padding: 0 25px;
    letter-spacing: 0.2px;
}

.ticker-item strong {
    color: var(--text-main);
    margin-left: 6px;
    font-weight: 700;
}

.ticker-separator {
    color: var(--text-muted);
    font-size: 14px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #34c759;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(52, 199, 89, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}

@keyframes scrollTicker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        padding: 10px 5%;
    }
    
    .nav-links {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
        margin-top: 10px;
    }
    
    .user-menu {
        width: 100%;
        margin-top: 10px;
        justify-content: space-between;
    }
    
    .search-container {
        flex: 1;
        margin-right: 10px;
    }
    
    .search-input {
        width: 100% !important;
    }
    
    .hero {
        padding: 100px 5% 40px 5%;
        height: auto;
        min-height: 60vh;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
    
    .hero-content {
        margin: 0 auto;
    }
    
    .hero h1 {
        font-size: 38px;
        letter-spacing: -1px;
    }
    
    .hero p {
        font-size: 16px;
        margin: 0 auto 30px auto;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }
    
    .stats-ticker-container {
        padding: 8px 0;
    }
    
    .ticker-item {
        font-size: 12px;
        padding: 0 15px;
    }
}
@media (max-width: 768px) { .carousel-card { width: 220px; } }
