@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-dark: #000000;
    --bg-surface: rgba(15, 15, 20, 0.6);
    --bg-card: rgba(20, 20, 25, 0.45);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #9ea4b0;
    --text-muted: #575e6b;
    --accent-color: #00d2ff; /* Fmovies Cyan/Blue */
    --accent-glow: rgba(0, 210, 255, 0.15);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 8px;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset & Base - Full Page Scrolls natively */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbars styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #000000;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.app-container {
    width: 100%;
    position: relative;
}

/* Transparent Header Overlay - Fmovies Style */
header.main-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    padding: 0 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    transition: var(--transition-smooth);
}

header.main-header.scrolled {
    position: fixed;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

/* Logo: Blue Play Button icon + Fmovies text */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    cursor: pointer;
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #ff2d55 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 210, 255, 0.25);
    transition: var(--transition-smooth);
}

.logo-icon:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(0, 210, 255, 0.45);
}

.logo-icon svg {
    fill: #ffffff;
    stroke: none;
}

/* Header Right: Menu links and action buttons */
.nav-links-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    background: none;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
}

.nav-link:hover, 
.nav-link.active {
    color: #ffffff;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.08);
}

.nav-link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    border-left: 1px solid var(--border-color);
    padding-left: 20px;
}

.action-icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.action-icon-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.action-icon-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Giant Full-Width Hero Section */
.hero-banner {
    position: relative;
    width: 100%;
    height: 75vh;
    min-height: 550px;
    display: flex;
    align-items: flex-end;
    overflow: hidden; /* prevents Ken Burns zoom spillover */
    padding: 0 60px 80px 60px;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Cinematic Background Transition Layers (Cross-fade & Ken Burns effect) */
.hero-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center 20%;
    z-index: 0;
    opacity: 0;
    transform: scale(1.0);
    transition: opacity 1.2s cubic-bezier(0.25, 0.8, 0.25, 1), transform 8s linear;
}

.hero-bg-layer.active-zoom {
    transform: scale(1.06); /* subtle Ken Burns zoom-in */
}

/* Hero Carousel Dot Indicators */
.hero-dots {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-dot {
    width: 5px;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.4s ease, transform 0.4s ease;
}

.hero-dot.active {
    width: 14px; /* subtle pill expansion */
    background: var(--accent-color);
    box-shadow: 0 0 8px var(--accent-glow);
}

.hero-dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Hero Content Fade Transitions */
.hero-fade-out {
    opacity: 0 !important;
    transform: translateY(12px) !important;
}

.hero-fade-in {
    animation: heroFadeIn 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Cinematic Mask: Gradient to black at bottom and darken left side */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(to top, #000000 0%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0.1) 100%),
        linear-gradient(to right, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.hero-tag {
    background: transparent;
    color: var(--accent-color);
    align-self: flex-start;
    padding: 0;
    border-radius: 0;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.05;
    color: #ffffff;
    text-transform: uppercase;
}

/* Metadata Row: Rating, Year, Genres */
.hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.hero-meta span.rating-badge {
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
}

.hero-meta-divider {
    color: var(--text-muted);
}

.hero-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* Play & See More Buttons */
.btn-hero-play {
    background: #ffffff !important;
    color: #000000 !important;
    border-radius: 30px !important;
    font-weight: 700 !important;
    padding: 12px 30px !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.btn-hero-play:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

.btn-hero-play svg {
    fill: currentColor;
    width: 14px;
    height: 14px;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border-radius: 30px !important;
    font-weight: 700 !important;
    padding: 12px 30px !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.05);
}

.btn-glass svg {
    stroke: currentColor;
    width: 16px;
    height: 16px;
    fill: none;
}

/* Settings Right-Sidebar Drawer */
aside#sidebar {
    position: fixed;
    right: -360px;
    top: 0;
    width: 360px;
    height: 100vh;
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(35px) saturate(180%);
    -webkit-backdrop-filter: blur(35px) saturate(180%);
    border-left: 1px solid var(--border-color);
    border-right: none;
    padding: 36px 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    z-index: 1000;
    overflow-y: auto;
    transition: var(--transition-smooth);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.8);
}

aside#sidebar.open {
    right: 0;
}

/* Sidebar Drawer Backdrop Overlay */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: var(--transition-smooth);
}

.drawer-overlay.active {
    display: block;
    opacity: 1;
}

/* Sidebar Close Button */
.sidebar-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

.sidebar-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

/* Main Content Workspace */
main {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 50px;
    margin-top: 0;
}

/* Modular Views */
.dashboard-view {
    display: none;
    flex-direction: column;
    gap: 50px;
    animation: fadeIn 0.4s ease;
}

.dashboard-view.active {
    display: flex;
}

/* Video Player Wrapper - Center Canvas */
.player-wrapper {
    padding: 0 60px;
    margin-top: -20px;
    display: none;
}

.player-wrapper.active {
    display: block;
}

.player-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.player-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 4px;
}

.playing-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.playing-status {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-color);
}

/* Shelf Panels - Horizontal Lists */
.shelf {
    padding: 0 60px;
}

.shelf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.shelf-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
    text-transform: uppercase;
}

.btn-clear-history {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-clear-history:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.shelf-container {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 6px 4px 20px 4px;
    scroll-snap-type: x mandatory;
}

/* Library Catalog Section */
#library-view,
#watch-view {
    padding: 120px 60px 60px 60px; /* Pads header */
}

/* Library Forms & Search */
.library-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: rgba(15, 15, 20, 0.4);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    margin-bottom: 24px;
}

.controls-upper-row {
    display: flex;
    width: 100%;
    gap: 16px;
}

.controls-lower-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 16px;
    flex-wrap: wrap;
}

.search-bar-wrapper {
    position: relative;
    flex: 1;
    width: 100%;
}

.search-bar-wrapper svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-smooth);
}

.search-bar-wrapper input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 14px 20px 14px 48px !important;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    outline: none;
}

.search-bar-wrapper input:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
}

.search-bar-wrapper input:focus ~ svg {
    color: var(--accent-color);
}

.filter-chips-wrapper {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-chip.active {
    background: var(--accent-glow);
    color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Library Content Grid */
.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 24px;
}

/* 2:3 Vertical Movie Poster Card Styles (Netflix/Fmovies Style) */
.media-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.media-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 1px 1.5px var(--accent-color);
}

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

.card-img-wrapper {
    position: relative;
    width: 100%;
    height: 278px; /* Correct 2:3 Aspect ratio for width ~185px */
    background-size: cover;
    background-position: center;
    background-color: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card-img-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 30%, transparent 60%);
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.55);
    z-index: 2;
    pointer-events: none;
}

.card-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
    z-index: 1;
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(10, 10, 12, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
}

.card-rating {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 210, 255, 0.9); /* Accent themed rating */
    color: #000000;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 3;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Top 10 Ribbon Tag */
.top-ten-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #00d2ff 0%, #007aff 100%);
    color: #000000;
    font-weight: 800;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-bottom-right-radius: 10px;
    z-index: 3;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-play-btn {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    opacity: 0;
    transform: scale(0.8);
    transition: var(--transition-smooth);
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.media-card:hover .card-play-btn {
    opacity: 1;
    transform: scale(1);
}

.card-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.card-actions {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-card-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

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

.btn-card-action.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* History Progress Bar inside Cards */
.card-progress-container {
    height: 4px;
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 3;
}

.card-progress-bar {
    height: 100%;
    background: var(--accent-color);
    width: 0;
    border-radius: 0;
    transition: width 0.3s ease;
}

/* Slide-out Sidebar Controls Form elements styling */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tab-navigation {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: var(--radius-md);
    display: flex;
    position: relative;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 10px;
    transition: var(--transition-smooth);
}

.tab-btn.active {
    color: #000000;
    background: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.btn-danger-settings {
    margin: 0;
    width: 100%;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #ef4444;
    justify-content: center;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
}

.btn-danger-settings:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}

textarea {
    resize: none;
    height: 100px;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.row {
    display: flex;
    gap: 12px;
}

.row .form-group {
    flex: 1;
}

/* Custom iOS Style Toggles inside Drawer */
.toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.toggle-wrapper:hover {
    background: rgba(255, 255, 255, 0.04);
}

.toggle-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.ios-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Primary Action Buttons */
.btn-primary {
    background: #ffffff;
    color: #000000;
    border: none;
    padding: 14px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 255, 255, 0.2);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Dynamic Frosted overlay Modals System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000; /* Must overlay sidebar */
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

.modal-container {
    background: rgba(15, 15, 20, 0.95);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    padding: 32px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-overlay.open .modal-container {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.4rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

/* Toast Notice Alerts */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(20, 20, 25, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    color: var(--text-primary);
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 2100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.btn-page {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-page:hover:not(:disabled) {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-page:active:not(:disabled) {
    transform: translateY(0);
}

.btn-page:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.page-indicator {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

/* Static gradient generator class for cards */
.gradient-card-1 { background-image: linear-gradient(135deg, #1c1917 0%, #0c0a09 100%); }
.gradient-card-2 { background-image: linear-gradient(135deg, #0f172a 0%, #020617 100%); }
.gradient-card-3 { background-image: linear-gradient(135deg, #18181b 0%, #09090b 100%); }
.gradient-card-4 { background-image: linear-gradient(135deg, #1e1b4b 0%, #03001e 100%); }
.gradient-card-5 { background-image: linear-gradient(135deg, #022c22 0%, #020617 100%); }

/* Keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    header.main-header {
        padding: 0 30px;
    }
    
    .hero-banner {
        padding: 0 30px 60px 30px;
    }
    
    .hero-title {
        font-size: 2.6rem;
    }
    
    .player-wrapper, 
    .shelf {
        padding: 0 30px;
    }
    
    #library-view,
    #watch-view {
        padding: 120px 30px 40px 30px;
    }
}

@media (max-width: 768px) {
    header.main-header {
        padding: 0 20px;
        height: 70px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    /* Remove the icon next to ezzOS logo on mobile screens */
    .logo-icon {
        display: none !important;
    }
    
    .nav-links-right {
        gap: 12px;
    }
    
    .nav-link span {
        display: none; /* Hide text label on mobile, leave icon */
    }
    
    .hero-banner {
        padding: 0 20px 55px 20px;
        height: 65vh;
        min-height: 480px;
    }
    
    /* Center hero content and actions on mobile */
    .hero-content {
        align-items: center;
        text-align: center;
        margin: 0 auto;
    }
    
    .hero-tag {
        align-self: center;
    }
    
    .hero-meta {
        justify-content: center;
        font-size: 0.85rem;
    }
    
    .hero-desc {
        font-size: 0.9rem;
    }
    
    .hero-actions {
        justify-content: center;
        width: 100%;
    }
    
    /* Hide the See More button on mobile */
    .hero-actions .btn-glass {
        display: none !important;
    }
    
    /* Hide play icon inside button */
    .btn-hero-play svg {
        display: none !important;
    }
    
    /* Make the play button larger and centered */
    .btn-hero-play {
        padding: 14px 44px !important;
        font-size: 1.05rem !important;
        font-weight: 700 !important;
        box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25) !important;
    }
    
    .hero-dots {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        bottom: 16px !important;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .player-wrapper, 
    .shelf {
        padding: 0 20px;
    }
    
    #library-view,
    #watch-view {
        padding: 100px 20px 40px 20px;
    }
    
    aside#sidebar {
        width: 100%;
        right: -100%;
    }
    
    /* Shelf Container: size cards down to 30%-40% of standard screen width (approx 125px-130px) */
    .shelf-container .media-card {
        flex: 0 0 125px !important;
        width: 125px !important;
    }
    
    /* Library Grid Columns */
    .library-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
        gap: 12px !important;
    }
    
    /* Poster image height for mobile cards */
    .card-img-wrapper {
        height: 100% !important;
        width: 100% !important;
        position: absolute !important;
        top: 0;
        left: 0;
        border-radius: 12px !important;
        overflow: hidden;
    }

    .card-img-wrapper::after {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.6) 35%, rgba(0, 0, 0, 0.2) 65%, transparent 100%) !important;
        z-index: 1;
    }

    .media-card {
        background: rgba(20, 20, 25, 0.6) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
        border-radius: 12px !important;
        height: 185px !important;
        position: relative !important;
        overflow: hidden !important;
        transition: transform 0.15s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    }

    .media-card:active {
        transform: scale(0.96) !important;
        border-color: rgba(255, 255, 255, 0.15) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
    }
    
    /* Card details on mobile */
    .card-content {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        padding: 10px 8px 8px 8px !important;
        background: transparent !important;
        border-bottom-left-radius: 12px !important;
        border-bottom-right-radius: 12px !important;
        z-index: 2 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        pointer-events: none !important;
    }
    
    .card-content p.card-info {
        display: none !important; /* Hide description text */
    }
    
    /* Hide Add to Wishlist/Delete action buttons inside cards on mobile */
    .card-actions {
        display: none !important;
    }
    
    .card-title {
        font-size: 0.8rem !important;
        font-weight: 700 !important;
        color: #ffffff !important;
        letter-spacing: 0.2px !important;
        margin-bottom: 2px !important;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9) !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }
    
    .card-meta {
        font-size: 0.68rem !important;
        color: rgba(255, 255, 255, 0.75) !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .card-content .card-info {
        font-size: 0.68rem !important;
        color: rgba(255, 255, 255, 0.75) !important;
        font-weight: 600 !important;
        display: inline-block !important;
        margin: 0 !important;
    }
    
    .card-progress-container {
        height: 3px !important;
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        z-index: 3 !important;
    }

    .card-progress-bar {
        background: linear-gradient(90deg, var(--accent-color) 0%, #007aff 100%) !important;
        box-shadow: 0 0 6px var(--accent-color) !important;
    }

    .card-badge {
        top: 8px !important;
        left: 8px !important;
        background: rgba(10, 10, 12, 0.6) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding: 2px 6px !important;
        border-radius: 4px !important;
        font-size: 0.6rem !important;
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
        z-index: 3 !important;
    }

    .card-rating {
        top: 8px !important;
        right: 8px !important;
        background: rgba(255, 179, 0, 0.95) !important;
        color: #000000 !important;
        font-weight: 800 !important;
        padding: 2px 6px !important;
        border-radius: 4px !important;
        font-size: 0.62rem !important;
        z-index: 3 !important;
    }

    .top-ten-badge {
        font-size: 0.6rem !important;
        padding: 3px 8px !important;
        border-bottom-right-radius: 8px !important;
        z-index: 3 !important;
    }
    
    /* Scale down login card padding on mobile */
    .login-card {
        padding: 24px !important;
        margin: 20px !important;
        max-width: 340px !important;
    }

    /* Mobile Library Search and Filter controls styling */
    .library-controls {
        padding: 12px 14px !important;
        gap: 12px !important;
        margin-bottom: 16px !important;
        border-radius: var(--radius-md) !important;
        background: rgba(15, 15, 20, 0.6) !important;
    }

    .controls-upper-row {
        gap: 8px !important;
    }

    .search-bar-wrapper input {
        padding: 10px 16px 10px 36px !important;
        font-size: 0.85rem !important;
        border-radius: var(--radius-sm) !important;
        height: 40px !important;
    }

    .search-bar-wrapper svg {
        left: 12px !important;
        width: 16px !important;
        height: 16px !important;
    }

    #btn-toggle-advanced-filters {
        padding: 10px !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: var(--radius-sm) !important;
        flex-shrink: 0 !important;
    }

    #btn-toggle-advanced-filters svg {
        width: 16px !important;
        height: 16px !important;
    }

    #advanced-filters-panel {
        margin-top: 12px !important;
        padding-top: 12px !important;
    }

    .filters-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    /* Make the 5th item (Language) span 2 columns */
    .filters-grid .form-group:nth-child(5) {
        grid-column: span 2 !important;
    }

    .filters-grid .form-group {
        gap: 4px !important;
    }

    .filters-grid label {
        font-size: 0.7rem !important;
        letter-spacing: 0.3px !important;
    }

    .filters-grid select,
    .filters-grid input {
        padding: 8px 10px !important;
        font-size: 0.8rem !important;
        border-radius: var(--radius-sm) !important;
        background: rgba(255, 255, 255, 0.05) !important;
        height: 36px !important;
    }

    #advanced-filters-panel > div:last-child {
        margin-top: 12px !important;
        padding-top: 10px !important;
    }

    #advanced-filters-panel button[onclick="resetAdvancedFilters()"] {
        padding: 8px 16px !important;
        font-size: 0.78rem !important;
        border-radius: var(--radius-sm) !important;
        width: 100% !important; /* full width button for easier tapping on mobile */
    }

    /* Scrollable Horizontal Row for Filter Chips on Mobile */
    .filter-chips-wrapper {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 6px !important;
        width: 100% !important;
        padding-bottom: 4px !important;
        -ms-overflow-style: none !important;
        scrollbar-width: none !important;
    }

    .filter-chips-wrapper::-webkit-scrollbar {
        display: none !important;
    }

    .filter-chip {
        padding: 6px 12px !important;
        font-size: 0.78rem !important;
        border-radius: 16px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    #library-category-header {
        margin-bottom: 14px !important;
        padding-bottom: 10px !important;
    }

    #library-category-title {
        font-size: 1.2rem !important;
        padding-left: 8px !important;
        border-left-width: 3px !important;
    }

    #library-category-header button {
        padding: 6px 14px !important;
        font-size: 0.75rem !important;
    }

    /* Mobile Player watch screen styling */
    #watch-view {
        padding: 16px 14px 60px 14px !important;
    }

    .watch-navigation {
        margin-bottom: 16px !important;
        gap: 8px !important;
    }
    
    #btn-back-to-home {
        padding: 8px 16px !important;
        font-size: 0.82rem !important;
        border-radius: var(--radius-sm) !important;
        height: 36px !important;
    }

    .player-wrapper {
        padding: 0 !important; /* Full width edge-to-edge on mobile */
        margin-top: 0 !important;
    }

    .player-container {
        padding-top: 0 !important;
        width: 100% !important;
        aspect-ratio: 16 / 9 !important;
        min-height: 280px !important;
        border-radius: 12px !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
    }

    .player-info-bar {
        background: rgba(15, 15, 20, 0.65) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        border-radius: 12px !important;
        padding: 10px 14px !important;
        margin-bottom: 12px !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 12px !important;
    }
    
    .playing-title {
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        letter-spacing: 0.2px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 60% !important;
    }
    
    .playing-status {
        font-size: 0.75rem !important;
        font-weight: 600 !important;
        color: rgba(255, 255, 255, 0.8) !important;
        background: rgba(255, 255, 255, 0.05) !important;
        padding: 4px 8px !important;
        border-radius: 6px !important;
        border: 1px solid rgba(255, 255, 255, 0.04) !important;
        flex-shrink: 0 !important;
    }

    .status-dot {
        width: 8px !important;
        height: 8px !important;
        animation: livePulse 1.5s infinite alternate !important;
    }

    @keyframes livePulse {
        0% { transform: scale(0.85); opacity: 0.7; }
        100% { transform: scale(1.15); opacity: 1; }
    }

    .player-tv-controls-container {
        background: rgba(15, 15, 20, 0.6) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        border-radius: 12px !important;
        padding: 14px !important;
        margin-top: 14px !important;
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
    }
    
    .tv-controls-header {
        margin-bottom: 10px !important;
        padding-bottom: 8px !important;
        gap: 10px !important;
    }
    
    .season-select-wrapper label {
        font-size: 0.8rem !important;
    }
    
    .player-select {
        padding: 5px 10px !important;
        font-size: 0.8rem !important;
        border-radius: var(--radius-sm) !important;
        height: 32px !important;
        background: rgba(255, 255, 255, 0.05) !important;
    }
    
    .episodes-count-label {
        font-size: 0.75rem !important;
    }
    
    .episodes-grid {
        grid-template-columns: repeat(4, 1fr) !important; /* 4 items in a row instead of wrapping weirdly */
        gap: 8px !important;
        max-height: 220px !important;
    }
    
    .episode-picker-btn {
        padding: 11px 0 !important; /* Bigger tap target vertically */
        font-size: 0.82rem !important;
        border-radius: var(--radius-sm) !important;
        border: 1px solid rgba(255, 255, 255, 0.04) !important;
        background: rgba(255, 255, 255, 0.04) !important;
    }
    
    .episode-picker-btn.active {
        background: linear-gradient(135deg, var(--accent-color), rgba(255,255,255,0.1)) !important;
        color: #ffffff !important;
        font-weight: 700 !important;
        border-color: var(--accent-color) !important;
        box-shadow: 0 4px 12px var(--accent-glow) !important;
    }
}


/* ==========================================
   Interactive Profile Dropdown & Login Form
   ========================================== */

.profile-dropdown {
    position: absolute;
    right: 0;
    top: 50px;
    width: 280px;
    background: rgba(10, 10, 12, 0.96);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    flex-direction: column;
    z-index: 1001;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform-origin: top right;
    animation: fadeInScale 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Profile Header inside dropdown */
.profile-header {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 8px;
}

.profile-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Sleek inputs */
.login-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    padding: 10px 14px !important;
    font-size: 0.85rem !important;
    border-radius: var(--radius-sm) !important;
    transition: var(--transition-smooth) !important;
    outline: none !important;
}

.login-input:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 8px var(--accent-glow) !important;
}

/* User Card */
.profile-user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
}

.profile-avatar-wrapper {
    position: relative;
    width: 44px;
    height: 44px;
}

.profile-avatar-wrapper::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent-color), transparent, var(--accent-color));
    animation: rotateConic 3s linear infinite;
    z-index: 0;
}

@keyframes rotateConic {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.profile-avatar {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #121214;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--accent-color);
    font-size: 1.1rem;
    z-index: 1;
}

.profile-user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.profile-username {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.profile-rank-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--accent-color);
    background: var(--accent-glow);
    padding: 2px 8px;
    border-radius: 20px;
    margin-top: 4px;
    align-self: flex-start;
    white-space: nowrap;
    border: 1px solid var(--accent-glow);
}

/* Stats grid */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.profile-stat-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 4px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-stat-box .stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-stat-box .stat-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Theme picker */
.theme-selector-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.section-micro-title {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.theme-dots-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.theme-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
    padding: 0;
}

.theme-dot:hover {
    transform: scale(1.2);
}

.theme-dot.active {
    border-color: #ffffff;
    box-shadow: 0 0 10px var(--accent-color);
}

/* Quick watchlist */
.quick-watchlist-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quick-watchlist-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.watchlist-micro-card {
    position: relative;
    flex: 0 0 68px;
    height: 96px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.watchlist-micro-card:hover {
    transform: scale(1.05);
    border-color: var(--accent-color);
    box-shadow: 0 4px 10px var(--accent-glow);
}

.watchlist-micro-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 80%);
}

.watchlist-micro-title {
    position: absolute;
    bottom: 4px;
    left: 4px;
    right: 4px;
    font-size: 0.55rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 1;
}

.watchlist-empty-msg {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 10px 0;
    text-align: center;
    width: 100%;
}

/* ==========================================
   Full-Screen Login Gate Overlay
   ========================================== */

.login-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(15, 15, 20, 0.7) 0%, rgba(0, 0, 0, 0.95) 100%), 
                url('https://images.unsplash.com/photo-1489599849927-2ee91cede3ba?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    backdrop-filter: blur(35px) saturate(140%);
    -webkit-backdrop-filter: blur(35px) saturate(140%);
    z-index: 10000; /* Overrides everything, header, settings, etc. */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.4s;
}

.login-gate-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-card {
    background: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: loginCardIntro 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes loginCardIntro {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 12px;
    letter-spacing: -0.2px;
}

.login-card-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.login-field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Guest avatar customizations */
.guest-avatar-wrapper::before {
    background: conic-gradient(from 0deg, var(--text-muted), transparent, var(--text-muted)) !important;
    animation: rotateConic 6s linear infinite !important;
}

.guest-avatar {
    color: var(--text-secondary) !important;
    font-size: 1.3rem !important;
}

/* ── Auth Tabs (Sign In / Sign Up switcher) ────────────────────────────────── */
.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 24px;
    gap: 4px;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 9px 12px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.auth-tab.active {
    background: #ffffff;
    color: #000000;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.auth-tab:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

/* Auth Error Message */
.auth-error-msg {
    font-size: 0.8rem;
    color: #f87171;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 14px;
    line-height: 1.4;
}

/* Tighten header margin for tabbed auth layout */
.login-card-header {
    margin-bottom: 20px;
}

/* TV Show Watch View Controls */
.player-tv-controls-container {
    background: rgba(15, 15, 20, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-top: 18px;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

.tv-controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.season-select-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.season-select-wrapper label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.player-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.player-select:focus {
    border-color: var(--accent-color);
}

.episodes-count-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 4px;
}

.episode-picker-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 0;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    transition: var(--transition-smooth);
}

.episode-picker-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.episode-picker-btn.active {
    background: var(--accent-color);
    color: #000000;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
}

.episodes-grid::-webkit-scrollbar {
    width: 6px;
}

.episodes-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
    border-radius: var(--radius-sm);
}

.episodes-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
}

.episodes-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* View All button Styles */
.btn-view-all {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-view-all:hover {
    background: var(--accent-glow);
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 12px var(--accent-glow);
}

/* Advanced Filter Select and Input Elements Styling */
#advanced-filters-panel select,
#advanced-filters-panel input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 12px;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

#advanced-filters-panel select:focus,
#advanced-filters-panel input:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
}

#advanced-filters-panel select:hover,
#advanced-filters-panel input:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Movie/TV Detail Bottom Sheet Styling */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.bottom-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bottom-sheet-container {
    width: 100%;
    max-width: 700px;
    background: #0b0b0d;
    border-top: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.6);
}

.bottom-sheet-overlay.active .bottom-sheet-container {
    transform: translateY(0);
}

.bottom-sheet-drag-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    margin: 10px auto 0 auto;
    flex-shrink: 0;
    z-index: 11;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.bottom-sheet-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12;
    transition: var(--transition-smooth);
}

.bottom-sheet-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.bottom-sheet-hero {
    width: 100%;
    height: 280px;
    background-size: cover;
    background-position: center 20%;
    position: relative;
    flex-shrink: 0;
}

.bottom-sheet-overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, #0b0b0d 0%, rgba(11, 11, 13, 0.4) 65%, transparent 100%);
}

.bottom-sheet-body {
    padding: 0 32px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

.bottom-sheet-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bottom-sheet-tag {
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.bottom-sheet-title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    text-transform: uppercase;
}

.bottom-sheet-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.bottom-sheet-meta span.rating-badge {
    color: var(--accent-color);
    font-weight: 700;
}

.bottom-sheet-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
    max-height: 150px;
    overflow-y: auto;
}

.bottom-sheet-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.btn-bs-play {
    padding: 10px 24px !important;
    font-size: 0.9rem !important;
    border-radius: 24px !important;
    background: #ffffff !important;
    color: #000000 !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700 !important;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-bs-play svg {
    width: 16px !important;
    height: 16px !important;
    margin-right: 4px !important;
}

.btn-bs-play:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-bs-party,
.btn-bs-trailer {
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
    border-radius: 24px !important;
    gap: 8px !important;
}

.btn-bs-party svg,
.btn-bs-trailer svg {
    width: 16px !important;
    height: 16px !important;
}

.btn-bs-wishlist {
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.btn-bs-wishlist svg {
    width: 18px !important;
    height: 18px !important;
}

.btn-bs-wishlist:hover {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.18) !important;
}

.btn-bs-wishlist.liked:hover {
    background: rgba(255, 45, 85, 0.15) !important;
    border-color: rgba(255, 45, 85, 0.4) !important;
}

/* Responsive Overrides for Mobile */
@media (max-width: 600px) {
    .bottom-sheet-container {
        max-height: 90vh;
    }
    .bottom-sheet-hero {
        height: 200px;
    }
    .bottom-sheet-body {
        padding: 0 20px 24px 20px;
    }
    .bottom-sheet-title {
        font-size: 1.6rem;
    }
    .bottom-sheet-actions {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        align-items: center;
    }
    .btn-bs-play {
        flex: 1 !important;
        justify-content: center;
        padding: 10px 20px !important;
        font-size: 0.9rem !important;
        border-radius: 24px !important;
    }
    .btn-bs-party .btn-text,
    .btn-bs-trailer .btn-text {
        display: none;
    }
    .btn-bs-party,
    .btn-bs-trailer {
        width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0;
        flex: none !important;
    }
    .btn-bs-wishlist {
        width: 40px !important;
        height: 40px !important;
        border-radius: 50% !important;
        flex-shrink: 0;
    }
}

/* Card Like Button Styling */
.btn-card-like {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    padding: 0;
}

.btn-card-like:hover {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.btn-card-like.liked {
    border-color: rgba(255, 45, 85, 0.2);
}

.btn-card-like.liked:hover {
    background: rgba(255, 45, 85, 0.1);
}

/* Status Check Loading Spinner */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.spin {
    animation: spin 1s linear infinite;
}

/* Cast Carousel Layout */
.cast-carousel {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
}

.cast-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 76px;
    flex-shrink: 0;
    gap: 4px;
}

.cast-photo {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1.5px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.cast-photo:hover {
    transform: scale(1.08);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
}

.cast-name {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.cast-character {
    font-size: 0.6rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Admin Table styling */
.admin-table-row {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.2s;
}

.admin-table-row:hover {
    background: rgba(255,255,255,0.02);
}

.admin-cell-info {
    padding: 12px 16px;
}

.admin-cell-actions {
    padding: 12px 16px;
    text-align: center;
}

.btn-toggle-access {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
}

.btn-toggle-access.approved {
    background: rgba(16, 185, 129, 0.12);
    border-color: #10b981;
    color: #10b981;
}

.btn-toggle-access.approved:hover {
    background: rgba(16, 185, 129, 0.2);
}

.btn-toggle-access.revoked {
    background: rgba(239, 68, 68, 0.12);
    border-color: #ef4444;
    color: #ef4444;
}

.btn-toggle-access.revoked:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ── Watch Party Styling ────────────────────────────────────────────── */

.watch-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 24px auto;
}

.watch-layout-container {
    display: flex;
    gap: 24px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    align-items: flex-start;
}

.watch-main-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Player External Controls and Tip Box */
.player-external-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 15, 20, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 20px;
    margin-top: 14px;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    gap: 16px;
    flex-wrap: wrap;
}

.player-control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-control-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.player-tip-box {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.player-tip-box svg {
    color: var(--accent-color);
    flex-shrink: 0;
}

.watch-party-sidebar {
    width: 350px;
    background: rgba(10, 10, 12, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-height: 480px;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    overflow: hidden;
}

.party-sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.party-tab {
    flex: 1;
    padding: 14px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-smooth);
    border-bottom: 2px solid transparent;
}

.party-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.02);
}

.party-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.party-sidebar-content-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 520px;
}

/* Chat view */
#party-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Chat bubble */
.chat-message {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 90%;
    animation: chatMessageFadeIn 0.25s ease forwards;
}

@keyframes chatMessageFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-message.self {
    align-self: flex-end;
}

.chat-message.system {
    align-self: center;
    max-width: 100%;
}

.chat-msg-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.chat-message.self .chat-msg-header {
    flex-direction: row-reverse;
}

.chat-msg-sender {
    font-weight: 700;
    color: #ffffff;
}

.chat-msg-sender.host {
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-msg-sender.host::after {
    content: 'HOST';
    font-size: 0.6rem;
    background: var(--accent-glow);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 800;
}

.chat-msg-time {
    opacity: 0.5;
}

.chat-msg-bubble {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 12px;
    border-top-left-radius: 2px;
    font-size: 0.85rem;
    line-height: 1.4;
    word-break: break-word;
}

.chat-message.self .chat-msg-bubble {
    background: var(--accent-glow);
    border-color: var(--accent-color);
    border-top-left-radius: 12px;
    border-top-right-radius: 2px;
}

.chat-message.system .chat-msg-bubble {
    background: rgba(255, 255, 255, 0.02);
    border-color: transparent;
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.75rem;
    padding: 6px 12px;
    text-align: center;
}

/* Chat Form input styling */
#party-chat-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.25);
}

#party-chat-form input {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    outline: none;
    color: #ffffff;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
}

#party-chat-form input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.06);
}

/* People tab */
#party-people-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.party-person-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.party-person-avatar {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent-color), #ff2d55);
    color: #ffffff;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.party-person-name {
    font-weight: 600;
    color: #ffffff;
}

.party-person-badge {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: var(--text-secondary);
}

.party-person-badge.host {
    background: rgba(0, 210, 255, 0.15);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

/* Sync Panel */
.party-panel {
    background: rgba(15, 15, 20, 0.4);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

/* Pulse Dot animation */
.pulse-dot {
    animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.9); opacity: 0.6; box-shadow: 0 0 0 0 rgba(255, 45, 85, 0.7); }
    70% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 6px rgba(255, 45, 85, 0); }
    100% { transform: scale(0.9); opacity: 0.6; box-shadow: 0 0 0 0 rgba(255, 45, 85, 0); }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .watch-layout-container {
        flex-direction: column;
        gap: 20px;
        align-items: stretch !important;
    }
    
    .watch-main-column {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .watch-party-sidebar {
        width: 100%;
        min-height: auto;
    }
    
    .party-sidebar-content-view {
        height: 350px;
    }

    .player-external-controls {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 12px 14px !important;
        gap: 12px !important;
    }
    
    .player-tip-box {
        font-size: 0.78rem !important;
        padding: 8px 10px !important;
    }
}

/* Floating Watch Party Navigation Bar */
.floating-party-bar {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 32px;
    background: rgba(10, 10, 12, 0.75);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
}

.floating-party-bar:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.floating-nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.floating-nav-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.floating-nav-btn.active {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.floating-nav-btn svg {
    transition: var(--transition-smooth);
    color: currentColor;
}

.floating-nav-btn:hover svg {
    filter: drop-shadow(0 0 5px var(--accent-color));
}

.floating-nav-btn.party-btn {
    position: relative;
}

.floating-nav-btn.party-btn:hover {
    color: var(--accent-color);
}

.floating-nav-btn.party-btn .pulse-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-color);
    animation: pulseGlowCyan 1.8s infinite;
}

@keyframes pulseGlowCyan {
    0% { transform: scale(0.9); opacity: 0.6; box-shadow: 0 0 0 0 rgba(0, 210, 255, 0.7); }
    70% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 6px rgba(0, 210, 255, 0); }
    100% { transform: scale(0.9); opacity: 0.6; box-shadow: 0 0 0 0 rgba(0, 210, 255, 0); }
}

/* Watch Party Bottom Sheet specific styles */
.wp-hero-content {
    position: absolute;
    bottom: 20px;
    left: 32px;
    right: 32px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.wp-hero-icon-wrapper {
    background: var(--accent-glow);
    border: 2px solid var(--accent-color);
    padding: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--accent-glow);
    color: var(--accent-color);
    transition: var(--transition-smooth);
}

.wp-tutorial-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 10px;
}

.wp-tutorial-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: var(--transition-smooth);
}

.wp-tutorial-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.wp-tutorial-card h4 {
    font-size: 1rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    margin: 0;
}

.wp-tutorial-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
}

/* Watch Party Join Form Section Styling */
.wp-join-container {
    border-top: 1px dashed var(--border-color);
    margin-top: 10px;
    padding-top: 20px;
    padding-bottom: 30px; /* give space at bottom so it is not too tight */
}

.wp-join-form {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.wp-join-input-wrapper {
    flex: 1;
    position: relative;
    width: 100%;
}

#wp-sheet-input-id {
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 3px;
    padding: 13px 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    transition: var(--transition-smooth);
    width: 100%;
    outline: none;
}

#wp-sheet-input-id:focus {
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 12px var(--accent-glow);
}

#wp-sheet-input-id::placeholder {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: none;
    color: var(--text-secondary);
    opacity: 0.6;
}

.wp-join-btn {
    margin: 0;
    padding: 13px 28px;
    font-size: 0.95rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    height: 100%;
}

/* Responsive adjustment for watch party tutorial layout */
@media (max-width: 600px) {
    /* Make floating nav bar simple on mobile (circular FABs inside pill) */
    .floating-nav-btn span {
        display: none !important;
    }
    
    .floating-nav-btn {
        padding: 12px !important;
        border-radius: 50% !important;
        width: 44px;
        height: 44px;
        justify-content: center;
    }

    .floating-party-bar {
        bottom: 20px;
        padding: 4px;
        gap: 4px;
        border-radius: 28px;
    }

    .floating-nav-btn.party-btn .pulse-dot {
        top: 8px;
        right: 8px;
    }

    /* Simplify bottom sheet on mobile (hide tutorial cards, shrink hero) */
    .bottom-sheet-hero#wp-hero-banner {
        height: 120px !important;
    }

    .wp-hero-content {
        left: 20px;
        right: 20px;
        bottom: 12px;
        gap: 10px;
    }

    .wp-hero-icon-wrapper {
        padding: 8px;
    }

    .wp-hero-icon-wrapper svg {
        width: 22px;
        height: 22px;
    }

    .wp-tutorial-grid {
        display: none !important; /* Hide step cards to make it clean & simple */
    }

    .wp-join-form {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .wp-join-btn {
        width: 100%;
        padding: 14px;
        height: auto;
    }

    .wp-join-container {
        padding-bottom: 20px; /* Adjust spacing on mobile */
    }
}




/* Frosted Brand/Studio Hub Cards Styling */
.brand-hubs-container {
    display: flex;
    gap: 16px;
    padding: 10px 60px 24px 60px;
    overflow-x: auto;
    width: 100%;
}

.brand-card {
    flex: 0 0 calc(16.66% - 14px);
    min-width: 140px;
    height: 72px;
    position: relative;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.brand-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.brand-card:hover {
    transform: translateY(-5px) scale(1.03);
    border-color: rgba(255, 255, 255, 0.2);
}

.brand-logo-text {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #ffffff;
    z-index: 2;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    text-transform: uppercase;
}

/* Custom logo styling per brand */
.brand-card.marvel .brand-logo-text {
    background: #e62429;
    padding: 2px 8px;
    border-radius: 2px;
    font-family: 'Impact', 'Outfit', sans-serif;
    letter-spacing: 0.5px;
}

.brand-card.hbo .brand-logo-text {
    font-family: 'Cinzel', 'Outfit', serif;
    font-weight: 900;
    letter-spacing: 1px;
}

.brand-card.netflix .brand-logo-text {
    color: #e50914;
    font-family: 'Bebas Neue', 'Outfit', sans-serif;
    letter-spacing: 1.5px;
    font-weight: 800;
}

.brand-card.disney .brand-logo-text {
    font-family: 'Outfit', cursive, sans-serif;
    font-style: italic;
    font-weight: 700;
}

.brand-card.pixar .brand-logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: 4px;
}

.brand-card.appletv .brand-logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Hover glow shadows per brand */
.brand-card.marvel:hover {
    box-shadow: 0 10px 25px rgba(230, 36, 41, 0.35);
    border-color: rgba(230, 36, 41, 0.5);
}

.brand-card.hbo:hover {
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.brand-card.netflix:hover {
    box-shadow: 0 10px 25px rgba(229, 9, 20, 0.35);
    border-color: rgba(229, 9, 20, 0.5);
}

.brand-card.disney:hover {
    box-shadow: 0 10px 25px rgba(0, 114, 210, 0.35);
    border-color: rgba(0, 114, 210, 0.5);
}

.brand-card.pixar:hover {
    box-shadow: 0 10px 25px rgba(0, 210, 255, 0.35);
    border-color: rgba(0, 210, 255, 0.5);
}

.brand-card.appletv:hover {
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 600px) {
    .brand-hubs-container {
        padding: 4px 16px 16px 16px;
    }
    .brand-card {
        height: 60px;
        min-width: 120px;
    }
    .brand-logo-text {
        font-size: 0.95rem;
    }
}
