/* StreamFlix - Main Stylesheet */
/* Based on cineby.sc design */

/* CSS Variables */
:root, [data-theme="dark"] {
    --bg-primary: #0a0e17;
    --bg-secondary: #121a28;
    --bg-tertiary: #1a2639;
    --bg-card: #1e2c42;
    --text-primary: #ffffff;
    --text-secondary: #a0abb0;
    --text-muted: #6a7a8a;
    --accent-primary: #00b4db;
    --accent-secondary: #0083b0;
    --accent-gold: #f5c518;
    --accent-green: #8fd022;
    --hero-overlay-start: rgba(10, 14, 23, 1);
    --hero-overlay-mid: rgba(10, 14, 23, 0.8);
    --hero-overlay-end: rgba(10, 14, 23, 0.2);
    --nav-bg-start: rgba(10, 14, 23, 0.95);
    --nav-bg-end: rgba(10, 14, 23, 0);
    --gradient-hero: linear-gradient(to right, var(--hero-overlay-start) 0%, var(--hero-overlay-mid) 50%, var(--hero-overlay-end) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-primary) 100%);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.5);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --logo-filter: none;
}

[data-theme="light"] {
    --bg-primary: #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e1e8ef;
    --bg-card: #ffffff;
    --text-primary: #121a28;
    --text-secondary: #4a5a6a;
    --text-muted: #8a9aab;
    --accent-primary: #0083b0;
    --accent-secondary: #00b4db;
    --accent-gold: #e5b20b;
    --accent-green: #7bb51d;
    --hero-overlay-start: rgba(240, 244, 248, 0.95);
    --hero-overlay-mid: rgba(240, 244, 248, 0.6);
    --hero-overlay-end: rgba(240, 244, 248, 0);
    --nav-bg-start: rgba(240, 244, 248, 0.95);
    --nav-bg-end: rgba(240, 244, 248, 0);
    --gradient-hero: linear-gradient(to right, var(--hero-overlay-start) 0%, var(--hero-overlay-mid) 50%, var(--hero-overlay-end) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-primary) 100%);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.1);
    --logo-filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.2));
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

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

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(to bottom, var(--nav-bg-start) 0%, var(--nav-bg-end) 100%);
    padding: 1rem 2rem;
    transition: background var(--transition-normal);
}

.navbar.scrolled {
    background: var(--bg-primary);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: space-between;
}

.nav-top-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

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

.logo-img, .footer-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: var(--logo-filter);
}

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

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width var(--transition-fast);
}

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

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 1rem;
    margin-right: 0;
    transition: background var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
}

.nav-search {
    position: relative;
    margin-left: auto;
}

.nav-search input {
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    color: var(--text-primary);
    width: 300px;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.nav-search input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.2);
}

.nav-search input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    box-shadow: var(--shadow-card);
}

.search-results.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background var(--transition-fast);
    text-decoration: none;
}

.search-result-item:hover {
    background: var(--bg-tertiary);
}

.search-result-item img {
    width: 45px;
    height: 68px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.search-result-info h4 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.search-result-info span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 80vh;
    min-height: 600px;
    max-height: 900px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.hero-info {
    max-width: 600px;
}

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

.hero-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.hero-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--accent-gold);
}

.hero-year {
    color: var(--text-secondary);
}

.hero-type {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.hero-overview {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.hero-genre {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(0, 180, 219, 0.4);
    transform: scale(1.05);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Content Sections */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.content-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.section-tabs {
    display: flex;
    gap: 0.5rem;
}

.tab-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* Media Carousel */
.media-carousel {
    position: relative;
    margin: 0 -2rem;
    padding: 0 2rem;
}

.carousel-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 1rem 0;
}

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

/* Media Card */
.media-card {
    flex-shrink: 0;
    width: 200px;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.media-card:hover {
    transform: scale(1.05);
}

.media-card-poster {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-tertiary);
}

.media-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-fast);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

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

.media-card-play {
    width: 40px;
    height: 40px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-card-info {
    margin-top: 0.75rem;
}

.media-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-card-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.media-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.rating-badge {
    color: var(--accent-gold);
}

/* Top 10 Ribbon Badge */
.top-card {
    position: relative;
}

.top-card .rank {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 50px;
    background: var(--gradient-accent);
    clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.top-card .rank::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.top-card .rank span {
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.top-card .rank .rank-num {
    font-size: 1rem;
    margin-top: 2px;
}

/* Genre Grid */
.genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.genre-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.genre-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.2);
}

.genre-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-disclaimer {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

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

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: background var(--transition-fast);
}

.modal-close:hover {
    background: var(--accent-primary);
}

.modal-body {
    padding: 2rem;
}

/* Modal Content Styles */
.detail-backdrop {
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.detail-backdrop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, var(--bg-secondary) 0%, transparent 100%);
}

.detail-content {
    margin-top: -150px;
    position: relative;
    padding: 0 2rem 2rem;
}

.detail-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.detail-poster {
    width: 200px;
    flex-shrink: 0;
}

.detail-poster img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.detail-info {
    flex: 1;
}

.detail-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.detail-meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.detail-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.detail-genre {
    background: var(--bg-tertiary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.detail-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-overview h3,
.detail-cast h3,
.detail-seasons h3,
.detail-recommendations h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-overview p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Cast List */
.cast-list {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.cast-item {
    flex-shrink: 0;
    width: 100px;
    text-align: center;
}

.cast-item img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
    border: 2px solid var(--bg-tertiary);
}

.cast-item h4 {
    font-size: 0.85rem;
    font-weight: 500;
}

.cast-item span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Season List */
.season-list {
    display: grid;
    gap: 1rem;
}

.season-item {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.season-item:hover {
    background: var(--bg-card);
}

.season-item h4 {
    margin-bottom: 0.25rem;
}

.season-item span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Recommendations */
.rec-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.rec-item {
    cursor: pointer;
}

.rec-item img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    transition: transform var(--transition-fast);
}

.rec-item:hover img {
    transform: scale(1.05);
}

.rec-item h4 {
    font-size: 0.9rem;
    font-weight: 500;
}

.rec-item span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Player Modal */
.player-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}

.player-modal.active {
    display: flex;
}

.player-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
}

.player-container {
    position: relative;
    width: 90vw;
    height: calc(90vw * 9 / 16);
    max-width: calc(80vh * 16 / 9);
    max-height: 80vh;
}

.player-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.player-close:hover {
    background: var(--accent-primary);
}

.player-container iframe {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
}

/* Episode Selector */
.episode-selector {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

.episode-selector-header {
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.episode-selector-header h4 {
    font-size: 1rem;
}

.episode-selector-body {
    display: none;
    padding: 0 1rem 1rem;
}

.episode-selector-body.active {
    display: block;
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.episode-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    display: flex;
    gap: 1rem;
    transition: all var(--transition-fast);
}

.episode-item:hover {
    background: var(--accent-primary);
}

.episode-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-muted);
}

.episode-item:hover .episode-number {
    color: white;
}

.episode-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.episode-info span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-card) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-section {
        height: 70vh;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .nav-search input {
        width: 250px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 90px; /* Adjust for compact fixed header */
    }

    .navbar {
        padding: 0.5rem 0;
        background: rgba(10, 14, 23, 0.95) !important;
        backdrop-filter: blur(20px);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 2000;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-container {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0 0.75rem;
    }

    .nav-top-row {
        display: flex;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }

    .logo {
        gap: 0.3rem;
        font-size: 1rem;
    }

    .logo-img {
        width: 20px;
        height: 20px;
    }

    .nav-search {
        flex: 1;
        margin: 0;
        max-width: none;
        order: 2; /* Put search in middle */
    }

    .nav-search input {
        width: 100%;
        padding: 0.3rem 0.75rem;
        font-size: 0.8rem;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 6px;
        height: 30px;
    }

    .theme-toggle {
        width: 30px;
        height: 30px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        order: 3;
    }

    .theme-toggle svg {
        width: 14px;
        height: 14px;
    }

    .nav-links {
        display: flex;
        position: static;
        width: 100%;
        padding: 0.25rem 0;
        justify-content: center;
        gap: 1.5rem;
        background: transparent;
        border-top: none;
        backdrop-filter: none;
    }

    .nav-link {
        font-size: 0.85rem;
        font-weight: 500;
        padding: 0.3rem 0.5rem;
        color: var(--text-secondary);
    }
    
    .nav-link.active {
        color: var(--text-primary);
        border-bottom: 2px solid var(--accent-primary);
    }
    
    .nav-link::after {
        display: none;
    }

    .search-results {
        top: 80px;
        z-index: 2100;
    }

    .hero-section {
        height: 75vh;
        min-height: 500px;
        align-items: flex-end;
        padding-bottom: 3rem;
    }
    
    .hero-content {
        align-items: center;
        text-align: center;
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.1;
        margin-bottom: 0.5rem;
        text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    }

    .hero-overview {
        display: none;
    }
    
    .hero-meta, .hero-genres {
        justify-content: center;
    }

    .hero-actions {
        flex-direction: row;
        width: 100%;
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .hero-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .main-content {
        padding: 1rem 0;
    }

    .section-header {
        padding: 0 1rem;
        margin-bottom: 0.5rem;
    }

    .media-card {
        width: 120px;
    }
    
    .carousel-track {
        padding: 0 1rem;
    }

    .detail-hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-top: 1rem;
    }

    .detail-page-poster {
        width: 160px;
    }

    .detail-page-title {
        font-size: 2rem;
        margin-top: 1rem;
    }

    .detail-page-meta, .detail-page-genres, .detail-page-actions {
        justify-content: center;
    }
    
    .detail-page-actions {
        width: 100%;
    }
    
    .detail-page-actions .btn {
        flex: 1;
        justify-content: center;
        font-size: 0.9rem;
        padding: 0.6rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 50vh;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .media-card {
        width: 130px;
    }

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
