:root {
    --bg: #ffffff;
    --card-bg: #f8f8f8;
    --text: #000000;
    --sub-text: #666666;
    --accent: #000000;
    --btn-text: #ffffff;
    --neon: #99FF00;
    --yellow: #ffea00;
    --border: #efefef;
    --chip-bg: #f0f0f0;
    --legal-text: #B0B0B0;
    --trust-color: #2d7a00;
    --btn-shadow: rgba(0, 0, 0, 0.12);
}

body.dark-mode {
    --bg: #000000;
    --card-bg: #121212;
    --text: #EAEAEA;
    --sub-text: #A8A8A8;
    --accent: #99FF00;
    --btn-text: #000000;
    --neon: #99FF00;
    --border: #262626;
    --chip-bg: #1A1A1A;
    --legal-text: #B0B0B0;
    --trust-color: #99FF00;
    --btn-shadow: rgba(153, 255, 0, 0.2);
}

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

html {
    overflow: hidden;
    height: 100svh;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    transition: background-color 0.4s ease;
    height: 100svh;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.app-container {
    width: 100%;
    max-width: 420px;
    height: 100svh;
    display: flex;
    flex-direction: column;
    padding: 0 20px;
    padding-top: env(safe-area-inset-top);
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0 4px 0; /* v3.12 Compressed */
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg);
    order: 1;
}

.logo {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -1px;
    cursor: pointer;
    color: var(--text);
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), text-shadow 0.2s ease;
    transform-origin: left center;
    user-select: none;
    -webkit-user-select: none;
}

.logo:hover {
    transform: scale(1.08) translateY(-1px);
    text-shadow:
        0 0 8px rgba(153, 255, 0, 0.9),
        0 0 20px rgba(153, 255, 0, 0.5),
        0 0 40px rgba(153, 255, 0, 0.25);
    color: var(--text);
}

.logo.clicked {
    transform: scale(0.96) translateY(1px);
    text-shadow:
        0 0 12px rgba(153, 255, 0, 1),
        0 0 28px rgba(153, 255, 0, 0.7),
        0 0 50px rgba(153, 255, 0, 0.35);
    transition: transform 0.1s cubic-bezier(0.34, 1.56, 0.64, 1), text-shadow 0.1s ease;
}

.controls {
    display: flex;
    align-items: center;
    gap: 8px; /* v3.12 Tighter Gaps */
}

.icon-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

/* Hide Header Search Button (Anilotto Style) */
#search-btn {
    display: none !important;
}

.top10-header-btn {
    text-decoration: none;
    color: #f3ce13;
    border: 1.5px solid #f3ce13;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 900;
    transition: all 0.2s;
    white-space: nowrap;
}

#header-cinetalk {
    border-color: var(--text);
    color: var(--text);
}

.top10-header-btn:hover {
    background-color: #f3ce13;
    color: #000;
}

.top10-header-btn:active {
    transform: scale(0.95);
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--card-bg);
    min-width: 140px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    border-radius: 12px;
    z-index: 1000;
    margin-top: 8px;
    border: 1px solid var(--border);
    overflow-y: visible !important;
    max-height: none !important;
    height: auto !important;
    animation: dropdownFade 0.2s ease;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.lang-menu::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

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

.lang-menu.show {
    display: block;
}

.lang-item {
    padding: 6px 16px !important;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
    white-space: nowrap;
}

.lang-item span {
    font-size: 18px;
}

.lang-item:hover {
    background-color: rgba(153, 255, 0, 0.08);
}

.lang-item.active {
    color: var(--accent);
    background-color: rgba(153, 255, 0, 0.1);
}

body.dark-mode .lang-item.active {
    background-color: rgba(153, 255, 0, 0.05);
}

/* Search Bar (Capsule Perfection Design) */
.search-overlay {
    position: relative;
    width: 100%;
    height: auto;
    background-color: transparent;
    z-index: 100;
    display: flex !important;
    flex-direction: column;
    padding: 0;
    margin-top: 4px !important; /* v3.12 Compressed */
    margin-bottom: 4px !important; /* v3.12 Compressed */
    order: 2;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    background: #151821 !important;
    height: 48px;
    border-radius: 30px !important;
    border: 1.5px solid #333 !important; /* v3.12 Unified */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-header:focus-within {
    border-color: #bcff00 !important;
    box-shadow: 0 0 15px rgba(188, 255, 0, 0.4) !important;
    background: #151821 !important;
}

#search-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    padding: 0;
    color: #fff;
    font-size: 16px !important;
    font-weight: 600;
    outline: none;
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-header .icon-btn {
    padding: 0;
    min-width: unset;
    height: auto;
    font-size: 16px;
    opacity: 0.7;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

.close-search-btn {
    display: none;
}

.search-results {
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    max-height: 320px;
    overflow-y: auto;
    background: #151821;
    border-radius: 16px;
    z-index: 2001;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    border: 1px solid rgba(188, 255, 0, 0.15);
}

/* Custom Scrollbar for Search Results */
.search-results::-webkit-scrollbar {
    width: 4px;
}
.search-results::-webkit-scrollbar-thumb {
    background: rgba(188, 255, 0, 0.3);
    border-radius: 10px;
}

/* Genre Nav */
.genre-nav-wrapper {
    position: relative;
    flex-shrink: 0;
    order: 3;
    border: none !important; /* v3.13 Ultimate Eradicate */
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.genre-nav-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--bg));
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.genre-nav-wrapper.scrolled-end::after {
    opacity: 0;
}

.genre-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 6px 0; /* v3.12 Compressed */
    margin-bottom: 4px; /* v3.12 Compressed */
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    cursor: grab;
    border: none !important; /* v3.13 Ultimate Eradicate */
    background: transparent !important;
}

.genre-nav::-webkit-scrollbar { 
    display: none !important;
}

.genre-nav:active {
    cursor: grabbing;
}

.genre-chip {
    padding: 6px 12px;
    background: var(--chip-bg);
    border-radius: 100px;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--sub-text);
}

.genre-chip.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    transform: scale(1.05);
}

.genre-chip.ott-chip {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.genre-chip.ott-chip.active {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
}

/* Netflix Red */
.genre-chip.ott-chip.active[data-provider="8"] {
    background: #e50914;
    border-color: #e50914;
    color: #fff;
}
/* Disney+ Blue */
.genre-chip.ott-chip.active[data-provider="337"] {
    background: #0063e5;
    border-color: #0063e5;
    color: #fff;
}
/* Prime Video Blue */
.genre-chip.ott-chip.active[data-provider="119"] {
    background: #00a8e1;
    border-color: #00a8e1;
    color: #fff;
}
/* Apple TV Black */
.genre-chip.ott-chip.active[data-provider="2"] {
    background: #000;
    border-color: #555;
    color: #fff;
}

/* Main Card Area */
.main-card {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 0;
    margin-top: 4px; /* v3.12 Compressed */
    margin-bottom: 60px; /* v3.12 Compressed from 80px */
    order: 4;
}

.film-strip-bg {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    pointer-events: none;
    background-image: repeating-linear-gradient(
        transparent,
        transparent 100px,
        rgba(255,255,255,0.1) 100px,
        rgba(255,255,255,0.1) 102px
    );
    animation: slideUp 15s linear infinite;
    z-index: -1;
}

@keyframes slideUp {
    from { transform: translateY(0); }
    to { transform: translateY(-102px); }
}

/* Slot View */
.slot-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.slot-window {
    width: 280px;
    height: 400px;
    border-radius: 48px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.slot-track { 
    display: flex; 
    flex-direction: column; 
    width: 100%; 
    will-change: transform; 
    transform: translate3d(0, 0, 0); 
    backface-visibility: hidden;
}
.slot-track.spinning {
    filter: blur(4px);
}
.slot-item { width: 100%; height: 400px; flex-shrink: 0; display: flex; justify-content: center; align-items: center; }
.slot-item img { width: 100%; height: 100%; object-fit: cover; }
.slot-item.placeholder { background: #000; }

.ticket-icon {
    font-size: 100px;
    filter: drop-shadow(0 0 30px rgba(255, 0, 255, 0.4)) drop-shadow(0 0 10px rgba(138, 43, 226, 0.6));
    animation: ticketPulse 4s infinite ease-in-out;
    will-change: transform, opacity;
}

@keyframes ticketPulse {
    0%, 100% { transform: scale(1) translate3d(0,0,0); opacity: 0.8; }
    50% { transform: scale(1.1) translate3d(0,0,0); opacity: 1; }
}

.hero-text-area { text-align: center; }
.mystery-phrase { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--text); opacity: 0.9; }
.trust-badge { font-size: 11px; font-weight: 800; color: var(--trust-color); letter-spacing: 0.5px; }

/* Result View */
.result-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: feedReveal 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform, opacity;
}

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

.poster-display {
    width: 100%;
    height: 65%;
    border-radius: 32px;
    overflow: hidden;
    flex-shrink: 0;
    background: #1a1a1a;
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

.poster-display.loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    animation: skeleton 1.5s infinite;
}

@keyframes skeleton {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.poster-display img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: opacity 0.5s ease;
    opacity: 0;
    position: relative;
    z-index: 1;
}
.poster-display img.loaded {
    opacity: 1;
}
.trailer-container { 
    position: absolute; 
    inset: -1px;
    z-index: 5; 
    display: none; 
    background: #000; 
    overflow: hidden;
    border-radius: 32px;
}
.trailer-container iframe { 
    width: 100%; 
    height: 100%; 
    border: 0 !important; 
    outline: none !important;
    box-shadow: none !important;
    display: block;
    background: #000;
    transform: scale(1.01);
}
.play-overlay { 
    position: absolute; 
    inset: 0; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    z-index: 10; 
    pointer-events: none; 
}

.play-icon { 
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #000;
    font-size: 24px;
    padding-left: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.poster-display:hover .play-icon {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.9);
}

.poster-display:active .play-icon {
    transform: scale(0.95);
}

/* INFO CARD */
.movie-info-box {
    margin-top: 10px;
    margin-bottom: 12px; /* v3.12 Tightened PC Margin */
    background: var(--yellow);
    border-radius: 28px;
    padding: 14px 18px 18px 18px;
    color: #000;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

.rating-row { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.rating-badge {
    background: #000;
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
}

.movie-title { font-size: 20px; font-weight: 900; margin-bottom: 2px; line-height: 1.2; display: flex; align-items: center; gap: 8px; }
.movie-title a { text-decoration: none; color: inherit; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.movie-title a[href]:hover { text-decoration: underline; cursor: pointer; }
.movie-title a:not([href]) { cursor: default; }

.release-year {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.55;
    flex-shrink: 0;
}

.new-badge {
    background: #ff3b30;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.release-date {
    font-size: 0.7em;
    opacity: 0.6;
    margin-left: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.credits-info { margin-bottom: 6px; font-size: 11px; font-weight: 700; opacity: 0.8; }
.credit-link { text-decoration: none; color: inherit; }
.credit-link:hover { text-decoration: underline; }

.movie-overview {
    font-size: 12.5px;
    line-height: 1.35; 
    margin-bottom: 10px; 
    display: -webkit-box; 
    -webkit-line-clamp: unset !important; /* Restriction Released for PC */
    -webkit-box-orient: vertical; 
    overflow: hidden; 
    opacity: 0.85; 
}
.ott-section { margin-top: auto; padding-top: 4px; }
.ott-list { display: flex; gap: 8px; flex-wrap: wrap; }
.ott-item { display: flex; flex-direction: column; align-items: center; gap: 3px; }

.ott-icon-small {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
}

.ott-icon-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ott-link-wrapper {
    text-decoration: none;
    display: block;
    transition: transform 0.2s;
}

.ott-link-wrapper:active {
    transform: scale(0.9);
}

.ott-name {
    font-size: 8px;
    font-weight: 900;
    text-align: center;
    max-width: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.2px;
    color: #000;
    opacity: 0.7;
}

/* FOOTER - Refined for mobile compression */
.footer {
    position: absolute;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: var(--bg);
    order: 5;
}

.draw-btn {
    width: 100%;
    padding: 14px 18px; /* v3.12 Slimmed from 18px */
    margin: 10px 0; /* v3.12 Added external margin for breathing room */
    border: none;
    border-radius: 100px;
    background-color: var(--accent);
    color: var(--btn-text);
    font-size: 17px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 30px var(--btn-shadow);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.draw-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
    box-shadow: 0 12px 35px var(--btn-shadow);
}

.draw-btn:active { transform: scale(0.94) translateY(0); }

.draw-btn.drawing {
    animation: glowPulse 1.5s infinite ease-in-out;
    cursor: wait;
}

@keyframes glowPulse {
    0% { box-shadow: 0 0 5px var(--accent), 0 0 10px var(--accent); opacity: 0.9; }
    50% { box-shadow: 0 0 20px var(--accent), 0 0 40px var(--accent); opacity: 1; }
    100% { box-shadow: 0 0 5px var(--accent), 0 0 10px var(--accent); opacity: 0.9; }
}

.legal-footer {
    text-align: center;
    padding-bottom: 2px;
}

.legal-links {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 8px 12px;
    margin-bottom: 4px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    overflow-x: hidden;
}

.legal-links a {
    color: var(--legal-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 10px;
    transition: color 0.2s;
    white-space: nowrap;
}

.legal-links a:hover {
    color: var(--text);
}

.copyright {
    font-size: 9px;
    color: var(--legal-text);
    opacity: 0.9;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Search Result Item Styling */
.search-item {
    display: flex;
    gap: 15px;
    padding: 10px;
    background: var(--card-bg);
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.2s;
    border: 1px solid var(--border);
    border-left: 4px solid transparent !important;
}

.search-item.active {
    background-color: #2a2a2a !important;
    border-left: 4px solid #bcff00 !important;
}

.search-item:hover {
    background-color: #2a2a2a !important;
}

.search-item:active {
    transform: scale(0.98);
}

.search-item-poster {
    width: 60px;
    height: 90px;
    border-radius: 8px;
    object-fit: cover;
    background: #1a1a1a;
}

.search-item-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.search-item-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
}

.search-item-meta {
    font-size: 12px;
    color: var(--sub-text);
    font-weight: 600;
}

/* PC OPTIMIZATION */
@media (min-width: 1024px) {
    .main-card {
        margin-bottom: 80px; /* v3.12 Reduced from 100px */
        gap: 15px;
    }
    .poster-display {
        height: 60%;
    }
    .movie-info-box {
        height: auto !important;
        max-height: none !important;
        min-height: 250px !important; /* v3.14 Ultimate Height Fix */
        padding-bottom: 24px !important; /* v3.14 Ultimate Bottom Space */
    }
    .result-container {
        height: auto;
        min-height: 100%;
    }
}

/* [MOBILE SURGERY] Media Query for strict scoping */
@media (max-width: 768px) {
    .app-container { padding: 0 16px; }
    
    /* Overwhelming Spacing Compaction Surgery */
    .header { padding: 6px 0 4px 0 !important; }
    .header .logo { margin-right: auto; padding-right: 15px; } /* v3.12 Create gap with Cine Talk */
    .controls { gap: 6px !important; } /* v3.12 Tighter icon gaps */
    
    .search-overlay { margin-top: 2px !important; margin-bottom: 2px !important; } 
    .search-header { 
        height: 34px !important; 
        padding: 0 14px !important; 
        border-radius: 17px !important; 
        border: 1.5px solid #333 !important; 
        box-shadow: none !important; 
    }
    #search-input { font-size: 14px !important; }
    .genre-nav { 
        padding: 4px 0 6px 0 !important; 
        margin-bottom: 4px !important; 
        gap: 6px !important; 
        border: none !important; /* v3.13 Ultimate Eradicate */
        box-shadow: none !important;
        background: transparent !important;
    } 
    .genre-chip { padding: 5px 10px !important; font-size: 11.5px !important; }

    .poster-display {
        width: 72%;
        height: auto;
        max-height: 38dvh;
        aspect-ratio: 2 / 3;
        margin: 0 auto;
        box-shadow: 0 12px 30px rgba(0,0,0,0.6);
    }

    .movie-info-box {
        margin-top: 8px;
        margin-bottom: 4px !important; /* v3.12 Mobile Extreme Tightened Margin */
        padding: 10px 14px 12px 14px; 
        border-radius: 20px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.3);
        max-height: 40vh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        flex-shrink: 0;
    }

    .movie-title { font-size: 17px; margin-bottom: 1px; }
    .credits-info { font-size: 10px; margin-bottom: 4px; }
    
    .movie-overview {
        font-size: 11.5px;
        -webkit-line-clamp: 4 !important; /* v3.12 Expanded for mobile density */
        line-height: 1.3;
        margin-bottom: 0px !important; /* v3.14 Ultimate Compression */
    }

    .ott-section {
        margin-top: 0 !important; /* v3.13 Remove auto push */
        padding-top: 2px !important; /* v3.14 Ultimate Compression */
    }

    .ott-icon-small { width: 22px; height: 22px; }
    .ott-name { font-size: 7.5px; }

    .main-card { margin-bottom: 110px; margin-top: 4px; }
    .footer { bottom: 12px; gap: 8px; }
    .draw-btn { padding: 14px; font-size: 15.5px; }
    
    .legal-links {
        gap: 4px 8px;
        max-width: 100%;
        flex-wrap: nowrap !important;
    }
}

/* ULTRA SMALL SCREENS (iPhone SE etc) */
@media (max-height: 700px) {
    .slot-window { height: 260px; width: 200px; }
    .slot-item { height: 260px; }
    .poster-display { width: 65%; max-height: 35dvh; }
    .movie-title { font-size: 16px; }
    .movie-overview { -webkit-line-clamp: 2; }
    .main-card { margin-bottom: 105px; }
    .footer { bottom: 6px; gap: 6px; }
    .draw-btn { padding: 12px; font-size: 14px; }
}

/* RTL Support (Arabic) */
[dir="rtl"] .logo {
    transform-origin: right center;
}

[dir="rtl"] .lang-menu {
    right: auto;
    left: 0;
}

[dir="rtl"] .lang-item {
    flex-direction: row;
    text-align: right;
}

[dir="rtl"] .genre-nav-wrapper::after {
    right: auto;
    left: 0;
    background: linear-gradient(to left, transparent, var(--bg));
}

[dir="rtl"] .movie-title {
    text-align: right;
}

[dir="rtl"] .credits-info {
    text-align: right;
}

[dir="rtl"] .movie-overview {
    text-align: right;
}

[dir="rtl"] .ott-section {
    text-align: right;
}

[dir="rtl"] .ott-list {
    justify-content: flex-start;
}

[dir="rtl"] .legal-links {
    flex-direction: row;
}

/* Category Tags */
.media-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-block;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
    color: #ffffff;
    z-index: 10;
    letter-spacing: 0.5px;
}
.media-tag.movie {
    background-color: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.media-tag.tv {
    background-color: #5b21b6;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- FINAL SURGICAL OVERRIDE: WHITESPACE ERADICATION & RADIUS COMPLETION (v5.0) --- */

/* 1. Global: Perfectly eradicate all bottom ghost padding in yellow box */
#info-box, .movie-info-box {
    padding-bottom: 0px !important;
    overflow: hidden !important;
}

/* 2. Target OTT Wrapper: Absolute zero whitespace below icons */
.ott-section, .ott-list, #ott-list, .platform-icons, .ott-links {
    margin-bottom: 0px !important;
    padding-bottom: 0px !important;
}

/* 3. Radius Completion: Enforce perfect rounded corners across all viewports */
#info-box, .movie-info-box {
    border-bottom-left-radius: 24px !important;
    border-bottom-right-radius: 24px !important;
}

/* 4. Vertical Alignment: Tighten connection with footer draw button */
@media (max-width: 768px) {
    .main-card {
        margin-bottom: 105px !important; /* Precision alignment */
    }
    
    .movie-info-box {
        margin-bottom: 0px !important;
    }
}

@media (min-width: 1024px) {
    .movie-info-box {
        margin-bottom: 10px !important;
    }
}
