/* ============================================
   DRISHYA - Premium Visual Storytelling
   "Cinematic Luxury" Aesthetic
   ============================================ */

/* CSS Custom Properties (Design Tokens) */
:root {
    /* Hotstar SOUL Dark Theme Palette */
    --bg-base: #0f1014;
    /* Hotstar Midnight Canvas */
    --bg-primary: #15181f;
    /* Hotstar Surface L1 */
    --bg-elevated: #1e2330;
    /* Hotstar Surface L2 */
    --bg-card: #16181f;
    /* Hotstar Content Card */
    --bg-hover: #222738;
    /* Elevated Hover */
    --bg-input: rgba(255, 255, 255, 0.08);

    /* Hotstar Brand Accents */
    --accent-primary: #00b5f8;
    /* Hotstar Electric Cyan */
    --accent-primary-hover: #38c8ff;
    --accent-secondary: #0c58ee;
    /* Hotstar Royal Blue */
    --accent-gold: #f5a623;
    /* Hotstar VIP / Premium Gold */
    --accent-saffron: #f5a623;
    --accent-live: #ff3b30;

    --accent-success: #22c55e;
    --accent-warning: #f5a623;
    --accent-error: #ff4d4f;

    /* Text */
    --text-primary: #ffffff;
    /* Pure White */
    --text-secondary: #8f98b2;
    /* Hotstar Slate Grey */
    --text-tertiary: #53565d;
    --text-muted: #53565d;

    /* Overlays */
    --overlay-light: rgba(255, 255, 255, 0.04);
    --overlay-medium: rgba(255, 255, 255, 0.08);
    --overlay-dark: rgba(15, 16, 20, 0.75);
    --overlay-darker: rgba(15, 16, 20, 0.95);

    /* Hotstar Gradients - Softer for vibrant poster visibility */
    --gradient-hero: linear-gradient(180deg, rgba(15, 16, 20, 0) 0%, rgba(15, 16, 20, 0.45) 60%, var(--bg-base) 100%);
    --gradient-hero-side: linear-gradient(90deg, rgba(15, 16, 20, 0.7) 0%, rgba(15, 16, 20, 0.4) 35%, rgba(15, 16, 20, 0.08) 70%, transparent 100%);
    --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(15, 16, 20, 0.75) 100%);
    --gradient-gold: linear-gradient(135deg, #f5a623 0%, #d48806 100%);
    --gradient-cyan: linear-gradient(135deg, #00b5f8 0%, #0c58ee 100%);

    /* Frosted Glass */
    --glass-bg: rgba(21, 24, 31, 0.82);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(28px);
    --glass-saturate: saturate(180%);

    /* Typography - Clean Modern Streaming Sans */
    --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Font Sizes */
    --fs-hero: clamp(3rem, 6vw, 5rem);
    --fs-title: clamp(2rem, 3.5vw, 3rem);
    /* Slightly larger for Serif */
    --fs-section: clamp(1.25rem, 2.5vw, 1.7rem);
    --fs-card: clamp(0.9rem, 1.5vw, 1rem);
    --fs-body: clamp(0.95rem, 1.2vw, 1.05rem);
    --fs-small: 0.85rem;
    --fs-tiny: 0.75rem;

    /* Spacing - Compact */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Layout */
    --nav-height: 50px;
    --mobile-nav-height: 70px;
    --content-padding: clamp(1.5rem, 4vw, 4rem);
    --card-gap: 16px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    /* Softer curves */
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(255, 255, 255, 0.15);

    /* Transitions */
    --transition-fast: 200ms cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-base: 300ms cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-slow: 500ms cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Z-index Scale */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-navbar: 500;
    --z-modal: 1000;
    --z-player: 1500;
    --z-toast: 2000;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--fs-body);
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-base);
    overflow-x: hidden;
    min-height: 100vh;
}

body.no-scroll {
    overflow: hidden;
}

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

button {
    font-family: inherit;
    font-size: inherit;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

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

ul,
ol {
    list-style: none;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

/* Focus States */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Selection */
::selection {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* ============================================
   Navigation - Floating Liquid Glass
   ============================================ */
.navbar {
    position: fixed;
    top: 16px;
    left: 16px;
    right: 16px;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    /* Floating Liquid Glass */
    background: rgba(40, 40, 45, 0.65);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: var(--z-navbar);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: rgba(30, 30, 35, 0.85);
    backdrop-filter: blur(50px) saturate(200%);
    -webkit-backdrop-filter: blur(50px) saturate(200%);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* 3-Section Layout */
.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    flex: 1;
    /* Equal space distribution start/end */
}

.nav-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 2;
    /* more space for center */
}

.nav-right {
    justify-content: flex-end;
    gap: 16px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 1;
    color: #fff;
    text-decoration: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    opacity: 1;
}

.brand-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.45));
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
    object-fit: contain;
}

.logo:hover .brand-logo-img {
    transform: scale(1.1) rotate(6deg);
    filter: drop-shadow(0 0 18px rgba(0, 240, 255, 0.8));
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-primary);
    background: linear-gradient(to right, #00f0ff 0%, #ffffff 60%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

/* Nav Links - Centered Tabs style */
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    /* Wider spacing */
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.64);
    /* Muted white */
    transition: color 0.2s ease;
    text-decoration: none;
    position: relative;
    padding: 6px 0;
}

.nav-link:hover {
    color: #fff;
}

.nav-link.active {
    color: #fff;
}


/* Search Box - Inline Pill */
.search-btn-mobile {
    display: none !important;
    /* Hidden on desktop, shown on mobile */
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    /* Pill shape */
    padding: 6px 12px;
    width: 200px;
    /* Fixed width or expandable */
    transition: background 0.2s ease, width 0.3s ease;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.18);
    width: 240px;
    /* Expand on focus */
}

.search-icon {
    display: none;
    /* Clean look - no icon on desktop */
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-right: 8px;
}

.search-box:focus-within .search-icon {
    color: #fff;
}

#searchInput {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.85rem;
    width: 100%;
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Nav Btn Icon (History) */
.nav-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.64);
    transition: color 0.2s;
    width: 32px;
    height: 32px;
}

.nav-btn-icon:hover {
    color: #fff;
}

/* User Avatar */
.user-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    /* Perfect circle */
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1c1c1e, #3a3a3c);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-avatar svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

/* Search Overlay - Full Screen Glass */
.search-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    /* Taller */
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    display: flex;
    align-items: center;
    padding: 0 var(--content-padding);
    gap: var(--space-md);
    transform: translateY(-100%);
    opacity: 0;
    transition: all var(--transition-slow);
    z-index: calc(var(--z-navbar) + 1);
    border-bottom: 1px solid var(--glass-border);
}

.search-container.active {
    transform: translateY(0);
    opacity: 1;
}

.search-input {
    flex: 1;
    height: 60px;
    padding: 0;
    background: transparent;
    font-size: 2rem;
    /* Large text */
    font-weight: 600;
    color: var(--text-primary);
    border: none;
}

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

.search-close {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 2rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.search-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

/* Mobile Navigation - Bottom Blur Dock */
.mobile-nav {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    height: 64px;
    background: rgba(28, 28, 30, 0.85);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 32px;
    /* Pill shape */
    display: none;
    justify-content: space-evenly;
    /* Spread evenly */
    align-items: center;
    z-index: var(--z-navbar);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-tertiary);
    /* Dimmed state */
    font-size: 0.7rem;
    font-weight: 500;
    transition: all var(--transition-base);
    width: 60px;
}

.mobile-nav-item svg {
    width: 24px;
    height: 24px;
    opacity: 0.7;
    transition: all var(--transition-base);
}

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

.mobile-nav-item.active svg {
    opacity: 1;
    transform: scale(1.1);
    color: var(--text-primary);
    /* White for active, not accent */
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    min-height: 100vh;
    padding-top: 0;
    /* Full bleed hero */
}

/* ============================================
   Hero Section - Cinematic
   ============================================ */
.hero {
    position: relative;
    isolation: isolate;
    width: 100%;
    height: 80vh;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: var(--space-xl) var(--content-padding);
    margin-bottom: var(--space-lg);
    overflow: hidden;
}

/* Gradients for readability - reduced black overlay for vivid poster art */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-base) 0%, rgba(15, 16, 20, 0.45) 30%, transparent 75%);
    z-index: 1;
    pointer-events: none;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(15, 16, 20, 0.65) 0%, rgba(15, 16, 20, 0.25) 45%, transparent 75%);
    z-index: 1;
    pointer-events: none;
}

.hero-carousel {
    z-index: 0;
}

.hero-brand-wrap {
    min-height: 48px;
    display: flex;
    align-items: flex-end;
    margin-bottom: 8px;
}

.hero-title-logo {
    max-height: 85px;
    max-width: min(340px, 80vw);
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.75));
    display: block;
    animation: fadeUp 0.6s ease-out forwards;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Reduced from var(--space-lg) */
    animation: fadeUp 1s ease-out forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-logo {
    max-width: 400px;
    max-height: 180px;
    object-fit: contain;
    margin-bottom: 0;
    /* Reduced from var(--space-sm) */
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

/* Pill Badge above title */
.hero-top-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    align-self: flex-start;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    /* Further reduced from 3.5rem */
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0;
    /* Remove margin as gap handles it */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    /* Stronger shadow */
    /* display: none; Removed to show title */
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Slightly tighter gap for bullet separators */
    font-size: var(--fs-body);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    /* Added shadow for visibility */
    margin-bottom: 4px;
    /* Slight buffer between meta and synopsis */
}

.meta-sep {
    font-weight: bold;
    color: rgba(255, 255, 255, 0.5);
}

.hero-match {
    color: var(--accent-success);
    font-weight: 600;
}

.hero-rating {
    padding: 3px 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
}

.hero-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 550px;

    /* Line Clamping - 2-3 lines max */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    margin-top: 8px;
    /* Reduced from var(--space-md) */
}

/* ============================================
   Buttons - Liquid Glass & Solid White
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    /* Apple uses pills */
    transition: transform var(--transition-fast), background var(--transition-fast);
    cursor: pointer;
    line-height: 1;
}

.btn:active {
    transform: scale(0.96);
}

/* Primary = White Button, Black Text */
.btn-primary {
    background: var(--text-primary);
    color: #000;
}

.btn-primary:hover {
    background: #FFFFFF;
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Secondary = Glass Button */
.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary);
}

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

/* Accent Button */
.btn-accent {
    background: var(--text-primary);
    /* Use white for primary actions usually */
    color: #000;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.btn svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   Language Tabs
   ============================================ */
.language-tabs {
    display: flex;
    gap: 8px;
    padding: 12px var(--content-padding);
    margin-top: -20px;
    position: relative;
    z-index: 10;
}

.lang-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 0;
    cursor: pointer;
    transition: color 0.2s;
}

.lang-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

.lang-btn.active {
    color: #fff;
    font-weight: 600;
}

/* ============================================
   Content Rows
   ============================================ */
.content-section {
    padding: var(--space-sm) 0;
    position: relative;
    z-index: 10;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--content-padding);
    margin-bottom: var(--space-md);
}

.section-title {
    font-size: 1.35rem;
    /* Slightly larger */
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.section-title .explore-link {
    font-size: 0.9rem;
    color: var(--accent-secondary);
    /* Blue link */
    font-weight: 600;
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--transition-base);
}

.section-header:hover .explore-link {
    opacity: 1;
    transform: translateX(0);
}

/* Carousel */
.carousel-container {
    position: relative;
    /* Allow cards to pop out */
    padding: 0;
    margin-top: -30px;
    /* Pull up to compensate for carousel padding */
}

.carousel {
    display: flex;
    gap: var(--card-gap);
    padding: 30px var(--content-padding) 20px;
    /* Top padding for hover zoom, bottom for shadow */
    overflow-x: auto;
    overflow-y: visible;
    /* Important for hover zoom */
    scroll-behavior: smooth;
    scrollbar-width: none;
}

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

.carousel-btn {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: 20;
    cursor: pointer;
}

.carousel-container:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn.prev {
    left: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.8), transparent);
}

.carousel-btn.next {
    right: 0;
    background: linear-gradient(-90deg, rgba(0, 0, 0, 0.8), transparent);
}

/* ============================================
   Utility Classes
   ============================================ */
.hidden {
    display: none !important;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

@media (max-width: 768px) {
    :root {
        --content-padding: 14px;
        --nav-height: 54px;
    }

    /* Navbar Mobile Adjustments */
    .navbar {
        padding: 0 10px;
    }

    .nav-center {
        display: none;
        /* Hide center links on mobile */
    }

    .nav-right {
        gap: 8px;
    }

    /* Hide full search box on mobile, show icon only */
    .nav-right .search-box {
        display: none;
    }

    .nav-right .search-btn-mobile {
        display: flex !important;
    }

    .nav-right .search-box input {
        font-size: 0.8rem;
    }

    /* Keep touch-friendly nav buttons */
    .nav-right .nav-btn-icon {
        padding: 6px;
        min-width: 32px;
        min-height: 32px;
    }

    .nav-right .nav-btn-icon svg {
        width: 18px;
        height: 18px;
    }

    .region-nav-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
    }

    .logo-text {
        font-size: 0.95rem;
    }

    /* Hero - Mobile optimized */
    .hero {
        height: 58vh;
        min-height: 380px;
        flex-direction: column;
        justify-content: flex-end;
        align-items: stretch;
        padding-bottom: 30px;
    }

    .hero::after {
        background: linear-gradient(to top, var(--bg-base) 20%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    }

    .hero::before {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, transparent 30%);
    }

    .hero-content {
        width: 100%;
        padding: 0 16px;
        max-width: 100%;
    }

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

    .hero-description {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        max-width: 95%;
    }

    .hero-buttons .btn {
        padding: 9px 18px;
        font-size: 0.82rem;
    }

    .hero-logo {
        max-width: 70%;
    }

    /* Mobile Bottom Navigation - Universal Docked Glass Bar */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(58px + env(safe-area-inset-bottom, 0px));
        background: rgba(14, 14, 20, 0.92);
        backdrop-filter: blur(40px) saturate(180%);
        -webkit-backdrop-filter: blur(40px) saturate(180%);
        display: flex !important;
        justify-content: space-around;
        align-items: center;
        z-index: 1000;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.55);
        padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
        box-sizing: border-box;
    }

    .mobile-bottom-nav .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        flex: 1;
        min-width: 52px;
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 0.65rem;
        font-weight: 500;
        transition: color 0.2s, transform 0.15s;
        padding: 4px 2px;
    }

    .mobile-bottom-nav .nav-item.active,
    .mobile-bottom-nav .nav-item:hover {
        color: var(--accent-primary, #00f0ff);
    }

    .mobile-bottom-nav .nav-item.active svg {
        stroke: var(--accent-primary, #00f0ff);
        filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.45));
    }

    .mobile-bottom-nav .nav-item svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

    /* Add padding to main content for bottom nav */
    .main-content {
        padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 520px) {
    /* On narrow mobile phones, simplify top nav to avoid squeeze */
    .nav-right .nav-btn-icon[href="#/watchlist"],
    .nav-right .nav-btn-icon[href="#/history"] {
        display: none !important;
    }

    .region-code {
        display: none;
    }

    .region-nav-btn {
        padding: 4px 6px;
    }
}

/* Hide mobile bottom nav on desktop - MUST come after media query but use lower specificity */
@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}
/* Spinner for buttons */
.loading-spinner-tiny {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

/* ==========================================================================
   Hotstar SOUL Collapsible Left Rail Sidebar (Viewports >= 992px)
   ========================================================================== */

.desktop-sidebar {
    display: none;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 80px;
    background: linear-gradient(90deg, #0f1014 0%, rgba(15, 16, 20, 0.94) 50%, rgba(15, 16, 20, 0) 100%);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-right: none !important;
    box-shadow: none !important;
    flex-direction: column;
    z-index: 950;
    padding: 0 0 20px 0;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
    transition: width 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.28s ease;
}

.desktop-sidebar::-webkit-scrollbar {
    width: 4px;
}

.desktop-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

/* Hotstar Hover Expansion with Right-Side Fade (Seamless, No Right Border) */
.desktop-sidebar:hover,
.desktop-sidebar.expanded {
    width: 250px;
    background: linear-gradient(90deg, #0f1014 0%, rgba(15, 16, 20, 0.98) 55%, rgba(15, 16, 20, 0.70) 82%, rgba(15, 16, 20, 0) 100%);
    border-right: none !important;
    box-shadow: none !important;
}

/* Sidebar Header & Brand */
.sidebar-header {
    padding-top: 24px;
    padding-bottom: 20px;
    display: flex;
    align-items: center;
    width: 100%;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    width: 100%;
}

.sidebar-icon-wrap {
    width: 80px;
    min-width: 80px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-logo-img {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.sidebar-brand:hover .brand-logo-img {
    transform: scale(1.08);
}

.sidebar-brand-text {
    font-family: var(--font-display, "Inter", sans-serif);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #00b5f8 0%, #ffffff 60%, #0c58ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), max-width 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.desktop-sidebar:hover .sidebar-brand-text,
.desktop-sidebar.expanded .sidebar-brand-text {
    opacity: 1;
    max-width: 160px;
}

/* Sidebar Navigation Groups */
.sidebar-nav-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
    width: 100%;
}

.sidebar-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-secondary, #8f98b2);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 14px 20px 4px 80px;
    opacity: 0;
    height: 0;
    margin: 0;
    overflow: hidden;
    transition: opacity 0.2s ease, height 0.2s ease;
}

.desktop-sidebar:hover .sidebar-section-title,
.desktop-sidebar.expanded .sidebar-section-title {
    opacity: 1;
    height: auto;
}

/* Sidebar Navigation Items - Hotstar Center-Aligned Icon Style */
.sidebar-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 48px;
    width: 100%;
    color: #8f98b2;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease, background 0.2s ease;
    -webkit-app-region: no-drag;
    border: none;
    background: transparent;
    cursor: pointer;
    box-sizing: border-box;
}

.sidebar-nav-item svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    stroke: currentColor;
    opacity: 0.85;
    transition: stroke 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

/* Labels reveal smoothly on hover */
.sidebar-nav-item span {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), max-width 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.desktop-sidebar:hover .sidebar-nav-item span,
.desktop-sidebar.expanded .sidebar-nav-item span {
    opacity: 1;
    max-width: 150px;
}

.sidebar-nav-item:hover {
    color: #ffffff;
}

.sidebar-nav-item:hover svg {
    opacity: 1;
    stroke: #ffffff;
    transform: scale(1.1);
}

/* Hotstar Electric Cyan Sleek Left Pill Indicator */
.sidebar-nav-item.active {
    color: #ffffff;
    font-weight: 600;
}

.sidebar-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3.5px;
    height: 24px;
    border-radius: 0 3px 3px 0;
    background: #00b5f8;
    box-shadow: 0 0 10px rgba(0, 181, 248, 0.8);
}

.sidebar-nav-item.active svg {
    opacity: 1;
    stroke: #00b5f8;
    filter: drop-shadow(0 0 8px rgba(0, 181, 248, 0.65));
}

/* Sidebar Footer (Settings Item) */
.sidebar-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    -webkit-app-region: no-drag;
    width: 100%;
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    text-decoration: none;
    width: 100%;
}

.sidebar-user-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 181, 248, 0.35);
}

.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #00b5f8 0%, #0c58ee 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(0, 181, 248, 0.4);
}

.sidebar-user-avatar .user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    opacity: 0;
    max-width: 0;
    transition: opacity 0.2s ease, max-width 0.25s ease;
}

.desktop-sidebar:hover .sidebar-user-info,
.desktop-sidebar.expanded .sidebar-user-info {
    opacity: 1;
    max-width: 140px;
}

.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-status {
    font-size: 0.70rem;
    color: #00b5f8;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-action {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s ease;
}

.sidebar-user-action:hover {
    color: #ffffff;
}

/* ──────────────────────────────────────────────────────────────────────────
   Desktop (>= 992px) Layout Shift & Hotstar Canvas Geometry
   ────────────────────────────────────────────────────────────────────────── */
@media (min-width: 992px) {
    .desktop-sidebar {
        display: flex !important;
    }

    .navbar {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: none !important;
    }

    /* Hotstar Left-Rail Margin: 80px allows wide content canvas */
    .main-content {
        margin-left: 80px !important;
        width: calc(100% - 80px) !important;
        box-sizing: border-box !important;
        padding-top: 0 !important;
        padding-bottom: 40px !important;
        min-height: 100vh;
        background-color: var(--bg-base, #0f1014);
    }

    /* Hero Billboard - Hotstar Widescreen Immersion */
    .hero {
        height: 76vh;
        min-height: 540px;
        padding: 0 54px 60px 54px;
    }

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

    .hero-title {
        font-size: 3.4rem;
        font-weight: 800;
        letter-spacing: -0.5px;
    }

    .hero-buttons {
        gap: 14px;
    }

    /* Subpages padding */
    .page-container,
    .downloads-page,
    .settings-page,
    .history-page,
    .watchlist-page {
        padding-top: 40px !important;
        padding-left: 36px !important;
        padding-right: 36px !important;
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   Mobile & Tablet (< 992px) Layout Guarantee
   ────────────────────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .desktop-sidebar {
        display: none !important;
    }

    .navbar {
        display: flex !important;
        background: rgba(15, 16, 20, 0.88) !important;
        backdrop-filter: blur(25px) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        background-color: var(--bg-base, #0f1014);
    }

    .mobile-bottom-nav {
        background: rgba(15, 16, 20, 0.94) !important;
        backdrop-filter: blur(25px) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .mobile-bottom-nav .nav-item.active {
        color: #00b5f8 !important;
    }

    .mobile-bottom-nav .nav-item.active svg {
        stroke: #00b5f8 !important;
        filter: drop-shadow(0 0 8px rgba(0, 181, 248, 0.6)) !important;
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   Tablet Viewport (769px - 991px) Navbar & Header Anti-Collision
   ────────────────────────────────────────────────────────────────────────── */
@media (max-width: 991px) and (min-width: 769px) {
    .navbar {
        padding: 0 16px !important;
        gap: 12px !important;
        justify-content: space-between !important;
    }

    .nav-left {
        flex: 0 0 auto !important;
    }

    .logo {
        gap: 8px !important;
    }

    .logo-text {
        font-size: 1.15rem !important;
        letter-spacing: 1px !important;
    }

    .brand-logo-img {
        width: 28px !important;
        height: 28px !important;
    }

    .nav-center {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        justify-content: center !important;
        padding: 0 8px !important;
    }

    .nav-links {
        gap: 14px !important;
        justify-content: center !important;
    }

    .nav-link {
        font-size: 0.85rem !important;
        white-space: nowrap !important;
        padding: 4px 0 !important;
    }

    .nav-right {
        flex: 0 0 auto !important;
        gap: 8px !important;
    }

    .nav-right .search-box {
        width: 130px !important;
        padding: 5px 10px !important;
    }

    .nav-right .search-box:focus-within {
        width: 170px !important;
    }

    .nav-right .search-box input {
        font-size: 0.82rem !important;
    }

    .pwa-install-btn {
        padding: 5px 10px !important;
        font-size: 0.78rem !important;
    }

    .pwa-install-btn .pwa-btn-text {
        display: none !important;
    }
}
