/* ==========================================================================
   MovieBox Cinema Engine — Modern Dark Cinema Theme & Advanced Video Player
   ========================================================================== */

:root {
    --bg-main: #07080c;
    --bg-surface: #0f1118;
    --bg-surface-elevated: #161924;
    --bg-glass: rgba(15, 17, 24, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.22);

    --primary: #e50914;
    --primary-glow: rgba(229, 9, 20, 0.4);
    --primary-hover: #ff1f29;

    --accent-blue: #00b4d8;
    --accent-blue-glow: rgba(0, 180, 216, 0.35);

    --green-accent: #10b981;
    --gold-accent: #f59e0b;
    --bangla-accent: #059669;

    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
    --shadow-elevated: 0 20px 45px -10px rgba(0, 0, 0, 0.85);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

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

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 8, 12, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 12px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 12px var(--primary-glow));
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: inline-flex;
    align-items: center;
}

.brand-parx {
    color: #ffffff;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.brand-stream {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    letter-spacing: 0.5px;
    margin-left: 2px;
}

.brand-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--accent-blue);
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
}

/* Search Bar with Year Selector */
.search-wrapper {
    flex: 1;
    max-width: 580px;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 6px 16px;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-glow);
    background: var(--bg-surface-elevated);
}

.search-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    margin-right: 10px;
    flex-shrink: 0;
}

.search-box input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

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

.search-year-select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    margin-right: 6px;
    transition: var(--transition);
}

.search-year-select:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.clear-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.clear-btn:hover {
    color: var(--text-primary);
}

/* Autocomplete Suggestion Dropdown */
.suggest-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    max-height: 380px;
    overflow-y: auto;
    z-index: 110;
    display: none;
    box-shadow: var(--shadow-elevated);
}

.suggest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--transition);
}

.suggest-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.suggest-poster {
    width: 36px;
    height: 52px;
    border-radius: 4px;
    object-fit: cover;
    background: var(--bg-surface);
}

.suggest-info {
    flex: 1;
    overflow: hidden;
}

.suggest-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggest-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 2px;
}

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
}

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

.nav-link.active {
    color: var(--text-primary);
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* ==========================================================================
   Filter & Discover Drawer
   ========================================================================== */

.filter-drawer {
    display: none;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 28px;
    transition: var(--transition);
}

.filter-drawer.active {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.filter-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-item select {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
}

.filter-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* ==========================================================================
   Hero Spotlight Section
   ========================================================================== */

.hero-section {
    position: relative;
    min-height: 520px;
    max-width: 1440px;
    margin: 24px auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-elevated);
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    transition: background-image 0.5s ease;
    filter: brightness(0.7);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #07080c 25%, rgba(7, 8, 12, 0.8) 55%, rgba(7, 8, 12, 0.2) 100%),
                linear-gradient(0deg, #07080c 5%, transparent 60%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 48px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.badge {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'JetBrains Mono', monospace;
}

.badge-primary { background: var(--primary); color: #fff; }
.badge-accent { background: rgba(0, 180, 216, 0.2); color: var(--accent-blue); border: 1px solid var(--accent-blue); }
.badge-gold { background: rgba(245, 158, 11, 0.2); color: var(--gold-accent); border: 1px solid var(--gold-accent); }
.badge-green { background: rgba(16, 185, 129, 0.2); color: var(--green-accent); border: 1px solid var(--green-accent); }
.badge-ghost { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); border: 1px solid var(--border-color); }

.hero-title {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

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

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    backdrop-filter: blur(8px);
}

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

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-ghost {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-hover);
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--accent-blue);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-text:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Catalog Media Grids & Cards
   ========================================================================== */

.main-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 28px 48px;
}

.catalog-section {
    margin-bottom: 48px;
}

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

.section-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 20px;
}

/* Media Card */
.media-card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.media-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card);
}

.card-poster-wrap {
    position: relative;
    width: 100%;
    padding-top: 145%;
    background: #141620;
    overflow: hidden;
}

.card-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.card-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.card-play-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--primary-glow);
    transform: scale(0.8);
    transition: transform 0.25s ease;
}

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

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

.card-badge-top {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 4px;
}

.card-badge-rating {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: var(--gold-accent);
    font-weight: 700;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.card-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

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

/* ==========================================================================
   Movie Details Modal
   ========================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.detail-dialog {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 980px;
    max-height: 90vh;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow-y: auto;
    box-shadow: var(--shadow-elevated);
}

.modal-close-icon {
    position: absolute;
    top: 14px;
    right: 18px;
    z-index: 20;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #fff;
    font-size: 28px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close-icon:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.detail-hero {
    position: relative;
    min-height: 340px;
    background-size: cover;
    background-position: center top;
    padding: 32px;
    display: flex;
    align-items: flex-end;
}

.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #0f1118 10%, rgba(15, 17, 24, 0.8) 60%, rgba(15, 17, 24, 0.3) 100%);
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 28px;
    align-items: flex-end;
    width: 100%;
}

.detail-poster-wrap {
    width: 170px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-hover);
}

.detail-poster {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.detail-main-info {
    flex: 1;
}

.detail-badge-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.detail-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 4px;
}

.detail-tagline {
    font-size: 14px;
    font-style: italic;
    color: var(--accent-blue);
    margin-bottom: 10px;
}

.genre-tag-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.genre-tag {
    font-size: 11px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.detail-synopsis {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
    max-height: 80px;
    overflow-y: auto;
}

.detail-actions {
    display: flex;
    gap: 12px;
}

.detail-section {
    padding: 24px 32px;
    border-top: 1px solid var(--border-color);
}

.detail-section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* Cast Grid */
.cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
}

.cast-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    text-align: center;
    padding-bottom: 8px;
}

.cast-photo {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: #181b24;
}

.cast-name {
    font-size: 12px;
    font-weight: 700;
    margin-top: 6px;
    padding: 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cast-character {
    font-size: 11px;
    color: var(--text-muted);
    padding: 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Streaming Feature Pill */
.feature-badges-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.feature-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
}

.feat-icon {
    font-size: 24px;
}

.feature-pill strong {
    display: block;
    font-size: 13px;
}

.feature-pill p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==========================================================================
   Advanced Cinema Video Player Modal
   ========================================================================== */

.player-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

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

.player-shell {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1180px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-elevated);
    display: flex;
    flex-direction: column;
}

/* Player Top Bar */
.player-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-surface-elevated);
    border-bottom: 1px solid var(--border-color);
}

.player-stream-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.player-badge-strip {
    display: flex;
    gap: 6px;
    margin-top: 3px;
}

.player-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0 6px;
    transition: var(--transition);
}

.player-close-btn:hover {
    color: #fff;
    transform: scale(1.15);
}

/* Video Stage Container */
.video-container {
    position: relative;
    width: 100%;
    background: #000;
    aspect-ratio: 16 / 9;
    max-height: 600px;
    overflow: hidden;
    user-select: none;
}

#videoPlayer {
    width: 100%;
    height: 100%;
    object-fit: contain;
    outline: none;
    cursor: pointer;
}

/* Center Play Indicator */
.center-play-indicator {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.center-play-indicator.flash {
    opacity: 1;
    animation: indicatorPop 0.4s ease forwards;
}

@keyframes indicatorPop {
    0% { transform: scale(0.8); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.9; }
    100% { transform: scale(1.4); opacity: 0; }
}

.play-icon-glow {
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

/* Subtitle Styling Container */
.custom-subtitle-layer {
    position: absolute;
    bottom: 80px;
    left: 5%;
    right: 5%;
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
    transition: all 0.2s ease;
}

.custom-subtitle-layer.pos-top {
    bottom: auto;
    top: 40px;
}

.subtitle-text {
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    max-width: 85%;
    white-space: pre-wrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

::cue {
    background-color: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

/* Player Loader Spinner */
.player-loader {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 15;
    transition: opacity 0.3s ease;
}

.player-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Player Custom Controls Overlay */
.player-controls-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 30%, transparent 60%);
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 20;
}

.player-controls-overlay.hide {
    opacity: 0;
    pointer-events: none;
}

/* Seek Bar / Scrubber */
.progress-bar-container {
    position: relative;
    width: 100%;
    padding: 10px 20px;
    cursor: pointer;
}

.progress-track {
    position: relative;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: height 0.15s ease;
}

.progress-bar-container:hover .progress-track {
    height: 8px;
}

.progress-buffered {
    position: absolute;
    height: 100%;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    width: 0%;
}

.progress-played {
    position: absolute;
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    width: 0%;
    box-shadow: 0 0 10px var(--primary-glow);
}

.progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 14px;
    height: 14px;
    background: #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.15s ease;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
}

.progress-bar-container:hover .progress-thumb {
    transform: translate(-50%, -50%) scale(1);
}

/* Hover Timeline Tooltip */
.time-tooltip {
    position: absolute;
    bottom: 26px;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.progress-bar-container:hover .time-tooltip {
    opacity: 1;
}

/* Bottom Controls Toolbar */
.controls-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 14px;
}

.controls-left, .controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

.ctrl-btn.active {
    color: var(--accent-blue);
    background: rgba(0, 180, 216, 0.2);
}

/* Volume Slider Container */
.volume-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.volume-slider {
    width: 0;
    opacity: 0;
    transition: width 0.25s ease, opacity 0.25s ease;
    accent-color: var(--primary);
    cursor: pointer;
}

.volume-container:hover .volume-slider {
    width: 75px;
    opacity: 1;
}

/* Time Display */
.time-display {
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
    display: flex;
    gap: 4px;
}

.time-sep {
    color: var(--text-muted);
}

/* ==========================================================================
   Dedicated Player Settings Panel (Gear Modal)
   ========================================================================== */

.player-settings-panel {
    position: absolute;
    bottom: 70px;
    right: 20px;
    width: 380px;
    max-height: 440px;
    background: rgba(15, 17, 24, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: none;
    flex-direction: column;
    box-shadow: var(--shadow-elevated);
    z-index: 30;
    animation: fadeIn 0.2s ease;
}

.player-settings-panel.active {
    display: flex;
}

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

@keyframes slideUpMobile {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

.settings-title {
    font-size: 14px;
    font-weight: 700;
}

.settings-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
}

.settings-tabs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border-color);
    padding: 6px;
    gap: 4px;
}

.settings-tab {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 600;
    padding: 7px 4px;
    cursor: pointer;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    text-align: center;
    transition: var(--transition);
}

.settings-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.settings-tab.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.settings-content {
    padding: 14px 16px;
    overflow-y: auto;
    max-height: 320px;
}

.settings-section {
    display: none;
}

.settings-section.active {
    display: block;
}

.settings-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.settings-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.option-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

.option-btn.active {
    background: rgba(0, 180, 216, 0.15);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    font-weight: 700;
}

.custom-sub-upload {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.upload-btn {
    display: block;
    background: var(--bg-surface);
    border: 1px dashed var(--border-hover);
    padding: 10px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-blue);
    cursor: pointer;
    transition: var(--transition);
}

.upload-btn:hover {
    background: rgba(0, 180, 216, 0.1);
}

.style-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.style-row label {
    font-size: 13px;
    color: var(--text-secondary);
}

.style-row select {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    outline: none;
    cursor: pointer;
}

/* TV Series Season & Episode Bar */
.series-controls {
    padding: 12px 20px;
    background: var(--bg-surface-elevated);
    border-top: 1px solid var(--border-color);
}

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

.control-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.season-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.season-tab {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.season-tab.active {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
}

.episode-grid {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-top: 4px;
}

.ep-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.ep-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-surface-elevated);
    color: #fff;
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-elevated);
    font-size: 14px;
    font-weight: 600;
    z-index: 300;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    pointer-events: none;
}

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

/* Footer */
.footer {
    text-align: center;
    padding: 24px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-muted);
}

/* ==========================================================================
   Comprehensive All-Device Responsive Design System
   ========================================================================== */

/* Tablets & Small Laptops (max-width: 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 16px;
    }
    .hero-section {
        min-height: 420px;
    }
    .hero-title {
        font-size: 32px;
    }
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 14px;
    }
    .detail-dialog {
        max-width: 92vw;
    }
    .player-shell {
        max-width: 95vw;
    }
}

/* Mobile Devices & Phablets (max-width: 768px) */
@media (max-width: 768px) {
    .nav-container {
        padding: 10px 14px;
        flex-wrap: wrap;
        gap: 10px;
    }
    .brand-logo {
        gap: 8px;
    }
    .brand-title {
        font-size: 20px;
    }
    .nav-links {
        display: flex;
        align-items: center;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        max-width: calc(100% - 140px);
        margin-left: auto;
    }
    .nav-links::-webkit-scrollbar {
        display: none;
    }
    .nav-link {
        padding: 6px 12px;
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .search-wrapper {
        order: 3;
        max-width: 100%;
        width: 100%;
        margin-top: 4px;
    }
    .search-box {
        height: 40px;
    }
    .search-box input {
        font-size: 13px;
    }
    .search-year-select {
        font-size: 12px;
        padding: 4px 6px;
    }
    .hero-section {
        min-height: 380px;
        margin: 10px 0 16px;
        border-radius: var(--radius-md);
    }
    .hero-content {
        padding: 20px;
        max-width: 100%;
    }
    .hero-title {
        font-size: 24px;
        margin-bottom: 8px;
    }
    .hero-overview {
        font-size: 12px;
        line-height: 1.5;
        margin-bottom: 16px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
    .card-title {
        font-size: 12px;
    }
    .section-header h2 {
        font-size: 18px;
    }

    /* Details Modal on Mobile */
    .detail-dialog {
        width: 95vw;
        max-height: 90vh;
        margin: 10px;
        border-radius: var(--radius-md);
    }
    .detail-hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 14px;
    }
    .detail-poster-wrap {
        width: 130px;
        min-width: 130px;
    }
    .detail-title {
        font-size: 22px;
    }
    .detail-badge-row {
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }
    .detail-genres {
        justify-content: center;
    }
    .detail-actions {
        justify-content: center;
    }

    /* Player on Mobile */
    .player-modal {
        padding: 0;
    }
    .player-shell {
        width: 100vw;
        max-width: 100vw;
        border-radius: 0;
        border: none;
        max-height: 100vh;
    }
    .player-top-bar {
        padding: 8px 12px;
    }
    .player-title-box {
        max-width: calc(100% - 90px);
    }
    .player-stream-title {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    /* Mobile Dedicated Settings Panel (Native Floating Bottom Sheet) */
    .player-settings-panel {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: auto !important;
        max-height: 72vh !important;
        border-radius: 20px 20px 0 0 !important;
        border: 1px solid rgba(255, 255, 255, 0.14) !important;
        border-bottom: none !important;
        background: rgba(14, 18, 26, 0.98) !important;
        backdrop-filter: blur(28px) !important;
        -webkit-backdrop-filter: blur(28px) !important;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.95) !important;
        z-index: 10000 !important;
        display: none;
        flex-direction: column !important;
        overflow: hidden !important;
        animation: slideUpMobile 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }
    .player-settings-panel.active {
        display: flex !important;
    }
    .settings-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 14px 18px 12px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        background: rgba(255, 255, 255, 0.02) !important;
        flex-shrink: 0 !important;
    }
    .settings-title {
        font-size: 15px !important;
        font-weight: 700 !important;
        color: #ffffff !important;
    }
    .settings-close {
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: none !important;
        color: #ffffff !important;
        font-size: 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
    }
    .settings-tabs {
        display: flex !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 8px !important;
        padding: 10px 14px !important;
        background: rgba(0, 0, 0, 0.45) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        flex-shrink: 0 !important;
        scrollbar-width: none !important;
    }
    .settings-tabs::-webkit-scrollbar {
        display: none !important;
    }
    .settings-tab {
        flex: 0 0 auto !important;
        padding: 8px 14px !important;
        font-size: 12.5px !important;
        font-weight: 600 !important;
        border-radius: 20px !important;
        white-space: nowrap !important;
        background: rgba(255, 255, 255, 0.06) !important;
        color: var(--text-secondary) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
    }
    .settings-tab.active {
        background: var(--primary) !important;
        color: #ffffff !important;
        border-color: var(--primary) !important;
        box-shadow: 0 2px 10px var(--primary-glow) !important;
    }
    .settings-content {
        max-height: 48vh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 14px 16px max(24px, env(safe-area-inset-bottom, 24px)) !important;
        flex: 1 1 auto !important;
    }
    .settings-hint {
        font-size: 12px !important;
        color: var(--text-muted) !important;
        margin-bottom: 10px !important;
    }
    .option-btn {
        min-height: 44px !important;
        padding: 10px 14px !important;
        font-size: 13.5px !important;
        border-radius: var(--radius-sm) !important;
    }
    .style-row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 8px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    }
    .style-row select {
        padding: 8px 12px !important;
        font-size: 13px !important;
        min-height: 38px !important;
    }
    .controls-toolbar {
        padding: 0 10px 8px;
    }
    .controls-left, .controls-right {
        gap: 4px;
    }
    .ctrl-btn {
        width: 32px;
        height: 32px;
    }
    .ctrl-btn svg {
        width: 18px;
        height: 18px;
    }
    .volume-slider {
        display: none !important;
    }
    .time-display {
        font-size: 11px;
        margin-left: 2px;
    }
}

/* Small Phones (< 480px) */
@media (max-width: 480px) {
    .nav-container {
        padding: 8px 10px;
    }
    .brand-title {
        font-size: 17px;
    }
    .brand-tag {
        font-size: 8px;
        letter-spacing: 1px;
    }
    .nav-links {
        max-width: 60%;
        gap: 4px;
    }
    .nav-link {
        padding: 5px 9px;
        font-size: 11px;
    }
    .hero-section {
        min-height: 340px;
    }
    .hero-content {
        padding: 14px;
    }
    .hero-title {
        font-size: 20px;
    }
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .detail-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    .detail-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
        gap: 8px;
    }
    .card-info {
        padding: 8px;
    }
    .card-title {
        font-size: 11px;
    }
    .card-meta {
        font-size: 10px;
    }
    .feature-badges-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .feature-pill {
        padding: 10px 12px;
    }
    .cast-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    .cast-photo {
        width: 60px;
        height: 60px;
    }
    .cast-name {
        font-size: 11px;
    }
    .cast-character {
        font-size: 10px;
    }
    .ctrl-btn {
        width: 28px;
        height: 28px;
    }
    .ctrl-btn svg {
        width: 15px;
        height: 15px;
    }
    .time-display {
        font-size: 9.5px;
    }
    .player-badge-strip {
        display: none !important;
    }
}

/* Mobile Landscape Orientation */
@media (max-width: 900px) and (orientation: landscape) {
    .player-modal {
        padding: 0 !important;
    }
    .player-shell {
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        border: none !important;
    }
    .video-container {
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        aspect-ratio: auto !important;
    }
    #videoPlayer {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }
    .player-top-bar {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 50;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
    }
    .player-settings-panel {
        position: fixed !important;
        top: 10px !important;
        bottom: 10px !important;
        right: 16px !important;
        left: auto !important;
        width: 360px !important;
        max-height: calc(100vh - 20px) !important;
        border-radius: var(--radius-md) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        z-index: 10000 !important;
    }
    .settings-content {
        max-height: calc(100vh - 120px) !important;
    }
}

/* Ultrawide Displays (min-width: 1441px) */
@media (min-width: 1441px) {
    .nav-container,
    .main-content,
    .footer {
        max-width: 1440px;
        margin-left: auto;
        margin-right: auto;
    }
    .hero-section {
        min-height: 520px;
    }
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
        gap: 18px;
    }
}

/* ==========================================================================
   Skeleton Shimmer Loading Animations
   ========================================================================== */
.skeleton-card {
    pointer-events: none;
    border-color: rgba(255, 255, 255, 0.05);
}

.skeleton-pulse {
    background: linear-gradient(90deg, #141722 25%, #232738 50%, #141722 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

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

.skeleton-line {
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   Upcoming Badges, Notices & YouTube Trailer Container
   ========================================================================== */
.badge-upcoming {
    background: linear-gradient(135deg, #ff0844 0%, #ff4e50 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 0 12px rgba(255, 8, 68, 0.45);
    border: none !important;
}

.card-badge-upcoming {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #ff0844 0%, #ff4b2b 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(255, 8, 68, 0.5);
    z-index: 4;
}

.btn-trailer-glow {
    background: linear-gradient(135deg, #e50914 0%, #ff3b30 100%) !important;
    box-shadow: 0 4px 18px rgba(229, 9, 20, 0.4) !important;
}

.upcoming-notice {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255, 68, 68, 0.12);
    border: 1px solid rgba(255, 68, 68, 0.35);
    border-radius: var(--radius-md);
    color: #ff9b85;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.upcoming-notice strong {
    color: #ffffff;
    display: block;
    margin-bottom: 2px;
}

.upcoming-notice p {
    margin: 0;
    color: #ffb8a8;
    font-size: 12px;
}

.player-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.trailer-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 12;
}

.trailer-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ==========================================================================
   Infinite Scroll Loaders & Spinners
   ========================================================================== */
.catalog-infinite-loader, .infinite-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.spinner-sm {
    width: 22px;
    height: 22px;
    border: 2.5px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.load-more-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

/* ==========================================================================
   Telegram Channel Integration (Zero Interference)
   ========================================================================== */
.nav-link.nav-telegram {
    background: rgba(34, 158, 217, 0.12);
    color: #29b6f6;
    border: 1px solid rgba(41, 182, 246, 0.3);
    text-decoration: none;
    gap: 4px;
}

.nav-link.nav-telegram:hover {
    background: #229ED9;
    color: #ffffff;
    box-shadow: 0 0 16px rgba(34, 158, 217, 0.45);
    border-color: #229ED9;
}

.telegram-fab {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 8px;
    background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-decoration: none;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 16px rgba(34, 158, 217, 0.42), 0 2px 6px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    user-select: none;
}

.telegram-fab:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 22px rgba(34, 158, 217, 0.6), 0 3px 10px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #38bdf8 0%, #229ED9 100%);
    color: #ffffff;
}

.telegram-fab:active {
    transform: translateY(0) scale(0.98);
}

.telegram-fab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 50%;
}

.footer-telegram-link {
    display: inline-flex;
    align-items: center;
    color: #38bdf8;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
}

.footer-telegram-link:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

/* Zero Interference: Automatically hide floating Telegram button when watching video or viewing details modal */
#playerModal.active ~ #telegramFab,
.modal-overlay.active ~ #telegramFab,
body[style*="overflow: hidden"] #telegramFab {
    display: none !important;
}

@media (max-width: 768px) {
    .telegram-fab {
        bottom: 16px;
        right: 14px;
        padding: 6px 12px 6px 7px;
        font-size: 11px;
    }
    .telegram-fab-icon {
        width: 22px;
        height: 22px;
    }
    .telegram-fab-icon svg {
        width: 15px;
        height: 15px;
    }
}

@media (max-width: 480px) {
    .telegram-fab {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    .telegram-fab-label {
        display: none;
    }
    .telegram-fab-icon {
        width: 100%;
        height: 100%;
        background: transparent;
    }
    .telegram-fab-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* ==========================================================================
   Comprehensive Fullscreen Mode Engine
   ========================================================================== */
.video-container:fullscreen,
.video-container:-webkit-full-screen,
.video-container:-moz-full-screen,
.video-container:-ms-fullscreen,
.video-container.is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    aspect-ratio: auto !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;
    z-index: 2147483647 !important;
    box-shadow: none !important;
    border: none !important;
}

.video-container:fullscreen #videoPlayer,
.video-container:-webkit-full-screen #videoPlayer,
.video-container:-moz-full-screen #videoPlayer,
.video-container.is-fullscreen #videoPlayer {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    background: #000 !important;
}

.video-container:fullscreen .trailer-container,
.video-container:-webkit-full-screen .trailer-container,
.video-container.is-fullscreen .trailer-container {
    width: 100% !important;
    height: 100% !important;
    max-height: 100vh !important;
}

.video-container:fullscreen .trailer-frame,
.video-container:-webkit-full-screen .trailer-frame,
.video-container.is-fullscreen .trailer-frame {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

.video-container:fullscreen .player-controls-overlay,
.video-container:-webkit-full-screen .player-controls-overlay,
.video-container.is-fullscreen .player-controls-overlay {
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding-bottom: max(16px, env(safe-area-inset-bottom, 16px)) !important;
}

.video-container:fullscreen .player-settings-panel,
.video-container:-webkit-full-screen .player-settings-panel,
.video-container.is-fullscreen .player-settings-panel {
    bottom: 74px !important;
    right: 18px !important;
    max-height: calc(100vh - 120px) !important;
}
