/* Reset & Basic Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

:root {
    --accent: #00f2ff;
    --accent-glow: rgba(0, 242, 255, 0.45);
    --theme-accent-rgb: 0, 242, 255;
    --dark-bg: #050505;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --card-bg: rgba(20, 20, 20, 0.5);
    --card-border: rgba(0, 242, 255, 0.15);
    --card-shadow: rgba(0, 0, 0, 0.3);
    --card-shadow-hover: rgba(0, 242, 255, 0.12);
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

html, body {
    overscroll-behavior: none;
    touch-action: manipulation;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body.player-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100vw !important;
    height: 100vh !important;
}

/* Scanlines Overlay */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.18) 50%,
        rgba(0,0,0,0.18)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 20;
    opacity: 0.3;
}

/* Particles Background */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 10;
    box-sizing: border-box;
}

/* Header & Logo */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: -3px;
    text-shadow: 0 0 20px var(--accent-glow);
    margin: 0;
    line-height: 1;
    user-select: none;
}
.logo span {
    font-size: 0.4em;
    vertical-align: middle;
    margin-left: 5px;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: none;
}

.blog-title {
    font-family: var(--font-display);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.25rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Search Bar */
.search-bar-container {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0;
    padding: 4px 6px 4px 20px;
    width: 100%;
    max-width: 550px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 30px var(--card-shadow), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.search-bar-container:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    background: rgba(255, 255, 255, 0.03);
}

.search-input {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 16px;
    width: 100%;
    height: 40px;
    font-family: inherit;
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.search-btn {
    background: rgba(0, 242, 255, 0.08);
    border: 1px solid var(--accent);
    width: 40px;
    height: 40px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-btn:hover {
    transform: translateY(-1px);
    background: rgba(0, 242, 255, 0.15);
    box-shadow: 0 0 10px var(--accent-glow);
}

.search-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Site Toggle buttons */
.site-toggle {
    display: flex;
    background: var(--card-bg);
    padding: 4px;
    border-radius: 0;
    border: 1px solid var(--card-border);
}

.toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s ease;
}

.toggle-btn.active {
    background: rgba(0, 242, 255, 0.08);
    border: 1px solid var(--accent);
    color: var(--accent);
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.12);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.content-section {
    animation: fadeIn 0.4s ease-out;
}

.hidden {
    display: none !important;
}

.section-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Placeholder & Spinners */
.placeholder-text {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
    font-size: 18px;
    width: 100%;
}

.placeholder-text.error {
    color: #ef4444;
}

.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    width: 100%;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.05);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border-left-color: var(--accent);
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Series Cards Grid */
.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.series-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 30px var(--card-shadow), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.series-card:hover {
    border-color: rgba(0, 242, 255, 0.5);
    box-shadow: 0 0 25px var(--card-shadow-hover),
                0 15px 35px -10px rgba(0, 242, 255, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-6px);
}

.card-cover {
    height: 160px;
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.08), rgba(0, 136, 204, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--card-border);
}

.card-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.cover-placeholder {
    font-size: 60px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.card-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-description {
    font-size: 13px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* Series Details & Back Button */
.back-nav {
    margin-bottom: 20px;
}

.back-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--accent);
    transform: translateX(-3px);
    box-shadow: 0 0 10px var(--accent-glow);
}

.btn-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Series Detail Layout */
.series-detail-wrapper {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    align-items: start;
}

.series-sidebar {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 4px 30px var(--card-shadow), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.series-poster-container {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(10, 10, 15, 0.6);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 280px;
}

.series-banner-img {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.series-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.series-meta-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-tag {
    background: rgba(0, 242, 255, 0.08);
    color: var(--accent);
    border: 1px solid rgba(0, 242, 255, 0.2);
    padding: 4px 12px;
    border-radius: 0;
    font-size: 13px;
    font-weight: 600;
    align-self: flex-start;
}

.meta-tags-list {
    font-size: 14px;
    color: var(--text-secondary);
}

.series-description {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Seasons and Episodes Container */
.episodes-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Season Dropdown */
.season-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.season-select-wrapper::after {
    content: '▾';
    position: absolute;
    right: 16px;
    color: var(--accent);
    font-size: 18px;
    pointer-events: none;
    line-height: 1;
}

.season-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 12px 48px 12px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    max-width: 280px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.season-select:hover,
.season-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
    color: var(--accent);
}

.season-select option {
    background: #0d0d14;
    color: var(--text-primary);
    font-weight: 500;
    padding: 8px;
}

/* Episodes List */
.episodes-list-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0;
    padding: 16px;
    box-shadow: inset 0 4px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.episodes-list-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #ffffff;
}

.episodes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.episodes-list::-webkit-scrollbar {
    width: 4px;
    height: 0;
}

.episodes-list::-webkit-scrollbar-track {
    background: transparent;
}

.episodes-list::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 2px;
}

.episode-row {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 12px 16px;
    min-height: 58px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.episode-row:hover,
.episode-row:focus,
.episode-row.focused {
    background: rgba(0, 242, 255, 0.08) !important;
    border: 2px solid var(--accent) !important;
    border-radius: 8px !important;
    box-shadow: 0 0 18px var(--accent-glow) !important;
    outline: none !important;
    z-index: 5;
}

.ep-num {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    min-width: 28px;
    flex-shrink: 0;
}

.ep-titles {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 0;
}

.ep-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ep-orig-title {
    font-size: 12px;
    line-height: 1.2;
    color: var(--text-secondary);
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.ep-langs {
    display: flex;
    gap: 6px;
    font-size: 16px;
    flex-shrink: 0;
}

.flag-icon {
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.ep-hosters {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.hoster-badge {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    padding: 3px 8px;
    border-radius: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* Modals & Overlay Popup */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease-out;
}

.modal-content {
    background: #0d0d12;
    border: 1px solid var(--card-border);
    border-radius: 0;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleUp {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
}

.modal-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.links-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.group-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 0.5px;
}

.buttons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.modal-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--accent);
}

.modal-btn.active {
    background: rgba(0, 242, 255, 0.08);
    color: var(--accent);
    border: 1px solid var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.modal-close-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: #ffffff;
    padding: 12px;
    border-radius: 0;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    border-color: #f87171;
    color: #f87171;
}

/* TV Focus Outline Highlight State (CRITICAL FOR SMART TVS) */
/* Using inset box-shadow instead of outline to avoid clipping by overflow: hidden on parent containers */
.focusable:focus {
    outline: none !important;
    box-shadow: 0 0 25px var(--accent-glow), inset 0 0 0 3px var(--accent) !important;
    transform: scale(1.03) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--accent) !important;
    z-index: 10;
}

/* Special Focus adjustment for toggle buttons */
.toggle-btn:focus {
    transform: scale(1.05) !important;
}

/* Full Screen Player Overlay */
.player-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none !important;
    overscroll-behavior: none !important;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

#video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    transition: object-fit 0.2s ease;
}

/* Suppress native video controls on Smart TVs & WebKit browsers */
#video-player::-webkit-media-controls,
#video-player::-webkit-media-controls-panel,
#video-player::-webkit-media-controls-enclosure,
#video-player::-webkit-media-controls-overlay-play-button {
    display: none !important;
    -webkit-appearance: none !important;
    opacity: 0 !important;
}

/* Custom Controls Container */
.player-controls-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 210;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    background: radial-gradient(circle at center, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.7) 100%);
}

.player-overlay.show-controls .player-controls-container,
.player-controls-container:focus-within {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.player-overlay.has-error .player-controls-container {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* TOP BAR */
.player-controls-top {
    padding: max(16px, env(safe-area-inset-top, 16px)) 24px 20px 24px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.95), rgba(0,0,0,0));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.player-back-btn {
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 10px 22px;
    border-radius: 30px !important;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.player-back-btn:hover,
.player-back-btn:focus {
    border-radius: 30px !important;
    background: rgba(0, 242, 254, 0.2) !important;
    box-shadow: 0 0 15px var(--accent-glow) !important;
    transform: scale(1.03) !important;
}

.player-title-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
    margin: 0 10px;
}

.player-show-title {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 5px rgba(0,0,0,0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60vw;
}

.player-sub-title {
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
    margin-top: 2px;
}

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

/* CENTER CONTROLS */
.player-controls-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: max(24px, 5vw);
    margin: auto 0;
}

.player-play-btn {
    width: 72px;
    height: 72px;
    border-radius: 50% !important;
    background: rgba(0, 242, 254, 0.2);
    border: 2px solid var(--accent);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 20px var(--accent-glow);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.player-play-btn:hover,
.player-play-btn:focus {
    border-radius: 50% !important;
    background: var(--accent) !important;
    color: #050505 !important;
    transform: scale(1.1) !important;
    box-shadow: 0 0 30px var(--accent-glow) !important;
}

.play-svg {
    width: 34px;
    height: 34px;
    fill: currentColor;
}

.player-center-btn {
    width: 54px;
    height: 54px;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: all 0.2s ease;
}

.player-center-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.player-center-btn .btn-subtext {
    font-size: 9px;
    font-weight: 700;
    color: var(--accent);
    margin-top: -2px;
}

.player-center-btn:hover,
.player-center-btn:focus {
    border-radius: 50% !important;
    border-color: var(--accent) !important;
    color: var(--accent) !important;
    background: rgba(0, 242, 254, 0.15) !important;
    transform: scale(1.08) !important;
}

/* BOTTOM BAR */
.player-controls-bottom {
    padding: 20px 24px max(20px, env(safe-area-inset-bottom, 20px)) 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0));
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.player-seekbar-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.player-time {
    font-family: 'Plus Jakarta Sans', monospace, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    min-width: 48px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

.player-seekbar-container {
    flex: 1;
    position: relative;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: visible;
    cursor: pointer;
    transition: height 0.15s ease;
}

.player-seekbar-container:hover {
    height: 10px;
}

.player-buffer-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.player-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
    border-radius: 4px;
}

.player-seekbar-input {
    position: absolute;
    top: -6px;
    left: 0;
    width: 100%;
    height: 20px;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}

.player-bottom-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

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

.player-volume-slider {
    width: 90px;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    touch-action: none;
    transition: width 0.2s ease, background 0.2s ease;
}

.player-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.player-volume-slider::-webkit-slider-thumb:hover,
.player-volume-slider::-webkit-slider-thumb:active {
    transform: scale(1.25);
    box-shadow: 0 0 15px var(--accent);
}

.player-volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
    border: none;
    cursor: pointer;
}

.player-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: all 0.2s ease;
}

.player-icon-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.player-icon-btn:hover,
.player-icon-btn:focus {
    border-radius: 50% !important;
    border-color: var(--accent) !important;
    color: var(--accent) !important;
    background: rgba(0, 242, 254, 0.15) !important;
    transform: scale(1.05) !important;
}

.player-icon-btn.active-cast {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 242, 254, 0.25);
    box-shadow: 0 0 15px var(--accent-glow);
    animation: castPulse 2s infinite ease-in-out;
}

@keyframes castPulse {
    0%, 100% { box-shadow: 0 0 10px var(--accent-glow); }
    50% { box-shadow: 0 0 20px var(--accent); }
}

/* DOUBLE TAP RIPPLE ANIMATION */
.player-ripple-feedback {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(0, 242, 254, 0.25);
    border: 2px solid var(--accent);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 220;
    pointer-events: none;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 25px var(--accent-glow);
}

.player-ripple-feedback.left {
    left: 12%;
}

.player-ripple-feedback.right {
    right: 12%;
}

.player-ripple-feedback svg {
    width: 32px;
    height: 32px;
    fill: var(--accent);
}

.player-ripple-feedback span {
    font-size: 13px;
    font-weight: 800;
    color: var(--accent);
}

.player-ripple-feedback.fade-out {
    animation: rippleAnimation 0.6s ease-out forwards;
}

@keyframes rippleAnimation {
    0% { opacity: 1; transform: translateY(-50%) scale(0.7); }
    50% { opacity: 1; transform: translateY(-50%) scale(1.1); }
    100% { opacity: 0; transform: translateY(-50%) scale(1.3); }
}

/* MOBILE PORTRAIT SPECIFIC PLAYER STYLES */
@media (max-width: 768px) and (orientation: portrait) {
    .player-show-title {
        font-size: 14px;
        max-width: 45vw;
    }
    .player-play-btn {
        width: 60px;
        height: 60px;
    }
    .play-svg {
        width: 28px;
        height: 28px;
    }
    .player-center-btn {
        width: 46px;
        height: 46px;
    }
    .player-controls-center {
        gap: 16px;
    }
    .player-volume-slider {
        width: 65px;
        height: 8px;
    }
    .player-controls-top {
        padding: max(12px, env(safe-area-inset-top, 12px)) 16px 12px 16px;
    }
    .player-controls-bottom {
        padding: 14px 16px max(14px, env(safe-area-inset-bottom, 14px)) 16px;
    }
}

.player-loader {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    gap: 15px;
    z-index: 205;
}

.player-error {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    gap: 15px;
    z-index: 205;
    background: rgba(13, 13, 18, 0.95);
    border: 1px solid var(--card-border);
    padding: 40px;
}

/* ==========================================================================
   WEITERSCHAUEN (CONTINUE WATCHING) STYLES
   ========================================================================== */
.continue-card {
    position: relative;
}

.continue-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: var(--accent);
    border: 1px solid var(--accent);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    z-index: 5;
    box-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.continue-remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
    opacity: 0.8;
    transition: opacity 0.2s, background 0.2s, border-color 0.2s;
}

.continue-card:hover .continue-remove-btn,
.continue-card:focus-within .continue-remove-btn {
    opacity: 1;
}

.continue-remove-btn:hover {
    background: rgba(239, 68, 68, 0.9);
    border-color: #ef4444;
}

.progress-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 5;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
    transition: width 0.3s ease;
}

/* Landscape Favorites Card (Home Page Row) */
.fav-landscape-card {
    position: relative;
    flex: 0 0 230px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.fav-landscape-card:hover,
.fav-landscape-card:focus,
.fav-landscape-card.focused {
    border: 2px solid var(--accent) !important;
    box-shadow: 0 0 20px var(--accent-glow) !important;
    transform: translateY(-4px) !important;
    outline: none !important;
}

.fav-landscape-banner {
    width: 100%;
    height: 130px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.fav-card-title {
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Favorites & Like Buttons */
.fav-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.25s ease;
}

.fav-action-btn .heart-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #ffffff;
    stroke-width: 2;
    transition: fill 0.25s ease, stroke 0.25s ease, transform 0.25s ease;
}

.fav-action-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.fav-action-btn.is-favorite {
    background: rgba(255, 42, 109, 0.18);
    border-color: rgba(255, 42, 109, 0.6);
    color: #ff2a6d;
    box-shadow: 0 0 15px rgba(255, 42, 109, 0.3);
}

.fav-action-btn.is-favorite .heart-icon {
    fill: #ff2a6d;
    stroke: #ff2a6d;
    transform: scale(1.15);
}

.fav-remove-btn:hover {
    background: rgba(255, 42, 109, 0.9) !important;
    border-color: #ff2a6d !important;
}

/* SMART TV REMOTE FOCUS STYLES */
/* Using inset box-shadow for the focus ring to prevent clipping by overflow: hidden containers */
.tv-focusable:focus,
.tv-focusable.focused,
.focusable:focus,
.focusable.focused,
.poster-card:focus,
.poster-card.focused,
.sidebar-item:focus,
.sidebar-item.focused,
.season-tab:focus,
.season-tab.focused,
.ep-btn:focus,
.ep-btn.focused,
.hoster-btn:focus,
.hoster-btn.focused,
.hero-btn:focus,
.hero-btn.focused {
    outline: none !important;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.85), inset 0 0 0 3px #00f2ff !important;
    transform: scale(1.06) translateZ(0) !important;
    z-index: 1001 !important;
    border-radius: 14px !important;
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out !important;
    border: 3px solid transparent !important;
}

.error-icon {
    width: 50px;
    height: 50px;
    fill: #ef4444;
}

/* Responsiveness Mobile Adaptations */
@media (max-width: 1024px) {
    .series-detail-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .series-sidebar {
        flex-direction: row;
        align-items: center;
        gap: 30px;
    }
    
    .series-poster-container {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .logo {
        text-align: center;
    }
    
    .search-bar-container {
        max-width: 100%;
    }
    
    .site-toggle {
        justify-content: center;
    }
    
    .series-sidebar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .series-poster-container {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .app-container {
        padding: 15px;
    }
}

/* Focus Override for Search Elements to prevent double borders */
.search-input.focusable:focus {
    outline: none !important;
    box-shadow: none !important;
    transform: none !important;
    background-color: transparent !important;
    border: none !important;
}

.search-btn.focusable:focus {
    outline: none !important;
    box-shadow: none !important;
    transform: none !important;
    background-color: rgba(0, 242, 255, 0.25) !important;
    border-color: var(--accent) !important;
}

.search-bar-container:focus-within {
    border-color: var(--accent) !important;
    box-shadow: 0 0 25px var(--accent-glow), inset 0 0 0 3px var(--accent) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    outline: none !important;
}

/* Navigation Links Bar */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-link-btn:hover {
    color: #ffffff;
    border-color: rgba(0, 242, 255, 0.3);
}

.nav-link-btn.active {
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Home Layout Sections */
.home-section {
    margin-bottom: 40px;
}

/* Horizontal Scroll Container for Angesagt / Trending */
.horizontal-scroll-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 10px 14px 28px 14px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.horizontal-scroll-row::-webkit-scrollbar {
    height: 6px;
}

.horizontal-scroll-row::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 0;
}

/* Angesagt (Trending) Card */
.trend-item-card {
    position: relative;
    flex: 0 0 160px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.trend-item-card:hover,
.trend-item-card:focus,
.trend-item-card.focused {
    border: 2px solid var(--accent) !important;
    box-shadow: 0 0 20px var(--accent-glow) !important;
    transform: translateY(-4px) !important;
    outline: none !important;
}

.trend-item-poster {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
}

.trend-rank-badge {
    position: absolute;
    bottom: 36px;
    left: 8px;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 900;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.9), 0 0 20px var(--accent-glow);
    z-index: 5;
}

.trend-item-title {
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
}

/* Google TV & Netflix Style Horizontal Collection Cards */
.collections-scroll-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 0 0 30px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.gtv-collection-card {
    position: relative;
    flex: 0 0 280px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.gtv-collection-card:hover,
.gtv-collection-card:focus,
.gtv-collection-card.focused {
    border-color: var(--accent) !important;
    box-shadow: 0 0 25px var(--accent-glow), 0 10px 25px rgba(0, 0, 0, 0.9) !important;
    transform: scale(1.05) translateY(-4px) !important;
    z-index: 10;
}

.gtv-card-media {
    position: relative;
    width: 100%;
    height: 156px;
    overflow: hidden;
}

.gtv-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gtv-collection-card:hover .gtv-card-img {
    transform: scale(1.08);
}

.gtv-card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 5, 5, 0.85) 0%, transparent 60%);
}

.gtv-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 242, 255, 0.18);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    backdrop-filter: blur(8px);
    z-index: 3;
}

.gtv-card-content {
    padding: 12px 14px;
    background: rgba(12, 12, 16, 0.95);
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.gtv-card-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gtv-card-sub {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 2-Column Grid for Collections & Calendar */
.home-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    width: 100%;
    margin-top: 20px;
}

@media (max-width: 1024px) {
    .home-two-col {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Auto-scaling Calendar Widget */
.calendar-widget {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.calendar-days-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.calendar-days-bar::-webkit-scrollbar {
    height: 4px;
}

.calendar-days-bar::-webkit-scrollbar-thumb {
    background: var(--accent);
}

.calendar-day-tab {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.calendar-day-tab.active,
.calendar-day-tab:hover,
.calendar-day-tab:focus {
    background: rgba(0, 242, 255, 0.12);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

/* Responsive Schedule List */
.calendar-schedule-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 550px;
    overflow-y: auto;
    overflow-x: visible;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
    padding: 8px 12px 8px 0;
}

.calendar-schedule-list::-webkit-scrollbar {
    width: 5px;
}

.calendar-schedule-list::-webkit-scrollbar-thumb {
    background: var(--accent);
}

/* Grid-based Responsive Item Row */
.calendar-item-row {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    padding: 12px 16px;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    min-height: 48px;
    flex-shrink: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.calendar-item-row:hover,
.calendar-item-row:focus,
.calendar-item-row.focused {
    border-color: var(--accent) !important;
    background: rgba(0, 242, 255, 0.08) !important;
    box-shadow: inset 4px 0 0 var(--accent), 0 0 15px rgba(0, 242, 255, 0.15) !important;
    outline: none !important;
}

.cal-time {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

.cal-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.cal-badges-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.cal-badge {
    background: rgba(0, 242, 255, 0.08);
    border: 1px solid rgba(0, 242, 255, 0.2);
    color: var(--accent);
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
}

.lang-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: #9ca3af;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
}

/* Neu auf Serienstream Grid */
.latest-episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.latest-item-card {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0;
    padding: 12px 16px;
    gap: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.latest-item-card:hover {
    border-color: var(--accent);
    background: rgba(0, 242, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
    transform: translateY(-2px);
}

.latest-card-time {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    min-width: 42px;
}

.latest-card-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.latest-card-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.latest-card-sub {
    font-size: 11px;
    color: var(--text-secondary);
}

.latest-card-badges {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   NETFLIX / DISNEY+ STYLE SIDEBAR & HERO BILLBOARD SYSTEM
   ========================================================================== */

/* Collapsible Left Navigation Sidebar */
.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 75px;
    z-index: 100;
    background: rgba(8, 8, 10, 0.88);
    backdrop-filter: blur(25px);
    border-right: 1px solid rgba(0, 242, 255, 0.15);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow: hidden;
    padding: 25px 0;
}

/* PWA Install Button Visibility */
#sb-install {
    display: none; /* Hidden by default */
}

/* Hide Install Button completely when running inside installed Webapp or Smart TV */
@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) {
    #sb-install {
        display: none !important;
    }
}

.app-sidebar:hover,
.app-sidebar:focus-within {
    width: 240px;
    box-shadow: 15px 0 40px rgba(0, 0, 0, 0.85);
}

.sidebar-logo-container {
    display: flex;
    align-items: center;
    padding: 0 22px;
    height: 50px;
    width: 100%;
    margin-bottom: 30px;
    cursor: pointer;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 6px;
    flex-grow: 1;
}

.sidebar-item {
    height: 52px;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 20px;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-left: 3px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    text-align: left;
    text-decoration: none;
    outline: none;
}

.sidebar-item:hover,
.sidebar-item:focus,
.sidebar-item.active,
.sidebar-item.focused {
    color: #ffffff;
    background: rgba(0, 242, 255, 0.08);
    border-left-color: var(--accent);
}

.sidebar-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.2s ease;
}

.sidebar-item:hover .sidebar-icon,
.sidebar-item:focus .sidebar-icon,
.sidebar-item.active .sidebar-icon {
    stroke: var(--accent);
}

.sidebar-label {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    letter-spacing: 0.03em;
}

.app-sidebar:hover .sidebar-label,
.app-sidebar:focus-within .sidebar-label {
    opacity: 1;
}

/* App Main Container adjustment for Sidebar - Fluid Netflix/Prime Style Layout */
.app-container {
    margin-left: 75px;
    width: calc(100% - 75px);
    max-width: 100%;
    padding: 24px 48px;
    transition: margin-left 0.3s ease, width 0.3s ease;
    box-sizing: border-box;
}

/* Netflix & Prime Style Fluid Hero Billboard Section */
.hero-billboard {
    position: relative;
    width: 100%;
    height: clamp(380px, 46vh, 560px);
    margin-bottom: 40px;
    border: 1px solid var(--card-border);
    border-radius: 0;
    overflow: hidden;
    background: #050505;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85);
}

.hero-backdrop-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    height: 100%;
    overflow: hidden;
}

.hero-backdrop-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transition: transform 10s ease;
}

.hero-billboard:hover .hero-backdrop-img {
    transform: scale(1.04);
}

/* Gradient Mask Overlays */
.hero-gradient-overlay {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(to right, #050505 25%, rgba(5, 5, 5, 0.75) 55%, transparent 100%),
        linear-gradient(to top, #050505 0%, transparent 60%);
    z-index: 2;
}

.hero-content {
    position: absolute;
    bottom: 45px;
    left: 45px;
    max-width: 580px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hero-badge-pill {
    background: var(--accent);
    color: #000000;
    font-weight: 900;
    font-size: 11px;
    padding: 4px 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    width: fit-content;
    box-shadow: 0 0 15px var(--accent-glow);
}

.hero-title {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.9);
    line-height: 1.1;
}

.hero-meta-line {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.meta-match {
    color: #10b981;
    font-weight: 800;
}

.hero-description {
    font-size: 14px;
    line-height: 1.5;
    color: #d1d5db;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 6px;
}

.btn-hero-primary {
    background: var(--accent);
    color: #000000;
    font-weight: 800;
    padding: 12px 26px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    transition: all 0.25s ease;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-hero-primary:hover,
.btn-hero-primary:focus,
.btn-hero-primary.focused {
    transform: scale(1.05);
    background: #ffffff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.5);
    outline: none !important;
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-weight: 700;
    padding: 12px 22px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    transition: all 0.25s ease;
}

.btn-hero-secondary:hover,
.btn-hero-secondary:focus,
.btn-hero-secondary.focused {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
    outline: none !important;
}

/* Netflix Hover & TV Focus Scaling for Cards */
.trend-item-card:hover,
.trend-item-card:focus,
.trend-item-card.focused,
.series-card:hover,
.series-card:focus,
.series-card.focused,
.collection-card-item:hover,
.collection-card-item:focus,
.collection-card-item.focused,
.latest-item-card:hover,
.latest-item-card:focus,
.latest-item-card.focused,
.calendar-item-row:hover,
.calendar-item-row:focus,
.calendar-item-row.focused {
    transform: scale(1.04) translateY(-2px) !important;
    z-index: 30 !important;
    border-color: var(--accent) !important;
    box-shadow: inset 0 0 0 3px var(--accent), 0 0 10px var(--accent-glow) !important;
    outline: none !important;
}

/* PRIME VIDEO & NETFLIX FLUID CARD ZOOM SCALING FOR WIDE / ULTRA-WIDE SCREENS */
@media (min-width: 1960px) {
    .horizontal-scroll-row {
        overflow-x: hidden;
    }
    
    .trend-item-card {
        flex: 1 1 calc((100% - (9 * 18px)) / 10);
        min-width: 160px;
        max-width: 280px;
    }
    
    .gtv-collection-card {
        flex: 1 1 calc((100% - (4 * 18px)) / 5);
        min-width: 260px;
        max-width: 480px;
    }
}

/* Responsive Navigation Visibility */
@media (max-width: 768px) {
    #sb-favorites {
        display: none !important;
    }
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR (NETFLIX & PRIME VIDEO STYLE)
   ========================================================================== */
@media (max-width: 768px) {
    .app-sidebar {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 64px !important;
        padding: 4px 8px !important;
        padding-bottom: max(6px, env(safe-area-inset-bottom)) !important;
        border-right: none !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 16px 16px 0 0 !important;
        background: rgba(8, 8, 12, 0.94) !important;
        backdrop-filter: blur(24px) !important;
        -webkit-backdrop-filter: blur(24px) !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-around !important;
        z-index: 1000 !important;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.9) !important;
        overflow: visible !important;
    }

    .app-sidebar:hover,
    .app-sidebar:focus-within {
        width: 100% !important;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.9) !important;
    }

    .sidebar-logo-container {
        display: none !important;
    }

    .sidebar-menu {
        flex-direction: row !important;
        width: 100% !important;
        height: 100% !important;
        justify-content: space-around !important;
        align-items: center !important;
        gap: 4px !important;
    }

    .sidebar-item {
        height: 100% !important;
        flex: 1 !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 6px 0 !important;
        gap: 3px !important;
        border-left: none !important;
        border-bottom: none !important;
        border-top: none !important;
        border-radius: 12px !important;
        transition: all 0.2s ease !important;
    }

    .sidebar-item:hover {
        background: rgba(255, 255, 255, 0.05) !important;
        border-color: transparent !important;
    }

    .sidebar-item:focus,
    .sidebar-item.focused {
        outline: none !important;
        box-shadow: none !important;
        border-color: transparent !important;
        background: transparent !important;
    }

    .sidebar-item.active {
        color: var(--accent) !important;
        background: rgba(0, 242, 255, 0.08) !important;
        box-shadow: none !important;
    }

    .sidebar-icon {
        width: 22px !important;
        height: 22px !important;
    }

    .sidebar-label {
        opacity: 1 !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        letter-spacing: 0 !important;
        line-height: 1 !important;
    }

    /* Hide System Actions from mobile bottom bar */
    #sb-logout, #sb-install {
        display: none !important;
    }

    .app-container {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 15px 15px 85px 15px !important;
    }

    .hero-billboard {
        height: 320px !important;
    }

    .hero-backdrop-container {
        width: 100% !important;
        opacity: 0.45 !important;
    }

    .hero-content {
        width: calc(100% - 30px) !important;
        max-width: 100% !important;
        left: 15px !important;
        bottom: 15px !important;
        padding: 0 !important;
    }

    .hero-title {
        font-size: 1.8rem !important;
    }

    .hero-description {
        max-width: 100% !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
    }

    .top-logout-btn {
        display: none !important;
    }

    /* Hide Ugly Scrollbars on Mobile Scroll Rows */
    .horizontal-scroll-row,
    .collections-scroll-row,
    .seasons-tab-bar {
        scrollbar-width: none !important;
    }

    .horizontal-scroll-row::-webkit-scrollbar,
    .collections-scroll-row::-webkit-scrollbar,
    .seasons-tab-bar::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }

    /* Mobile Detail View Responsive Layout (Fixes description box width overflow in portrait mode) */
    .series-detail-wrapper {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        width: 100% !important;
    }

    .series-sidebar {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 16px !important;
    }

    .series-poster-container {
        width: 100% !important;
        max-height: 220px !important;
        aspect-ratio: auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .series-banner-img {
        width: 100% !important;
        height: auto !important;
        max-height: 220px !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
    }

    .series-title {
        font-size: 20px !important;
        word-break: break-word !important;
    }

    .series-description {
        font-size: 13px !important;
        line-height: 1.5 !important;
        word-break: break-word !important;
    }

    .episodes-list-wrapper {
        padding: 14px !important;
    }

    .episode-row {
        padding: 10px 12px !important;
        gap: 10px !important;
        flex-wrap: wrap !important;
    }

    /* Mobile Trending Cards & Scroll Row Fix (Fixes clipped content inside cards & rank badge overlap) */
    .horizontal-scroll-row {
        gap: 14px !important;
        padding: 10px 4px 14px 4px !important;
        margin: -4px 0 !important;
    }

    .trend-item-card {
        flex: 0 0 135px !important;
        width: 135px !important;
    }

    .trend-item-poster {
        width: 100% !important;
        height: 190px !important;
        object-fit: cover !important;
    }

    .trend-rank-badge {
        top: 6px !important;
        left: 6px !important;
        bottom: auto !important;
        background: rgba(0, 0, 0, 0.8) !important;
        border: 1px solid var(--accent) !important;
        color: var(--accent) !important;
        font-size: 13px !important;
        font-weight: 900 !important;
        padding: 2px 7px !important;
        border-radius: 4px !important;
        backdrop-filter: blur(4px) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8) !important;
    }

    .trend-item-title {
        padding: 8px 6px !important;
        font-size: 12px !important;
        line-height: 1.3 !important;
        white-space: normal !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-align: center !important;
        background: rgba(10, 10, 15, 0.9) !important;
    }
}
