:root {
    /* Color Scheme */
    --primary: #E50914; /* Netflix Red style */
    --primary-hover: #c40812;
    --secondary: #111111;
    --accent: #FFD700;
    --bg-color: #FFFFFF;
    --bg-alt: #f4f4f5;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #e5e5e5;
    --card-bg: #FFFFFF;
    
    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Roboto', sans-serif;
    
    /* Variables */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 24px rgba(0,0,0,0.12);
    --radius: 8px;
    --container-width: 1200px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-color: #0a0a0a;
    --bg-alt: #1a1a1a;
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    --border-color: #333333;
    --card-bg: #111111;
    --secondary: #222222;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 24px rgba(0,0,0,0.5);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
    color: var(--text-main);
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
}

.btn-accent {
    background-color: var(--accent);
    color: var(--secondary);
}

.btn-accent:hover {
    background-color: #e6c200;
    transform: translateY(-2px);
}

/* Top Bar */
.top-bar {
    background-color: var(--secondary);
    color: #fff;
    font-size: 13px;
    padding: 8px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links a {
    color: #ccc;
    margin-left: 15px;
    font-weight: 500;
}

.social-links a:hover {
    color: var(--accent);
}

/* Header */
.site-header {
    background-color: var(--bg-color);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 100;
    transition: background-color 0.3s ease;
}

.site-header.sticky {
    position: sticky;
    top: -40px; /* Hide top bar, show main header */
}

.main-header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
}

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

.header-ads {
    background-color: var(--bg-alt);
    border: 1px dashed var(--border-color);
    width: 728px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    display: none; /* Hide on small screens */
}

@media(min-width: 992px) {
    .header-ads {
        display: flex;
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-alt);
    transition: var(--transition);
}

.dark-mode-toggle:hover {
    background-color: var(--border-color);
}

[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
:root:not([data-theme="dark"]) .sun-icon { display: none; }

/* Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    flex-direction: column;
    justify-content: space-between;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: var(--transition);
}

@media(max-width: 991px) {
    .menu-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        box-shadow: var(--shadow-md);
        padding: 20px 0;
    }
    .main-nav.active { display: block; }
    .menu {
        flex-direction: column;
        align-items: center;
    }
    .menu li { margin: 10px 0; }
}

/* Navigation */
.main-nav {
    background-color: var(--bg-color);
}

.menu {
    display: flex;
    justify-content: center;
}

.menu li a {
    display: block;
    padding: 15px 20px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    position: relative;
}

.menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 3px;
    background-color: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.menu li a:hover::after, .menu li a.active::after {
    transform: scaleX(1);
}

/* Breaking News Ticker */
.breaking-news {
    background-color: var(--bg-alt);
    border-bottom: 1px solid var(--border-color);
}

.breaking-news .container {
    display: flex;
    align-items: center;
}

.ticker-label {
    background-color: var(--primary);
    color: #fff;
    padding: 8px 15px;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    white-space: nowrap;
}

.ticker-content {
    flex-grow: 1;
    padding: 0 15px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 30px;
    padding-bottom: 50px;
}

@media(min-width: 992px) {
    .main-layout {
        grid-template-columns: 2.5fr 1fr;
    }
}

/* Hero Section */
.hero-section {
    margin-bottom: 40px;
}

.slide {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/9;
}

.slide::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.slide:hover .slide-image img {
    transform: scale(1.05);
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 30px;
    z-index: 10;
    color: #fff;
}

.category {
    background-color: var(--primary);
    color: #fff;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 10px;
    display: inline-block;
}

.slide-content h2 {
    color: #fff;
    font-size: 28px;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.slide-content h2 a {
    color: #fff;
}

.slide-content h2 a:hover {
    color: var(--accent);
}

.slide-content p {
    font-size: 15px;
    opacity: 0.9;
    margin-bottom: 15px;
    display: none;
}

@media(min-width: 768px) {
    .slide-content h2 { font-size: 36px; }
    .slide-content p { display: block; max-width: 80%; }
}

.meta {
    font-size: 13px;
    color: #ccc;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.section-header h2 {
    font-size: 24px;
    margin-bottom: 0;
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary);
}

.view-all {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

/* Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

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

.placeholder-img {
    width: 100%;
    height: 100%;
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}

.badge.accent {
    background-color: var(--accent);
    color: #111;
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

/* Sidebar Widgets */
.widget {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.widget h3 {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.widget h3::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

/* Social Grid Widget */
.social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.social-grid a {
    display: block;
    padding: 10px;
    text-align: center;
    color: #fff;
    font-weight: 600;
    border-radius: 4px;
    font-size: 14px;
}

.fb { background-color: #1877F2; }
.tw { background-color: #1DA1F2; }
.yt { background-color: #FF0000; }
.ig { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }

/* Trending List */
.trending-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}

.trending-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.trending-list .number {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--border-color);
    margin-right: 15px;
    line-height: 1;
}

.trending-list a {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
}

/* Ad Spaces */
.ad-space {
    background-color: var(--bg-alt);
    border: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
}

.banner-ad {
    width: 100%;
    height: 90px;
    margin: 40px 0;
}

.ad-widget {
    height: 250px;
    padding: 0;
}

/* Video Section */
.video-section {
    margin-top: 40px;
}

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

.video-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(229, 9, 20, 0.9);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: var(--transition);
    cursor: pointer;
}

.video-card:hover .play-btn {
    transform: translate(-50%, -50%) scale(1.1);
}

.video-card h3 {
    padding: 15px 20px;
    font-size: 16px;
}

/* Newsletter Widget */
.newsletter-widget p {
    font-size: 14px;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.newsletter-widget input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 10px;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
}

.newsletter-widget button {
    width: 100%;
}

/* Footer */
.site-footer {
    background-color: var(--secondary);
    color: #fff;
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 15px;
}

.footer-logo span {
    color: #fff;
}

.footer-col p {
    color: #aaa;
    font-size: 14px;
}

.footer-col h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #aaa;
    font-size: 14px;
}

.footer-col ul li a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-bottom {
    background-color: #000;
    padding: 20px 0;
    text-align: center;
    color: #777;
    font-size: 14px;
}

/* Newsletter Popup Overlay */
.newsletter-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.newsletter-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.newsletter-popup-content {
    background-color: var(--bg-color);
    padding: 40px;
    border-radius: var(--radius);
    max-width: 500px;
    width: 90%;
    position: relative;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.newsletter-popup-overlay.show .newsletter-popup-content {
    transform: translateY(0);
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

.popup-inner h2 {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 10px;
}

.popup-inner p {
    margin-bottom: 25px;
    color: var(--text-muted);
}

.popup-inner input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 15px;
    font-family: var(--font-body);
    font-size: 16px;
    background-color: var(--bg-alt);
    color: var(--text-main);
}

.popup-inner input:focus {
    outline: none;
    border-color: var(--primary);
}

.popup-inner button {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border-radius: var(--radius);
}

.no-thanks {
    display: inline-block;
    margin-top: 15px;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
}

.no-thanks:hover {
    color: var(--text-main);
}
