:root {
    --bg-color: #141414;
    --card-bg: #1f1f1f;
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --accent: #E50914;
    --nav-height: 70px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Navbar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4%;
    height: var(--nav-height);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background 0.3s;
}

nav:hover {
    background: #000;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 1px;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    padding: 5px 15px;
    border-radius: 4px;
}

.search-box input {
    background: transparent;
    border: none;
    color: white;
    padding: 5px;
    outline: none;
}

.search-box button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 80vh;
    width: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 0 4%;
    position: relative;
    margin-bottom: -50px;
    /* Slight overlap */
}

.hero-content {
    max-width: 600px;
    z-index: 10;
    margin-top: 50px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-overview {
    font-size: 1.1rem;
    color: #e5e5e5;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 10px 25px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

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

.btn-primary {
    background-color: var(--text-primary);
    color: black;
    border: none;
}

.btn-secondary {
    background-color: rgba(109, 109, 110, 0.7);
    color: white;
    border: none;
}

/* Categories */
.category-bar {
    display: flex;
    gap: 15px;
    padding: 0 4%;
    overflow-x: auto;
    margin-bottom: 30px;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.category-bar::-webkit-scrollbar {
    display: none;
}

.category-chip {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.category-chip:hover {
    background: white;
    color: black;
}

/* Sections */
main {
    padding: 20px 4%;
}

.movie-section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Horizontal Scroll Container */
.scroll-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 20px;
    scrollbar-color: var(--accent) #333;
    scrollbar-width: thin;
}

.card {
    min-width: 180px;
    /* Fixed width for standard cards */
    max-width: 180px;
    border-radius: 4px;
    transition: transform 0.3s, z-index 0.3s;
    position: relative;
    cursor: pointer;
}

.card:hover {
    transform: scale(1.1);
    z-index: 50;
}

.card img {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.card-info {
    margin-top: 8px;
}

.card-info h3 {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
}

.rating {
    font-size: 0.8rem;
    color: #46d369;
    /* Match green match rating style */
    font-weight: 600;
}

/* Grid Layout (Reuse for Search/All) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.small-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

/* Watch Page */
.watch-container {
    margin-top: 80px;
    /* Offset for fixed nav */
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.iframe-container {
    width: 100%;
    padding-bottom: 56.25%;
    position: relative;
    background: #000;
    box-shadow: 0 0 50px rgba(229, 9, 20, 0.2);
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.movie-details {
    padding: 30px 0;
}

.movie-details h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.meta {
    display: flex;
    gap: 15px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.badge {
    border: 1px solid #666;
    padding: 2px 6px;
}

footer {
    text-align: center;
    padding: 50px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}