/* 
=========================================================
MODERN CINEMATIC UI - "StreamHub" Design System
Inspired by Netflix & IMDB
=========================================================
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Sinhala:wght@600;700;800;900&display=swap');

:root {
    /* --- Modern Palette --- */
    --primary: #3b82f6; /* Modern Blue */
    --primary-hover: #2563eb;
    --accent: #f5c518; /* IMDB Yellow for ratings */
    
    /* --- Backgrounds --- */
    --bg-black: #060606;
    --bg-dark: #0f1115;
    --bg-card: #1a1d23;
    --bg-glass: rgba(15, 17, 21, 0.8);
    
    /* --- Borders & Shadows --- */
    --border-glass: 1px solid rgba(255, 255, 255, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    
    /* --- Typography --- */
    --font-main: 'Inter', sans-serif;
    --text-white: #ffffff;
    --text-gray: #94a3b8;
    --text-muted: #64748b;
    
    /* --- Transitions --- */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 1. RESET & BASE --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-black);
    color: var(--text-white);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: inherit; }

/* --- 2. LAYOUT --- */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- 3. HEADER & NAVIGATION --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 100%);
    transition: var(--transition);
    padding: 16px 0;
}

.main-header.scrolled {
    background: var(--bg-black);
    padding: 12px 0;
    border-bottom: var(--border-glass);
    box-shadow: var(--shadow-lg);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.logo {
    font-size: 28px; /* Slightly larger for this specific font */
    font-weight: 800;
    font-family: 'Noto Serif Sinhala', serif;
    letter-spacing: 0px;
    background: linear-gradient(135deg, #f5c518 0%, #eab308 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 15px rgba(245, 197, 24, 0.3); /* Subtle gold glow */
}

/* Nav Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-gray);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-white);
}

/* Search Bar */
.search-bar {
    flex: 1;
    max-width: 480px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 16px 10px 44px;
    color: var(--text-white);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-gray);
    pointer-events: none;
}

/* User Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
}

/* --- 4. TOP BILLBOARD BLOCK (Hero + Trending Sidebar) --- */
.top-billboard-block {
    margin-top: 100px;
    margin-bottom: 40px;
}

.billboard-row {
    display: flex;
    gap: 20px;
    height: 550px; /* Unified Height */
}

/* Left Col: Main Hero */
.main-hero-col {
    flex: 3;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-black);
    border: var(--border-glass);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s;
    display: flex;
    align-items: center;
}

.hero-slide.active { opacity: 1; visibility: visible; z-index: 10; }

.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.5); }

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(6, 6, 6, 0.9) 10%, rgba(6,6,6,0.3) 50%, transparent 100%),
                linear-gradient(to top, rgba(6,6,6,0.8) 0%, transparent 40%);
}

.hero-content-inner {
    padding: 0 40px;
    max-width: 550px;
    text-align: left;
    z-index: 20;
}

/* Featured Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
    color: white;
}

.hero-title span { display: block; font-size: 1.6rem; font-weight: 400; opacity: 0.8; margin-top: 5px; }

.hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    font-size: 13px;
    color: #cbd5e1;
}

.hero-desc {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 30px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Right Col: Trending Sidebar */
.trending-sidebar-col {
    flex: 1;
    background: var(--bg-dark);
    border-radius: 16px;
    border: var(--border-glass);
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-width: 350px;
}

.trending-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.trending-header h2 { font-size: 16px; font-weight: 800; color: white; }

.trending-scroll-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 10px; /* Space for scrollbar */
}

/* Custom Scrollbar for Trending List */
.trending-scroll-list::-webkit-scrollbar { width: 4px; }
.trending-scroll-list::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); border-radius: 4px; }
.trending-scroll-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.trending-scroll-list::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.trending-card {
    display: flex;
    gap: 15px;
    padding: 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border: 1px solid transparent;
    transition: 0.3s;
    height: 90px; /* Fixed height for consistent look */
    min-height: 90px;
    flex-shrink: 0; /* Prevent shrinking in flex container */
    text-decoration: none;
    overflow: hidden;
}

.trending-card:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.1); transform: translateX(5px); }

.trending-poster-small { width: 60px; height: 100%; border-radius: 8px; object-fit: cover; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }

.trending-info-small { flex: 1; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }

.trending-info-small h3 {
    font-size: 14px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.trending-meta-small { font-size: 12px; color: var(--text-gray); display: flex; gap: 8px; align-items: center; font-weight: 600; }

/* --- 8. RESPONSIVENESS --- */
@media (max-width: 1200px) {
    .billboard-row { height: auto; flex-direction: column; }
    .main-hero-col { height: 450px; }
    .trending-sidebar-col { width: 100%; height: auto; }
    .home-layout { grid-template-columns: 1fr; }
}

@media (max-width: 992px) {
    .header-inner { gap: 16px; }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    
    /* Billboard & Hero Fixes */
    .top-billboard-block { margin-top: 110px; margin-bottom: 30px; }
    .billboard-row { display: flex; flex-direction: column; gap: 20px; height: auto; }
    .main-hero-col { width: 100%; height: 55vh; min-height: 500px; border-radius: 12px; margin-bottom: 0; display: block; position: relative; overflow: hidden; }
    .hero-slider-wrapper { width: 100%; height: 100%; position: relative; }
    
    .hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 40px 20px; opacity: 0; visibility: hidden; transition: opacity 0.8s ease, visibility 0.8s; }
    .hero-slide.active { opacity: 1; visibility: visible; z-index: 10; }

    /* Fix z-index for mobile to ensure visibility over background */
    .hero-bg { z-index: 1; }
    .hero-overlay { z-index: 2; }
    
    .hero-content-inner { padding: 0; max-width: 100%; text-align: left; position: relative; z-index: 20; width: 100%; display: flex; flex-direction: column; gap: 10px; }
    
    /* Typography Scaling for Mobile */
    .hero-title { font-size: 28px; line-height: 1.2; margin-bottom: 5px; display: block; }
    .hero-title span { font-size: 18px; margin-top: 4px; display: block; }
    .hero-meta { flex-wrap: wrap; gap: 8px; margin-bottom: 15px; font-size: 12px; display: flex; }
    
    /* Text truncating instead of completely hiding */
    .hero-desc { 
        font-size: 13px; 
        margin-bottom: 20px; 
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .hero-btns { flex-direction: row; width: 100%; gap: 10px; }
    .btn-play, .btn-info { flex: 1; padding: 12px 10px; font-size: 13px; justify-content: center; }
    
    /* Sidebar - Show exactly 4 items and hide the rest perfectly */
    .trending-sidebar-col { width: 100%; min-width: 100%; height: auto; padding: 15px; border-radius: 12px; display: block; }
    .trending-scroll-list { height: auto; max-height: none; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding-right: 0; }
    .trending-scroll-list .trending-card:nth-child(n+5) { display: none !important; } /* Magically restricts to 4 items */

    /* Grids */
    .movie-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .section { padding: 25px 0; }
    
    /* Stats */
    .stats-container { padding: 30px 20px !important; border-radius: 16px !important; }
    .stats-container > div { grid-template-columns: 1fr !important; gap: 20px !important; }
    
    /* Movie Details */
    .movie-banner-content { flex-direction: column; align-items: center !important; text-align: center; }
    .detail-poster { width: 160px !important; margin: 0 auto 20px auto; }
    .hero-meta-row { justify-content: center; flex-wrap: wrap; }
    .content-split-layout { flex-direction: column; gap: 30px; }
    .synopsis-col { min-width: 100%; }
    .download-sidebar { flex: 1 1 100%; max-width: 100%; }
}

@media (max-width: 480px) {
    .main-hero-col { height: 400px; }
    .hero-slide { padding: 30px 15px; }
    .hero-title { font-size: 24px; }
    .hero-title span { font-size: 16px; }
    .hero-desc { display: none; } /* Only hide completely on very small screens */
    .hero-btns { flex-direction: column; }
    .btn-play, .btn-info { width: 100%; padding: 14px; font-size: 14px; }
    
    /* Grid adjustments for phones */
    .movie-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .section-title { font-size: 18px; }
    .card-title { font-size: 13px; }
    .card-meta { font-size: 11px; }
}

/* Helper Classes for Movie/Watch pages */
.movie-banner-content { display: flex; align-items: flex-end; gap: 40px; width: 100%; }
.detail-poster { width: 240px; height: auto; object-fit: cover; border-radius: 16px; box-shadow: 0 15px 40px rgba(0,0,0,0.6); display: block; }
.content-split-layout { display: flex; gap: 50px; flex-wrap: wrap; }
.synopsis-col { flex: 1; min-width: 300px; }
.download-sidebar { flex: 0 0 340px; }
.stats-container { background: linear-gradient(145deg, #0f1115 0%, #060606 100%); border-radius: 24px; border: 1px solid rgba(255,255,255,0.05); padding: 50px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.5); position: relative; }

/* --- 5. BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--text-white);
    color: var(--bg-black);
}

.btn-primary:hover {
    background-color: rgba(255,255,255,0.8);
    transform: scale(1.05);
}

.btn-secondary {
    background-color: rgba(109, 109, 110, 0.7);
    color: var(--text-white);
}

.btn-secondary:hover {
    background-color: rgba(109, 109, 110, 0.4);
}

/* --- 6. MOVIE GRID & CARDS --- */
.section {
    padding: 40px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.movie-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
    transition: var(--transition);
}

.movie-card:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.card-poster {
    aspect-ratio: 2/3;
    position: relative;
}

.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
}

.movie-card:hover .card-overlay {
    opacity: 1;
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-gray);
}

/* --- 7. SIDEBAR / TRENDING LIST --- */
.home-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    margin-top: 40px;
}

.sidebar-section {
    background: var(--bg-dark);
    border-radius: 16px;
    padding: 24px;
    border: var(--border-glass);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 20px;
}

.trending-item {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.trending-item:last-child { border: none; margin: 0; padding: 0; }

.trending-poster {
    width: 60px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
}

.trending-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.trending-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.trending-meta {
    font-size: 12px;
    color: var(--text-gray);
}


/* --- 9. AUTH FORMS --- */
.form-center-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 40px;
}

.glass-form {
    width: 100%;
    max-width: 450px;
    background: rgba(15, 17, 21, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.glass-form h2 {
    text-align: center;
    margin-bottom: 30px;
    font-weight: 800;
    font-size: 32px;
    color: white;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 14px 18px;
    color: var(--text-white);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.glass-form .btn {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    background: var(--primary);
    color: white;
}
.glass-form .btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.glass-form p {
    margin-top: 25px;
    text-align: center;
    color: var(--text-gray);
    font-size: 14px;
}
.glass-form p a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}
.glass-form p a:hover {
    text-decoration: underline;
}

/* Alerts */
.form-alert {
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 500;
}
.form-alert.error {
    background: rgba(220, 38, 38, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.3);
}
.form-alert.success {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.form-alert.success a {
    color: white !important;
    text-decoration: underline;
}

/* --- 10. MOVIE DETAILS PAGE (Next Level) --- */
.movie-detail-hero {
    position: relative;
    width: 100%;
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 200px 0 80px; /* Increased from 160px to pull content further down */
    overflow: hidden;
    margin-top: -80px; /* Pull up under transparent header */
}

.md-backdrop {
    position: absolute;
    inset: -20px;
    z-index: 0;
    filter: blur(30px) brightness(0.4);
    opacity: 0.8;
}

.md-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.md-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, var(--bg-black) 0%, rgba(6,6,6,0.8) 40%, transparent 100%),
                radial-gradient(circle at center, transparent 0%, var(--bg-black) 100%);
}

.md-content {
    position: relative;
    z-index: 10;
    display: flex;
    gap: 60px;
    align-items: flex-start;
    width: 100%;
}

.md-poster-wrap {
    flex: 0 0 320px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.1);
    position: relative;
}

.md-poster-wrap img {
    width: 100%;
    display: block;
}

.md-info {
    flex: 1;
}

.md-title {
    font-size: clamp(32px, 4vw, 42px); /* Reduced maximum size significantly */
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 10px;
    letter-spacing: -1px;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.md-tagline {
    font-size: 20px;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 25px;
    font-style: italic;
}

.md-meta-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.md-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 197, 24, 0.1);
    border: 1px solid rgba(245, 197, 24, 0.2);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 16px;
}

.md-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #e2e8f0;
    font-size: 15px;
    font-weight: 500;
}

.md-meta-item svg { color: var(--text-gray); }

.md-synopsis {
    font-size: 17px;
    line-height: 1.8;
    color: #cbd5e1;
    margin-bottom: 40px;
    max-width: 800px;
}

.md-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    max-width: 800px;
}

.md-detail-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 16px;
    border-radius: 12px;
}

.md-detail-label {
    font-size: 12px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    font-weight: 700;
}

.md-detail-value {
    font-size: 15px;
    color: white;
    font-weight: 500;
}

.md-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-play-large {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: white;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 800;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-play-large:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.6);
}

.btn-icon-circular {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
    cursor: pointer;
}

.btn-icon-circular:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

/* Downloads Box */
.downloads-panel {
    background: var(--bg-card);
    border-radius: 16px;
    border: var(--border-glass);
    padding: 30px;
    margin-top: -40px;
    position: relative;
    z-index: 20;
    box-shadow: var(--shadow-lg);
}

.dl-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: var(--transition);
    text-decoration: none;
    color: white;
}

.dl-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(5px);
}

.dl-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dl-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dl-badge {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 992px) {
    .md-content { flex-direction: column; align-items: center; text-align: center; gap: 40px; }
    .md-poster-wrap { max-width: 280px; }
    .md-meta-bar, .md-actions { justify-content: center; }
    .md-details-grid { text-align: left; }
    .downloads-panel { margin-top: 40px; }
}

@media (max-width: 480px) {
    .md-poster-wrap { max-width: 220px; }
    .md-title { font-size: 32px; }
    .btn-play-large { width: 100%; justify-content: center; }
}

/* --- 11. RESPONSIVENESS (Consolidated above) --- */
.text-primary { color: var(--primary); }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
