:root {
    /* Colors */
    --bg-body: #050505;
    --bg-surface: #0a0e17; /* Navy tint */
    --bg-surface-elevated: #111624; /* Elevated Navy tint */
    --bg-glass: rgba(22, 22, 26, 0.6);
    --bg-glass-heavy: rgba(10, 10, 12, 0.85);
    
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;
    
    --accent-primary: #e11d48; /* Reddish for Flash/Standard streaming action */
    --accent-glow: rgba(225, 29, 72, 0.4);
    --accent-secondary: #06b6d4; /* Cyan */
    
    --border-subtle: #1e293b;
    
    /* Spacing */
    --nav-width: 80px; /* Collapsed style sidebar */
    --nav-width-expanded: 240px;
    --header-height: 80px;
    
    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--nav-width);
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0;
    transition: width 0.3s ease;
}

.sidebar-logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 48px;
    text-transform: lowercase;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
    align-items: center;
}

.nav-item {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.nav-item:hover, .nav-item.active {
    background-color: var(--bg-surface-elevated);
    color: var(--text-primary);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 4px;
    background-color: var(--accent-primary);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--accent-primary);
}

/* Main Content */
.main-content {
    margin-left: var(--nav-width);
    flex: 1;
    width: calc(100% - var(--nav-width));
    position: relative;
}

/* Header */
.top-header {
    position: fixed;
    top: 0;
    left: var(--nav-width);
    right: 0;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    z-index: 40;
    background: linear-gradient(to bottom, rgba(5,5,5,0.9) 0%, rgba(5,5,5,0) 100%);
    backdrop-filter: blur(4px);
}

.search-bar {
    position: relative;
    width: 360px;
}

.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 12px 20px 12px 48px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    pointer-events: none;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 16px;
}

.notification-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    position: relative;
}

.notification-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    border: 2px solid var(--bg-body);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #333, #666);
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.2);
}

/* Hero Section */
.hero {
    height: 85vh;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 64px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.placeholder-hero {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, #2a1b1b 0%, #050505 80%);
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, #050505 0%, rgba(5,5,5,0.8) 40%, rgba(5,5,5,0.2) 100%),
                linear-gradient(to top, #050505 0%, transparent 50%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 600px;
    margin-top: 60px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 24px 0;
    background: linear-gradient(to right, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    color: var(--text-secondary);
    font-size: 14px;
}

.rating {
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-separator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--text-muted);
}

.hero-desc {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: none;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    color: white;
    box-shadow: 0 8px 24px -6px rgba(225, 29, 72, 0.5);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 32px -8px rgba(225, 29, 72, 0.6);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Sections */
.content-section {
    padding: 0 0 48px 64px;
    position: relative;
    z-index: 5;
    margin-top: -60px; /* Overlap hero slightly */
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-right: 64px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--accent-primary);
    border-radius: 2px;
}

/* Carousels */
.carousel {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 48px;
    padding-left: 0; /* Align with header */
    padding-right: 64px;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.carousel::-webkit-scrollbar {
    display: none;
}

/* Cards */
.media-card {
    flex: 0 0 auto;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    group: hover;
}

.media-card.portrait {
    width: 200px;
}

.media-card.square {
    width: 180px;
}

.card-image-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.media-card.portrait .card-image-container {
    aspect-ratio: 2/3;
}

.media-card.square .card-image-container {
    aspect-ratio: 1/1;
}

.media-card:hover .card-image-container {
    transform: scale(1.05);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.7);
    z-index: 10;
}

.placeholder-poster {
    width: 100%;
    height: 100%;
    background-color: #1f1f23;
    background-image: linear-gradient(135deg, #27272a 0%, #18181b 100%);
    position: relative;
}

/* Overlay on Hover */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.media-card:hover .card-overlay {
    opacity: 1;
}

.play-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.4);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.media-card:hover .play-icon-circle {
    transform: scale(1);
}

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

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.card-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* Utilities */
.text-gradient {
    background: linear-gradient(to right, #06b6d4, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge-hd {
    border: 1px solid var(--text-muted);
    border-radius: 4px;
    padding: 1px 4px;
    font-size: 10px;
    color: var(--text-secondary);
}

/* Icons SVG Styling */
.icon {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-fill {
    fill: currentColor;
    stroke: none;
}
