:root {
    --bg-dark: #09090b;
    --bg-header: #000000;
    --bg-card: #131316;
    --bg-soft: #18181b;

    /* Replaced Green with Premium Cyan/Blue */
    --ib-primary: #00d4ff; 
    --ib-primary-glow: rgba(0, 212, 255, 0.2);

    --text-main: #ffffff;
    --text-dim: #a1a1aa;
    --text-soft: #71717a;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 50px;

    --transition: 0.2s ease;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Roboto", system-ui, sans-serif;
    background: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}


header {
    background: var(--bg-header);
    border-bottom: 1px solid #27272a;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    width: 100%;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.logo span {
    color: var(--ib-primary);
}

/* --- UPDATED SEARCH BAR FOR MOBILE --- */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    /* This allows the search bar to grow if needed */
    flex: 1; 
    justify-content: flex-end;
}

.search-bar {
    position: relative;
    /* Ensure child absolute elements aren't hidden */
    overflow: visible !important; 
}

#searchDropdown {
    position: absolute;
    top: 100%;
    right: 0; /* Align to right on mobile so it doesn't go off-screen left */
    width: 250px; /* Specific width for mobile */
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
    z-index: 99999 !important; 
    max-height: 60vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    /* iOS Momentum Scrolling */
    -webkit-overflow-scrolling: touch; 
}

@media (max-width: 480px) {
    #searchDropdown {
        /* On very small phones, make it almost full width */
        width: 80vw; 
        position: fixed; /* Switch to fixed if absolute gets clipped by header */
        top: 60px; 
        right: 10px;
    }
}

/* --- ENTRANCE POPUP TOUCH FIX --- */
.entrance-overlay {
    /* ... existing props ... */
    touch-action: none; /* Block background scrolling */
}

/* Ensure the button is big enough to tap */
.enter-btn {
    min-height: 50px;
    cursor: pointer;
    /* Remove default mobile highlighting */
    -webkit-tap-highlight-color: transparent; 
}

.bug-btn {
    background: transparent;
    border: 1px solid #27272a;
    color: #ef4444;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    cursor: pointer;
}


.site-notice {
    padding: 30px 20px;
    text-align: center;
}

.site-notice h2 {
    font-size: 1.2rem;
    color: #f4f4f5;
    margin-bottom: 8px;
}

.notice-main {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.notice-warning {
    color: var(--ib-primary);
    font-size: 0.8rem;
    font-weight: bold;
}


.movies-grid {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.movie-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition);
    border: 1px solid #27272a;
}

.movie-card:hover {
    transform: scale(1.03);
    border-color: var(--ib-primary);
}

.movie-poster {
    width: 100%;
    height: 230px;
    object-fit: cover;
}

.movie-card-info {
    padding: 10px 8px;
    text-align: left;
}

.movie-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}


.movie-card-year {
    display: inline-block;
    font-size: 0.65rem;
    color: var(--ib-primary);
    background: rgba(0, 212, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    font-weight: 700;
}

.card-lang-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--ib-primary);
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--ib-primary);
}


.movie-view-section {
    padding: 20px 16px;
    max-width: 1000px;
    margin: 0 auto;
}

.movie-content-top {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.view-poster img {
    width: 180px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    flex-shrink: 0;
}

.view-details {
    flex: 1;
    min-width: 0;
}

#viewTitle {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.view-meta {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lang-tag {
    color: var(--ib-primary);
    font-weight: bold;
}


.info-block {
    border-left: 2px solid var(--ib-primary);
    padding-left: 10px;
    margin-bottom: 12px;
    background: rgba(255,255,255,0.02);
    padding-top: 5px;
    padding-bottom: 5px;
    border-radius: 0 4px 4px 0;
}

.info-block h3 {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
}


.action-buttons-container {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.btn-action {
    flex: 1;
    max-width: 150px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.dl-button {
    background: #27272a;
    color: white;
    border: 1px solid #3f3f46;
}

.watch-button {
    background: var(--ib-primary);
    color: #000;
}

.btn-action:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}


.video-wrapper {
    max-width: 850px;
    margin: 0 auto;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid #27272a;
    cursor: pointer;
}

.plyr { --plyr-color-main: var(--ib-primary); }

.plyr__progress__container {
    flex: 1 !important;
}

.plyr__volume {
    max-width: 80px !important;
    min-width: 32px;
}


@media (max-width: 768px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
        padding: 8px;
    }
    .movie-poster { height: 150px; }

    .movie-content-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .view-poster img {
        width: 150px;
    }

    .view-meta {
        justify-content: center;
    }

    .action-buttons-container {
        justify-content: center;
        width: 100%;
    }

    .info-block {
        border-left: 2px solid var(--ib-primary);
        text-align: left;
        margin: 5px 10px;
    }
}

.hidden { display: none !important; }
.notice-highlight { border-left: 3px solid var(--ib-primary); padding-left: 10px; }


footer {
    margin-top: 50px;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid #27272a;
    background: linear-gradient(to bottom, #09090b, #000000);
    position: relative;
}

footer::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 1px;
    background: var(--ib-primary);
    box-shadow: 0 0 15px var(--ib-primary);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 15px;
    display: block;
    text-decoration: none;
    color: white;
}

.footer-logo span {
    color: var(--ib-primary);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--ib-primary);
}

.footer-copy {
    font-size: 0.7rem;
    color: var(--text-soft);
    letter-spacing: 0.5px;
}

.entrance-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000; /* Solid black for focus */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    transition: all 0.5s ease;
}

.entrance-card {
    background: #0d0d0f;
    border: 1px solid #1f1f23;
    max-width: 550px;
    width: 100%;
    padding: 35px;
    border-radius: 4px; /* iBOMMA uses sharper corners */
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.disclaimer-header {
    margin-bottom: 25px;
}

.warning-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.disclaimer-header h2 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.disclaimer-body {
    text-align: left;
    margin-bottom: 30px;
}

.disclaimer-body p {
    color: #a1a1aa;
    font-size: 0.85rem;
    line-height: 1.7;
    margin-bottom: 15px;
}

.agreement-text {
    color: #d4d4d8 !important;
    border-top: 1px solid #1f1f23;
    padding-top: 15px;
    font-style: italic;
}

.agreement-text strong {
    color: var(--ib-primary);
}

.enter-btn {
    width: 100%;
    background: var(--ib-primary);
    color: #000;
    border: none;
    padding: 14px;
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    border-radius: 2px;
}

.enter-btn:hover {
    background: #00b8d4;
    transform: translateY(-2px);
}


.entrance-hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.1);
}

@media (max-width: 480px) {
    .entrance-card {
        padding: 20px;
    }
    .disclaimer-body p {
        font-size: 0.8rem;
    }
}

.plyr { position: relative; }

.seek-feedback {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #7CFC00; /* Your primary green */
    padding: 20px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeScale 0.6s ease-out;
}

.seek-feedback.forward { right: 15%; }
.seek-feedback.backward { left: 15%; }

.seek-feedback i { font-size: 2rem; }
.seek-feedback span { font-size: 0.8rem; font-weight: bold; margin-top: 5px; }

@keyframes fadeScale {
    0% { opacity: 0; transform: translateY(-50%) scale(0.5); }
    50% { opacity: 1; transform: translateY(-50%) scale(1.1); }
    100% { opacity: 0; transform: translateY(-50%) scale(1); }
}


.filter-container {
    padding: 0 16px;
    margin: 15px 0 5px;
    display: flex;
    justify-content: flex-start;
}


.year-filter-wrapper {
    position: relative;
}


#yearFilter {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    padding: 10px 40px 10px 14px;
    background: linear-gradient(145deg, #18181b, #0f0f11);
    color: var(--text-main);

    border: 1px solid #27272a;
    border-radius: var(--radius-lg);

    font-size: 0.8rem;
    font-weight: 600;

    cursor: pointer;
    transition: all 0.25s ease;

    box-shadow: inset 0 0 0 rgba(0,0,0,0.3);
}


#yearFilter:hover {
    border-color: var(--ib-primary);
    box-shadow: 0 0 10px var(--ib-primary-glow);
}


#yearFilter:focus {
    outline: none;
    border-color: var(--ib-primary);
    box-shadow: 0 0 15px var(--ib-primary-glow);
}


.year-filter-wrapper::after {
    content: "⌄";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ib-primary);
    font-size: 0.8rem;
    pointer-events: none;
}


@media (max-width: 768px) {
    #yearFilter {
        width: 100%;
    }
}


#yearFilter option {
    background: #18181b;
    color: #ffffff;
}


.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0;
    flex-wrap: wrap;
}


.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;

    background: linear-gradient(145deg, #18181b, #0f0f11);
    color: var(--text-dim);

    border: 1px solid #27272a;
    border-radius: 8px;

    font-size: 0.8rem;
    font-weight: 600;

    cursor: pointer;
    transition: all 0.25s ease;

    display: flex;
    align-items: center;
    justify-content: center;
}


.page-btn:hover {
    color: var(--ib-primary);
    border-color: var(--ib-primary);
    box-shadow: 0 0 10px var(--ib-primary-glow);
    transform: translateY(-2px);
}


.page-btn.active {
    background: var(--ib-primary);
    color: #000;
    border-color: var(--ib-primary);

    box-shadow: 0 0 12px var(--ib-primary-glow);
}

/* Click effect */
.page-btn:active {
    transform: scale(0.95);
}



.page-btn.nav {
    padding: 0 14px;
    font-weight: 700;
}

video {
    touch-action: manipulation;
}
.section-title {
  margin: 20px 16px 10px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
}
/* Search Dropdown Styling */
#searchDropdown {
    position: absolute;
    top: 45px; /* Adjust based on your header height */
    left: 0;
    width: 100%;
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
    z-index: 9999;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.7);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px;
    gap: 15px;
    cursor: pointer;
    border-bottom: 1px solid #222;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #222;
}

.dropdown-item img {
    width: 40px;
    height: 55px;
    object-fit: cover;
    border-radius: 4px;
}

.dropdown-title {
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.dropdown-year {
    color: #888;
    font-size: 12px;
}

.hidden { display: none !important; }

/* Download Button Protection - No cursor link hint */
.dl-button {
    -webkit-touch-callout: none; /* iOS */
    -webkit-user-select: none;
}
/* Ensure the search container doesn't clip the dropdown */
.search-bar {
    position: relative;
    overflow: visible !important; /* Crucial for mobile */
}

#searchDropdown {
    position: absolute;
    top: 100%; /* Sits exactly under the input */
    left: 0;
    width: 100%;
    min-width: 280px; /* Better for small screens */
    background: #1a1a1a;
    z-index: 99999 !important; /* Must be higher than header/main */
    border: 1px solid #333;
    max-height: 60vh; /* Don't cover the whole screen */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scroll for iOS */
}

/* Make dropdown items larger for "fat fingers" on mobile */
.dropdown-item {
    padding: 12px;
    border-bottom: 1px solid #222;
    display: flex;
    align-items: center;
}

/* Fix for the Entrance Popup on Mobile */
.entrance-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.95);
    touch-action: none; /* Prevents scrolling behind the popup */
}
/* --- SEARCH WRAPPER LOGIC --- */
.search-wrap {
    position: relative;
    z-index: 1001; /* Higher than header sticky z-index */
}

.search-bar input {
    width: 150px; /* Default desktop size */
    transition: width 0.3s ease;
}

#searchDropdown {
    position: absolute;
    top: 45px;
    right: 0;
    width: 280px; /* Wider than the input */
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    z-index: 999999 !important;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 15px 50px rgba(0,0,0,0.9);
    pointer-events: auto; /* Ensure clicks register */
}

/* --- MOBILE SPECIFIC FIXES --- */
@media (max-width: 768px) {
    .header-container {
        padding: 10px;
    }

    .search-bar input {
        width: 120px; /* Smaller input for mobile header space */
    }

    .search-bar input:focus {
        width: 160px; /* Grow slightly on tap */
    }

    #searchDropdown {
        position: fixed; /* Fix to viewport so it can't be cut off by header */
        top: 60px; 
        left: 10px;
        right: 10px;
        width: calc(100% - 20px);
        max-height: 80vh;
    }
}

/* --- DOWNLOAD BUTTON PROTECTION --- */
#movieDownloadBtn {
    /* Prevents the 'Save Link' popup on long-press in mobile browsers */
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    touch-action: manipulation;
}
/* --- SEARCH WRAPPER LOGIC --- */
.search-wrap {
    position: relative;
    z-index: 1001; /* Higher than header sticky z-index */
}

.search-bar input {
    width: 150px; /* Default desktop size */
    transition: width 0.3s ease;
}

#searchDropdown {
    position: absolute;
    top: 45px;
    right: 0;
    width: 280px; /* Wider than the input */
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    z-index: 999999 !important;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 15px 50px rgba(0,0,0,0.9);
    pointer-events: auto; /* Ensure clicks register */
}

/* --- MOBILE SPECIFIC FIXES --- */
@media (max-width: 768px) {
    .header-container {
        padding: 10px;
    }

    .search-bar input {
        width: 120px; /* Smaller input for mobile header space */
    }

    .search-bar input:focus {
        width: 160px; /* Grow slightly on tap */
    }

    #searchDropdown {
        position: fixed; /* Fix to viewport so it can't be cut off by header */
        top: 60px; 
        left: 10px;
        right: 10px;
        width: calc(100% - 20px);
        max-height: 80vh;
    }
}

/* --- DOWNLOAD BUTTON PROTECTION --- */
#movieDownloadBtn {
    /* Prevents the 'Save Link' popup on long-press in mobile browsers */
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    touch-action: manipulation;
}