/* =============================================
   DuskFlick — CSS
   Premium Entertainment Hub
   Dark theme optimized for ad/affiliate sites
   Research-backed layout (2026 best practices)
   ============================================= */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #1a1a24;
    --bg-elevated: #222230;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --text-muted: #6a6a78;
    --accent-1: #667eea;
    --accent-2: #764ba2;
    --accent-3: #f5576c;
    --accent-4: #4facfe;
    --accent-cta: #ff6b35; /* orange/red for CTAs — 21-34% higher conversion per research */
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --border: rgba(255,255,255,0.06);
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-hover: 0 8px 32px rgba(0,0,0,0.5);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --sidebar-width: 320px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a:hover {
    color: var(--accent-1);
}

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

/* ---------- Container ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---------- Header ---------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10,10,15,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(10,10,15,0.98);
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
}

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

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

.nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.4rem 0.8rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
}

.nav-cta {
    display: flex;
    align-items: center;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* ---------- Mobile Menu ---------- */
.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(10,10,15,0.98);
    backdrop-filter: blur(20px);
    padding: 1rem;
    z-index: 999;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0.5rem;
}

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

.mobile-menu-link {
    padding: 0.8rem 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.mobile-menu-link:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-cta); /* Research: orange/red CTA = 21-34% higher conversion */
    color: white;
    box-shadow: 0 2px 12px rgba(255,107,53,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255,107,53,0.4);
    color: white;
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1rem;
}

/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 1.5rem 60px;
    background: radial-gradient(ellipse at 50% 30%, rgba(102,126,234,0.15) 0%, var(--bg-primary) 70%);
    position: relative;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

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

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- Ad Slots ---------- */
.ad-slot {
    text-align: center;
    margin: 1rem 0;
}

.ad-placeholder {
    background: var(--bg-elevated);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder-728 {
    min-height: 90px;
}

.ad-placeholder-300 {
    min-height: 250px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.ad-placeholder-300 {
    writing-mode: horizontal-tb;
    text-align: center;
    min-height: 600px;
}

.ad-placeholder-320 {
    min-height: 50px;
    max-width: 320px;
    margin: 0 auto;
}

.ad-banner-top {
    margin-top: 1rem;
}

.ad-banner {
    max-width: 100%;
}

.ad-banner-300 {
    margin: 0.5rem 0;
}

/* ---------- Sections ---------- */
.section {
    padding: 6rem 0;
}

.section-alt {
    background: var(--bg-secondary);
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 3rem;
}

/* ---------- Grid ---------- */
.grid {
    display: grid;
    gap: 1.5rem;
}

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

/* ---------- Main Layout: Content + Sidebar ---------- */
.main-layout {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    gap: 2rem;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: 90px;
    height: fit-content;
}

/* ---------- Sticky Sidebar Ad ---------- */
.sticky-ad-300 {
    position: sticky;
    top: 90px;
    z-index: 100;
    margin-bottom: 1.5rem;
}

/* ---------- Sidebar Sections ---------- */
.sidebar-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sidebar-link {
    display: block;
    padding: 0.5rem 0.8rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border-left: 2px solid var(--border);
}

.sidebar-link:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.04);
    border-left-color: var(--accent-1);
}

.sidebar-newsletter {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.newsletter-input {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.newsletter-input:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 2px rgba(102,126,234,0.2);
}

.sidebar-social {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--accent-1);
    color: white;
}

/* ---------- Cards ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(102,126,234,0.3);
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.card-image {
    height: 180px;
    background-size: cover;
    background-position: center;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.card-link {
    font-weight: 600;
    font-size: 0.9rem;
}

.card-compact {
    grid-column: span 1;
}

.card-compact .card-image {
    height: 120px;
}

.card-deal {
    border: 1px solid rgba(255,107,53,0.2); /* CTA accent for deals section */
}

.card-deal:hover {
    border-color: rgba(255,107,53,0.4);
}

.card-affiliate {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.card-stat {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

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

/* ---------- Badges ---------- */
.badge {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    margin-bottom: 0.8rem;
}

.badge-hot {
    background: rgba(245,87,108,0.2);
    color: var(--accent-3);
}

.badge-new {
    background: rgba(79,172,254,0.2);
    color: var(--accent-4);
}

/* ---------- Affiliate Links ---------- */
.affiliate-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
}

.affiliate-link {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--accent-cta); /* Orange/red CTA links */
    transition: var(--transition);
}

.affiliate-link:hover {
    background: rgba(255,107,53,0.1);
    border-color: var(--accent-cta);
    color: var(--accent-cta);
}

/* ---------- About ---------- */
.about-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

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

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

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    width: 100%;
}

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

.footer-legal {
    margin-top: 0.5rem;
}

.footer-link {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-link:hover {
    color: var(--text-secondary);
}

/* ---------- Sticky Bottom Bottom Banner (Mobile/All) ---------- */
.ad-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    height: 50px;
    background: var(--bg-elevated);
    display: none;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--border);
}

.ad-sticky.show {
    display: flex;
}

/* ---------- Scroll animations ---------- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    
    /* Hide sidebar on tablet */
    .sidebar { display: none; }
    .main-layout { flex-direction: column; }
}

@media (max-width: 768px) {
    .nav { display: none; }
    .nav-cta { display: none; }
    .mobile-menu-btn { display: block; }
    
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    
    .hero {
        min-height: auto;
        padding: 100px 1.5rem 50px;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .grid-4 { grid-template-columns: 1fr; }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
}