:root {
    --bg: #000000;
    --text: #ffffff;
    --text-muted: #888888;
    --text-dead: #444444;
    --border: rgba(255, 255, 255, 0.15);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --surface: #111111;
    --surface-hover: #222222;
    --accent: #ffffff;
    --banner-h: 40px;
    font-family: 'Inter', sans-serif;
}

body.banner-hidden {
    --banner-h: 0px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    overflow-x: hidden;
}

body {
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    padding-top: var(--banner-h);
    overflow-x: hidden;
    min-height: 100vh;
    width: 100%;
}

.countdown-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--banner-h);
    overflow: hidden;
    background: #ffcc00;
    color: #000;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.countdown-timer {
    font-family: 'Space Mono', monospace;
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.banner-hint {
    opacity: 0.6;
    font-size: 0.7rem;
}

.close-banner {
    position: absolute;
    right: 20px;
    cursor: pointer;
    font-size: 1.25rem;
    opacity: 0.5;
    transition: opacity 0.2s;
    line-height: 1;
}

.close-banner:hover {
    opacity: 1;
}

.grid-header,
.player-header-fixed {
    top: var(--banner-h) !important;
}







body.banner-hidden {
    padding-top: 0 !important;
}

body.banner-hidden .countdown-banner {
    display: none;
}



.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    padding: 40px;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.9);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header h2 {
    margin: 0 0 20px 0;
    font-size: 1.5rem;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.02em;
}

.modal-body p {
    color: #888;
    line-height: 1.7;
    margin-bottom: 30px;
}

.modal-body b {
    color: #fff;
}

.modal-footer {
    display: flex;
    justify-content: center;
}

.modal-footer button {
    background: #fff;
    color: #000;
    border: none;
    padding: 12px 40px;
    border-radius: 100px;
    font-weight: 800;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.modal-footer button:hover {
    transform: scale(1.05);
}

body.no-scroll {
    overflow: hidden !important;
    height: 100vh;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: background 0.3s;
}

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

.global-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.backdrop-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    transition: background-image 0.5s ease-in-out;
}

.backdrop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.8) 0%, #000 100%);
    transition: background 0.5s ease;
}

.hero-container {
    min-height: calc(100vh - var(--banner-h, 0px));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    z-index: 10;
    background: #000;
}

@media (max-width: 1024px) {
    .hero-container {
        padding-top: 10vh;
        /* Mirror desktop's higher start but keep enough space */
        justify-content: flex-start;
    }
}

body.banner-hidden .hero-container {
    height: 100vh;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
}

.hero-logo {
    font-family: 'Prosto One', cursive;
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 400;
    margin: 0;
    letter-spacing: -0.02em;
    background: linear-gradient(to bottom, #ffffff 40%, #777);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.15));
    text-transform: uppercase;
    line-height: 1.1;
}

.hero-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    color: #666;
    letter-spacing: 0.5em;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin: 20px 0 60px 0;
}

.hero-search-wrapper {
    width: 100%;
    max-width: 600px;
    margin-bottom: 25px;
}

.continue-watching {
    width: 100%;
    max-width: 800px;
    animation: fadeIn 0.8s ease;
    margin-bottom: 80px;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.history-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.history-item .h-title {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    color: #fff;
}

.history-item .h-meta {
    font-size: 0.7rem;
    color: #666;
}

.history-item .progress-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
}

.history-item .progress-fill {
    height: 100%;
    background: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@media (max-width: 600px) {
    .history-grid {
        grid-template-columns: 1fr;
    }
}

.hero-search {
    background: #0a0a0a;
    border: 1px solid #222;
    border-radius: 100px;
    padding: 6px 6px 6px 24px;
    display: flex;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    align-items: center;
}

.hero-search:focus-within {
    border-color: #444;
    box-shadow: 0 0 0 1px #444;
    background: #000;
}

.hero-search input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1rem;
    flex: 1;
    outline: none;
    font-family: 'Inter', sans-serif;
    margin-right: 10px;
}

.hero-search input::placeholder {
    color: #444;
}

.hero-search button {
    background: #fff;
    color: #000;
    border: none;
    border-radius: 100px;
    padding: 10px 28px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.hero-search button:hover {
    transform: scale(1.05);
    background: #f0f0f0;
}

.hero-footer {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    color: #444;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
    width: 100%;
    padding: 0 20px;
}

.footer-tags {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 80px;
    color: #555;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.footer-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-links a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
    letter-spacing: 0.1em;
}

.footer-links a:hover {
    color: #fff;
}

.app-download-link {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 8px 18px !important;
    border-radius: 100px;
    font-size: 0.7rem;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    height: 38px;
}

.app-download-link:hover {
    background: #fff !important;
    color: #000 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    opacity: 0.6;
}

.footer-bottom .made-with {
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    color: #444;
}

.hero-footer .dot {
    color: #222;
    font-size: 1.2em;
}

.grid-view {
    padding: calc(80px + var(--banner-h)) 40px 40px 40px;
    min-height: 100vh;
    position: relative;
    z-index: 5;
    background: transparent;
}

.grid-header {
    position: fixed;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 20;
    border-bottom: 1px solid var(--border-subtle);
}

.logo-text {
    font-family: 'Prosto One', sans-serif;
    font-weight: 400;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    text-transform: uppercase;
}

.logo-text:hover {
    opacity: 0.8;
}

.top-search {
    background: #0a0a0a;
    border: 1px solid #222;
    border-radius: 100px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    width: 300px;
    height: 38px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.top-search:focus-within {
    border-color: #444;
    background: #000;
    box-shadow: 0 0 0 1px #444, 0 10px 30px rgba(0, 0, 0, 0.5);
}

.top-search input {
    background: transparent;
    border: none;
    color: #fff;
    flex: 1;
    outline: none;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
    margin-top: 20px;
    max-width: 1450px;
    margin-left: auto;
    margin-right: auto;
}

.movie-card {
    cursor: pointer;
    transition: transform 0.3s;
}

.movie-card:hover {
    transform: translateY(-8px);
}

.card-poster {
    width: 100%;
    aspect-ratio: 2/3;
    max-height: 80vh;
    background: #222;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

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

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

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

.player-header-fixed {
    position: fixed;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.8));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
}

.search-pill-fixed {
    background: #0a0a0a;
    border: 1px solid #222;
    border-radius: 100px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    width: 300px;
    height: 38px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.search-pill-fixed:focus-within {
    border-color: #444;
    background: #000;
    width: 350px;
    box-shadow: 0 0 0 1px #444, 0 10px 30px rgba(0, 0, 0, 0.5);
}

.search-pill-fixed input {
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    width: 100%;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
}

.search-icon {
    color: #aaa;
    margin-left: 8px;
}

.search-results-dropdown {
    position: absolute;
    top: 70px;
    right: 40px;
    width: 350px;
    background: #111;
    border: 1px solid var(--border);
    border-radius: 12px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 101;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    display: none;
}

.search-result-item {
    display: flex;
    gap: 15px;
    padding: 12px;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
}

.search-result-item:hover,
.search-result-item.selected {
    background: #222;
}

.result-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
}

.main-layout {
    display: grid;
    padding-top: calc(80px + var(--banner-h));
    grid-template-columns: 400px 1fr;
    height: 100vh;
    width: 100%;
    position: relative;
    z-index: 10;
}

.controls-sidebar {
    padding: 20px 40px 40px 40px;
    display: flex;
    flex-direction: column;
    overflow-y: hidden;
    overflow-x: hidden;
    height: 100%;
    border-right: 1px solid var(--border-subtle);
}

.meta-section {
    margin-bottom: 20px;
    flex-shrink: 0;
}

.movie-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #fff;
}

.movie-meta-text {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 500;
}

.control-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    min-height: 0;
    overflow-y: hidden;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
}

.label-tiny {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.segmented-control {
    background: #111;
    border-radius: 100px;
    display: inline-flex;
    padding: 4px;
    width: fit-content;
    gap: 4px;
}

.seg-item {
    padding: 6px 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 100px;
    transition: all 0.2s;
}

.seg-item:hover {
    color: #fff;
    background: #222;
}

.seg-item.active {
    background: #fff;
    color: #000;
    font-weight: 600;
}

.segmented-control.small .seg-item {
    padding: 4px 12px;
    font-size: 0.75rem;
}

.custom-select {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    width: 200px;
}

.custom-options {
    background: #111;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 4px;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 150;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.option-item {
    padding: 10px 16px;
    color: #888;
    cursor: pointer;
    border-bottom: 1px solid #222;
}

.option-item:hover {
    background: #222;
    color: #fff;
}

#episodeGroup {
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.episode-list {
    flex: none;
    overflow-y: auto;
    height: 308px;
    min-height: 308px;
    max-height: 308px;
    padding-right: 4px;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.2);
}

.episode-list::-webkit-scrollbar {
    width: 4px;
}

.episode-list::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 2px;
}

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

.episode-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 10px;
    color: #ccc;
    cursor: pointer;
    border-left: 2px solid transparent;
    font-size: 0.9rem;
}

.episode-item:hover {
    background: #1a1a1a;
}

.episode-item.active {
    background: #222;
    color: #fff;
    border-left-color: #fff;
    font-weight: 600;
}

.episode-item.active .episode-dur {
    color: #fff;
}

.episode-meta-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.episode-num {
    width: 20px;
    opacity: 0.5;
    font-size: 0.8rem;
}

.episode-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.combobox-wrapper {
    width: 100%;
    max-width: 300px;
    position: relative;
}

.combobox-input-container {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: text;
    transition: all 0.2s;
}

.combobox-input-container:focus-within {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.combobox-input-container input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    outline: none;
}

.combobox-input-container:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.combobox-input-container.error {
    border-color: #ff4444;
    color: #ff4444;
}

.combobox-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    z-index: 200;
    padding: 10px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.voice-filter-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #333;
    padding: 12px 16px;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
}

.voice-filter-input::placeholder {
    color: #666;
}

.options-list {
    max-height: 400px;
    overflow-y: auto;
}

.options-list::-webkit-scrollbar {
    width: 4px;
}

.options-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.voice-option {
    padding: 8px;
    color: #ccc;
    cursor: pointer;
}

.voice-option:hover {
    background: #222;
    color: #fff;
}

.quality-hint {
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
    font-size: 0.8rem;
    color: #ffcc00;
    line-height: 1.4;
    position: relative;
    animation: fadeIn 0.3s ease;
    flex-shrink: 0;
}

.quality-hint .close-hint {
    position: absolute;
    top: 5px;
    right: 8px;
    cursor: pointer;
    opacity: 0.6;
    font-size: 1rem;
    font-weight: bold;
}

.quality-hint .close-hint:hover {
    opacity: 1;
}

.info-icon {
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: help;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    position: relative;
    transition: all 0.2s;
}

.info-icon:hover {
    color: #fff;
    border-color: #fff;
}

.info-tooltip {
    position: absolute;
    bottom: 150%;
    left: 0;
    transform: none;
    width: 250px;
    background: #1a1a1a;
    border: 1px solid var(--border);
    color: #ddd;
    padding: 12px;
    font-size: 0.75rem;
    border-radius: 6px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 1000;
    text-align: left;
    line-height: 1.4;
    white-space: normal;
}

.info-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 8px;
    margin-left: 0;
    border-width: 6px;
    border-style: solid;
    border-color: #1a1a1a transparent transparent transparent;
}

.info-icon:hover .info-tooltip {
    visibility: visible;
    opacity: 1;
}

.player-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.player-frame {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
}

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

.placeholder-state {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050505;
    color: #333;
    font-family: 'Space Grotesk';
    font-size: 2rem;
    text-align: center;
}

video,
iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}

.play-overlay:hover {
    background: rgba(0, 0, 0, 0.2);
}

.play-button-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.play-overlay:hover .play-button-icon {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

.play-button-icon svg {
    width: 32px;
    height: 32px;
    fill: #fff;
    margin-left: 2px;
}

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

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

.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: fadeIn 0.6s ease-out forwards;
}

/* =========================================
   UNIVERSAL MOBILE & TABLET STYLES
   (iPad Air, iPhone 14, Pixel 7, etc.)
   ========================================= */

@media (max-width: 1024px) {

    /* --- LAYOUT & GRID --- */
    .main-layout {
        grid-template-columns: 1fr;
        padding-top: 60px;
        height: auto;
        overflow-y: visible;
    }

    /* Force 2 Columns on Tablet & Mobile */
    .movies-grid {
        padding: 0 15px;
        gap: 15px;
    }

    .hero-container {
        /* Center search vertically on all touch devices */
        height: 100vh;
        min-height: calc(100vh - var(--banner-h, 0px));
        justify-content: center;
        padding-top: 0;
        padding-bottom: 0;
    }

    .controls-sidebar {
        overflow-y: visible;
        padding: 20px;
        border-right: none;
        height: auto;
    }

    /* --- SEARCH BAR FIXES --- */
    .hero-search {
        padding: 6px;
        display: flex;
        align-items: center;
        min-height: 50px;
    }

    .hero-search input {
        text-align: left;
        flex: 1;
        padding: 0 0 0 15px;
        margin: 0;
        min-width: 0;
    }

    .hero-search input::placeholder {
        text-align: left;
    }

    .hero-search button {
        flex-shrink: 0;
    }

    .hero-footer {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        text-align: center;
    }

    /* --- PLAYER UI --- */
    #episodeGroup {
        min-height: 0;
        max-height: none;
    }

    .episode-list {
        max-height: 350px;
        overflow-y: auto;
    }

    .player-stage {
        padding: 0;
        height: auto;
        max-height: calc(100vh - 120px);
        /* Leave space for search and header */
        aspect-ratio: 16/9;
        order: -1;
        position: sticky;
        top: 60px;
        z-index: 150;
        background: #000;
    }

    .player-frame {
        border-radius: 0;
    }

    .player-header-fixed {
        padding: 0 15px;
        height: 60px;
        justify-content: center;
    }

    .player-header-fixed .back-btn {
        position: absolute;
        left: 15px;
        font-size: 0.8rem;
    }

    .search-pill-fixed {
        width: 160px;
    }
}

/* =========================================
   PHONES (iPhone 14 Pro Max, Pixel 7, etc.)
   Targeting everything under 600px width
   ========================================= */

@media (max-width: 600px) {

    /* Tighter grid for phones */
    .movies-grid {
        gap: 10px;
    }

    /* Smaller text to fit 2 columns on narrow screens */
    .card-title {
        font-size: 0.85rem;
        line-height: 1.2;
    }

    .card-meta {
        font-size: 0.7rem;
    }

    .card-poster {
        margin-bottom: 8px;
    }

    /* Header Adjustments */
    .hero-logo {
        font-size: 3.5rem;
        margin-bottom: 5px;
    }

    .hero-subtitle {
        font-size: 0.6rem;
        letter-spacing: 0.3em;
        margin-bottom: 40px;
    }

    .grid-view {
        padding: calc(60px + var(--banner-h)) 15px 20px 15px;
    }

    .grid-header {
        padding: 10px 15px;
        height: 60px;
        justify-content: center;
    }

    .grid-header .logo-text {
        position: absolute;
        left: 15px;
        font-size: 0.9rem;
    }

    .top-search {
        width: 140px;
    }

    /* Modal & Banner */
    .modal-content {
        padding: 25px;
        border-radius: 12px;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    .countdown-banner {
        gap: 10px;
        font-size: 0.7rem;
    }

    .banner-hint {
        display: none;
    }

    .countdown-timer {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
}

/* Tiny Phones */
@media (max-width: 400px) {
    .hero-logo {
        font-size: 3rem;
    }

    .search-pill-fixed {
        width: 120px;
    }

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

    .footer-links .dot {
        display: none;
    }
}

.buffering-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    gap: 15px;
    pointer-events: none;
}

.spinner-small {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: fk-spin 1s linear infinite;
}

@keyframes fk-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.nav-btn {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 10px 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

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

.nav-btn:active {
    transform: scale(0.98);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: var(--border-subtle);
}

/* SKELETON LOADING */
.skeleton {
    background: #1a1a1a;
    background-image: linear-gradient(to right, #1a1a1a 0%, #2a2a2a 20%, #1a1a1a 40%, #1a1a1a 100%);
    background-repeat: no-repeat;
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 4px;
}

@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }

    100% {
        background-position: 468px 0;
    }
}

.movie-card.loading .card-poster,
.card-poster.loading {
    background: #1a1a1a;
    background-image: linear-gradient(to right, #1a1a1a 0%, #2a2a2a 20%, #1a1a1a 40%, #1a1a1a 100%);
    background-repeat: no-repeat;
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear;
    border: none;
}

.movie-card.loading .card-title {
    height: 1.1rem;
    width: 80%;
    margin-top: 10px;
    background: #1a1a1a;
    background-image: linear-gradient(to right, #1a1a1a 0%, #2a2a2a 20%, #1a1a1a 40%, #1a1a1a 100%);
    background-repeat: no-repeat;
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 4px;
}

.movie-card.loading .card-meta {
    height: 0.85rem;
    width: 40%;
    margin-top: 6px;
    background: #1a1a1a;
    background-image: linear-gradient(to right, #1a1a1a 0%, #2a2a2a 20%, #1a1a1a 40%, #1a1a1a 100%);
    background-repeat: no-repeat;
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 4px;
}