/* =====================================================================
   MyFlixer theme
   ===================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { position: relative; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; }
button { font-family: inherit; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body.no-select, body.no-select * { user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; }
body.no-select input, body.no-select textarea { user-select: text; -webkit-user-select: text; }

/* =====================================================================
   Inner pages: fixed navigation bar
   ===================================================================== */
.navbar {
    background-color: #1e3a8a;
    padding: 0.3rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #1e3a8a;
    will-change: background-color, box-shadow;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    position: relative;
}
.logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; cursor: pointer; }
.logo-image { width: auto; height: 45px; object-fit: contain; }
.nav-menu { display: flex; list-style: none; gap: 2.5rem; transition: all 0.3s ease; }

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}
.hamburger-line { width: 100%; height: 3px; background-color: #ffffff; border-radius: 2px; transition: all 0.3s ease; transform-origin: center; }
.hamburger.active .hamburger-line:nth-child(1) { transform: translateY(10.5px) rotate(45deg); }
.hamburger.active .hamburger-line:nth-child(2) { opacity: 0; transform: translateX(-20px); }
.hamburger.active .hamburger-line:nth-child(3) { transform: translateY(-10.5px) rotate(-45deg); }

.nav-link { color: #ffffff; text-decoration: none; font-size: 1rem; font-weight: 500; transition: color 0.3s ease; }
.nav-link:hover, .nav-link.active { color: #60a5fa; }

.login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #1e293b;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-left: auto;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2); }
.login-btn svg { width: 16px; height: 16px; }

/* Generic yellow pill button (404 page) */
.view-site-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: #1e3a8a;
    color: #ffffff;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}
.view-site-btn:hover { background-color: #3E8AFA; color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(62, 138, 250, 0.4); }

/* =====================================================================
   Home (landing) page
   ===================================================================== */
html.home { font-size: 14px; }
body.home {
    background: #163662;
    color: #f5f5f5;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 400;
    -webkit-text-size-adjust: none;
    min-height: 100%;
}
body.home a { color: #fff; outline: none; }
body.home a:hover { color: #3E8AFA; }
body.home h1, body.home h2, body.home h3 { margin-bottom: .5rem; font-weight: 500; line-height: 1.2; }
body.home p { margin: 0 0 1rem; }
body.home ul { margin: 0 0 1rem; padding-left: 40px; }
body.home strong { font-weight: 700; }
.ulclear { list-style: none; padding: 0 !important; }
.clearfix::after { content: ""; display: table; clear: both; }
.text-center { text-align: center; }
.mb-5 { margin-bottom: 3rem; }
.home .container { max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 15px; }

#xwrapper { width: 100%; position: relative; }
#xheader { height: 60px; padding: 0; margin-bottom: 25px; position: relative; z-index: 99; background: none; }
#xheader #xlogo { display: inline-block; height: 40px; margin: 10px 0; float: left; }
#xheader #xlogo img { height: 100%; width: auto; float: left; margin-right: 10px; }
#xheader_menu { height: 60px; margin: 0 0 0 30px; float: right; }
#xheader_menu ul.header_menu-list { list-style: none; padding: 0; margin: 0; display: block; }
#xheader_menu ul.header_menu-list .nav-item { display: inline-block; margin: 0 0 0 20px; position: relative; }
#xheader_menu ul.header_menu-list .nav-item > a {
    height: 60px; line-height: 60px; color: #fff; margin: 0; padding: 0 10px;
    display: inline-block; font-size: 14px; font-weight: 500; letter-spacing: 1px;
}
#xheader_menu ul.header_menu-list .nav-item > a:hover { color: #3E8AFA; }
#xheader_browser { float: right; height: 60px; position: relative; margin: 0 0 0 20px; display: none; }
#xheader_browser .header-btn {
    height: 34px; cursor: pointer; margin: 13px 0; line-height: 34px; padding: 0 12px;
    background: #fff; font-size: 12px; border-radius: 3px; color: #111; display: flex; align-items: center;
}
#xheader_browser .header-btn .i-bars { margin-right: .5rem; }
#xheader_browser.active .header-btn { color: #3E8AFA; }

#xmain-wrapper { position: relative; }
#xmain-wrapper:before, #xmain-wrapper:after {
    content: ""; width: 100%; height: 590px; position: absolute; top: -85px; left: 0; right: 0;
    background-image: url("../img/homesearch-bg.jpg"); background-size: cover; background-position: 50% 25%;
}
#xmain-wrapper:after { background: linear-gradient(180deg, rgba(22,54,98,0) 50%, rgba(22,54,98,1) 100%); }
#xmain-wrapper .container { position: relative; z-index: 3; }

#mw-home { padding: 50px 0; max-width: 1140px; margin: 0 auto; }
#mw-home .mw-sitename { font-size: 2.5rem; font-weight: 700; text-align: center; color: #fff; margin: 20px 0; line-height: 1.2; }

#xsearch.home-search { display: block; margin: 10px 0 40px; padding: 0; width: 100%; background: none; position: relative; }
#xsearch .search-form { position: relative; }
#xsearch .search-input {
    display: block; height: 50px; width: 100%; border-radius: 5px; padding: 0 100px 0 20px;
    font-size: 16px; border: none; font-weight: 400; color: #495057; background: #fff; line-height: 1.5; outline: none;
    font-family: inherit;
}
#xsearch .search-submit {
    position: absolute; top: 0; right: 0; bottom: 0; height: 50px; width: 80px; background: #3E8AFA;
    border-radius: 0 5px 5px 0; cursor: pointer; text-align: center; display: inline-block; z-index: 2;
}
#xsearch .search-icon { display: flex; align-items: center; justify-content: center; height: 100%; color: #fff; font-size: 20px; }

.home .btn {
    display: inline-block; padding: 15px 30px; border-radius: 50px; text-decoration: none; font-weight: 600;
    border: none; font-size: 14px; line-height: 1.2; text-align: center; vertical-align: middle; cursor: pointer;
}
.mw-buttons .btn-primary {
    font-weight: 600; border: 4px solid #fff; background: #3E8AFA; min-width: 250px; color: #fff; padding: 15px 30px;
    font-size: 1.25rem; line-height: 1.5;
    transition: all .2s ease 0s; display: inline-flex; align-items: center; justify-content: center;
}
.mw-buttons .btn-primary svg { width: 18px; height: 18px; }
.mw-buttons .btn-primary .ml-2 { margin-left: .5rem; }
.mw-buttons .btn-primary:hover { transform: scale(1.1); box-shadow: 0 0 20px rgba(62,138,250,.6); color: #fff; }
.mw-body { font-size: 16px; line-height: 1.5em; }

.seo-content {
    max-width: 1200px; margin: 40px auto; padding: 20px; background: rgba(255,255,255,0.05);
    border-radius: 10px; color: #fff; line-height: 1.8;
}
.seo-content h2 { font-size: 1.8rem; margin: 30px 0 20px; color: #fff; font-weight: 500; line-height: 1.2; }
.seo-content h3 { font-size: 1.75rem; margin: 0 0 .5rem; color: #fff; font-weight: 500; line-height: 1.2; }
.seo-content p { font-size: 16px; margin-bottom: 20px; }
.seo-content ul { margin: 0 0 1rem; padding-left: 40px; }
.seo-content li { font-size: 14px; line-height: 1.8; }

.netprime-network {
    margin: 30px auto; padding: 30px; background: #f5f5f5; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); max-width: 1200px;
}
.netprime-network h2 { font-size: 24px; color: #333; margin-bottom: 20px; text-align: center; }
.netprime-network > p { text-align: center; color: #666; margin-bottom: 30px; }
.network-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.network-card { background: #fff; padding: 15px; border-radius: 6px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.network-card h3 { font-size: 16px; margin-bottom: 8px; }
.network-card h3 a { color: #3E8AFA; }
.network-card p { font-size: 13px; color: #555; line-height: 1.6; margin: 0; }

#xfooter { position: relative; }
#xfooter .container { position: relative; z-index: 3; text-align: center; }
#xfooter .footer-links { margin-bottom: 10px; }
#xfooter .footer-links ul { padding: 0; margin: 0; list-style: none; }
#xfooter .footer-links ul li { display: inline-block; margin: 10px 20px; }
#xfooter-about { padding: 0 0 40px; }
#xfooter-about .about-text { max-width: 800px; text-align: center; margin: 0 auto 20px; line-height: 1.6em; font-size: 12px; opacity: .4; }
#xfooter-about .copyright { text-align: center; margin-bottom: 0; font-size: 12px; }
.network-links { text-align: center; padding: 20px 0; border-top: 1px solid rgba(255,255,255,0.1); margin-top: 20px; }
.network-links p { font-size: 12px; color: #999; margin-bottom: 10px; }
.network-links-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 15px; max-width: 900px; margin: 0 auto; }
.network-links-list a { color: #888; font-size: 11px; }

@media screen and (max-width: 780px) {
    #xmain-wrapper:before, #xmain-wrapper:after { height: 400px; }
    #xheader_browser { display: inline-block; }
    #xheader_menu { display: none; position: absolute; width: 220px; top: 60px; right: 15px; background: #fff; border-radius: 5px; height: auto; padding: 10px 0; }
    #xheader_menu .header_menu-list li.nav-item { display: block; margin: 0; float: none; text-align: center; }
    #xheader_menu ul.header_menu-list .nav-item > a { height: auto; line-height: normal; padding: 10px 20px; color: #111; }
    #xheader_menu ul.header_menu-list .nav-item > a:hover { color: #3E8AFA; }
    #xheader_menu.active { display: block; }
    #mw-home { padding-top: 20px; }
    #xheader #xlogo { height: 30px; margin: 15px 0; }
    #xsearch .search-input { padding-left: 15px; padding-right: 65px; }
    #xsearch .search-submit { width: 50px; }
    #xsearch .search-icon svg { width: 16px; height: 16px; }
    .mw-body { font-size: 14px; line-height: 1.5em; }
    .mw-buttons .btn { font-size: 18px; padding: 12px 40px; }
    .seo-content h2 { font-size: 1.4rem; }
    .seo-content h3 { font-size: 1.25rem; }
}

/* =====================================================================
   Listing pages (Movies / TV Shows / Top IMDB / Genre)
   ===================================================================== */
.page-header {
    padding: 4.5rem 2rem 2rem;
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
    text-align: center;
}
.page-title { font-size: 2.5rem; font-weight: 700; color: #000000; margin-bottom: 1rem; }
.page-subtitle { font-size: 1.1rem; color: #666; margin-bottom: 1.5rem; }
.page-search {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    background-color: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #1e3a8a;
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.18);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.page-search:focus-within { border-color: #3E8AFA; box-shadow: 0 8px 28px rgba(62, 138, 250, 0.35); }
.page-search input { flex: 1; min-width: 0; padding: 1rem 1.5rem; border: none; outline: none; font-size: 0.95rem; font-family: inherit; color: #1e293b; }
.page-search input::placeholder { color: #8a93a6; }
.page-search button {
    background-color: #1e3a8a; border: none; padding: 1rem 1.5rem; cursor: pointer;
    transition: background-color 0.3s ease; display: flex; align-items: center; color: #fff;
}
.page-search button:hover { background-color: #3E8AFA; }

.content-section { padding: 3rem 2rem; background-color: #f5f5f5; min-height: 60vh; }
.section-header {
    max-width: 1400px;
    margin: 0 auto 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.section-header.genre-list { margin-top: -1rem; }
.section-title { font-size: 1.8rem; font-weight: 700; color: #000000; }

.filter-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.filter-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border: 1px solid #ccc;
    background-color: transparent;
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    line-height: 1.6;
}
.filter-btn.active { background-color: #1e3a8a; color: #fff; border-color: #1e3a8a; }
.filter-btn:hover:not(.active) { border-color: #999; color: #333; }

.toggle-buttons { display: flex; gap: 0.5rem; background-color: #e0e0e0; padding: 0.25rem; border-radius: 50px; }
.toggle-btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: none;
    background-color: transparent;
    color: #666;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
    line-height: 1.6;
}
.toggle-btn.active { background-color: #1e3a8a; color: #fff; }
.toggle-btn:hover:not(.active) { color: #333; }

.movies-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.5rem;
}
.movie-card {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    text-decoration: none;
}
.movie-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); }
.movie-poster { width: 100%; aspect-ratio: 2/3; object-fit: cover; background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%); }
.quality-badge {
    position: absolute; top: 8px; right: 8px; background-color: #1e3a8a; color: #fff;
    padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.7rem; font-weight: 700; line-height: 1.6;
}
.rank-badge {
    position: absolute; top: 8px; left: 8px; background: linear-gradient(135deg, #3E8AFA 0%, #1e3a8a 100%); color: #fff;
    padding: 0.4rem 0.6rem; border-radius: 4px; font-size: 0.85rem; font-weight: 700; box-shadow: 0 2px 8px rgba(30, 58, 138, 0.4); line-height: 1.6;
}
.type-badge {
    position: absolute; top: 8px; left: 8px; background: #1e3a8a; color: #fff;
    font-size: 0.65rem; font-weight: 700; padding: 2px 7px; border-radius: 3px; line-height: 1.6;
}
.movie-info { padding: 1rem; }
.movie-title {
    font-size: 0.95rem; font-weight: 600; color: #000000; margin-bottom: 0.5rem;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.4; min-height: 2.66em;
}
.movie-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: #666; }
.movie-year { color: #999; }
.movie-rating { display: flex; align-items: center; gap: 0.25rem; color: #3E8AFA; }
.content-grid .movie-rating { font-weight: 600; }

.loading { text-align: center; padding: 3rem; color: #666; font-size: 1.1rem; }
.spinner {
    border: 3px solid #e0e0e0; border-top: 3px solid #1a73e8; border-radius: 50%;
    width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 0 auto 1rem;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.pagination {
    max-width: 1400px; margin: 3rem auto 0; display: flex; justify-content: center; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.page-btn {
    display: inline-block; padding: 0.75rem 1.25rem; background-color: #ffffff; color: #666; border: 1px solid #ccc;
    border-radius: 4px; cursor: pointer; transition: all 0.3s ease; font-size: 0.95rem; font-weight: 600; line-height: 1.6;
}
.page-btn:hover:not(.disabled):not(.active) { background-color: #f5f5f5; color: #000; border-color: #999; }
.page-btn.active { background-color: #1e3a8a; color: #fff; border-color: #1e3a8a; }
.page-btn.disabled { opacity: 0.5; cursor: not-allowed; }
.page-info { color: #999; font-size: 0.9rem; padding: 0 1rem; }

@media (max-width: 1024px) {
    .movies-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
    .nav-container { padding: 0 1.5rem; }
    .nav-menu { gap: 2rem; }
}
@media (max-width: 768px) {
    .page-header { padding: 4rem 1rem 1.5rem; }
    .page-title { font-size: 2rem; }
    .content-section { padding: 2rem 1rem; }
    .section-title { font-size: 1.5rem; }
    .movies-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
    .filter-buttons { width: 100%; justify-content: center; }
    .filter-btn { font-size: 0.85rem; padding: 0.4rem 1rem; }
    .toggle-btn { padding: 0.4rem 1.2rem; font-size: 0.9rem; }
}
@media (max-width: 480px) {
    .movies-grid { grid-template-columns: repeat(2, 1fr); gap: 0.875rem; }
    .rank-badge { font-size: 0.75rem; padding: 0.3rem 0.5rem; }
    .pagination { gap: 0.35rem; }
    .page-btn { padding: 0.6rem 1rem; font-size: 0.85rem; }
    .page-info { width: 100%; text-align: center; padding: 0.5rem 0; }
}

/* =====================================================================
   Search page
   ===================================================================== */
.search-page-header {
    padding: 4.5rem 2rem 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
    border-bottom: 1px solid #e0e0e0;
}
.search-page-header h1 { font-size: 1.6rem; font-weight: 700; color: #000; margin-bottom: 1rem; text-align: center; }
.search-bar-wrap {
    display: flex; align-items: center; max-width: 700px; margin: 0 auto; background: #fff; border-radius: 50px;
    padding: 8px 8px 8px 24px; box-shadow: 0 10px 40px rgba(0,0,0,0.18); border: none;
}
.search-bar-wrap .sb-icon { width: 22px; height: 22px; color: #64748b; flex-shrink: 0; }
.search-bar-wrap input { flex: 1; min-width: 0; border: none; outline: none; font-size: 16px; padding: 12px 16px; background: transparent; color: #1e293b; font-family: inherit; }
.search-bar-wrap input::placeholder { color: #94a3b8; }
.search-bar-wrap button {
    width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    display: flex; align-items: center; justify-content: center; transition: transform 0.2s, box-shadow 0.2s; flex-shrink: 0; border: none; cursor: pointer;
}
.search-bar-wrap button:hover { transform: scale(1.05); box-shadow: 0 4px 20px rgba(14,165,233,0.4); }
.search-bar-wrap button svg { width: 20px; height: 20px; color: #fff; }

.results-section { background: #f5f5f5; padding: 2rem; min-height: 60vh; }
.results-meta { max-width: 1400px; margin: 0 auto 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.results-meta h2 { font-size: 1.3rem; font-weight: 700; color: #000; }
.results-meta span { font-size: 0.9rem; color: #666; }
.results-section .movies-grid { gap: 1.2rem; }
.results-section .movie-card { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.results-section .movie-card:hover { box-shadow: 0 10px 24px rgba(0,0,0,0.13); }
.results-section .movie-poster { background: #e5e5e5; }
.results-section .quality-badge { font-size: 0.65rem; padding: 2px 7px; border-radius: 3px; }
.results-section .type-badge { background: #3E8AFA; }
.results-section .movie-info { padding: 0.7rem; }
.results-section .movie-title { font-size: 0.85rem; color: #111; margin-bottom: 0.3rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results-section .movie-meta { font-size: 0.78rem; color: #888; }
.results-section .movie-year { color: #888; }
.results-section .movie-rating { gap: 3px; font-weight: 600; }
.results-section .movie-rating svg { width: 12px; height: 12px; }

.state-box { text-align: center; padding: 4rem 1rem; max-width: 1400px; margin: 0 auto; color: #666; }
.state-box .spinner { width: 44px; height: 44px; border-top-color: #1e3a8a; }
.state-box h3 { font-size: 1.1rem; color: #333; margin-bottom: 0.4rem; }
.state-box p { font-size: 0.9rem; }
.state-box .page-title { color: #1a73e8; font-size: 4rem; line-height: 1; margin-bottom: 0.5rem; }

@media (max-width: 768px) {
    .search-page-header { padding: 5rem 1rem 1rem; }
    .search-page-header h1 { font-size: 1.2rem; }
    .results-section { padding: 1.5rem 1rem; }
    .results-section .movies-grid { gap: 0.9rem; }
}
@media (max-width: 480px) {
    .search-bar-wrap { padding: 6px 6px 6px 16px; }
    .search-bar-wrap input { padding: 10px 12px; font-size: 14px; }
    .search-bar-wrap button { width: 42px; height: 42px; }
    .results-section .movies-grid { grid-template-columns: repeat(2, 1fr); }
    .results-meta h2 { font-size: 1rem; }
}

/* =====================================================================
   Details page
   ===================================================================== */
.detail-hero {
    position: relative;
    min-height: 70vh;
    padding: 4.5rem 2rem 3rem;
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
    overflow: hidden;
}
.detail-backdrop { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.2; z-index: 0; }
.detail-content {
    position: relative; z-index: 1; max-width: 1400px; margin: 0 auto;
    display: grid; grid-template-columns: 300px 1fr; gap: 3rem; align-items: start;
}
.detail-poster-container { position: sticky; top: 100px; }
.detail-poster { width: 100%; border-radius: 12px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%); }
.detail-info { padding-top: 1rem; }
.detail-title { font-size: 3rem; font-weight: 700; color: #000000; margin-bottom: 1rem; line-height: 1.2; }
.detail-tagline { font-size: 1.2rem; color: #1a73e8; font-style: italic; margin-bottom: 1.5rem; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 2rem; font-size: 1rem; }
.meta-item { display: flex; align-items: center; gap: 0.5rem; color: #333333; }
.meta-item svg { color: #1a73e8; }
.rating-large { display: flex; align-items: center; gap: 0.5rem; font-size: 1.5rem; font-weight: 700; color: #3E8AFA; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }
.detail-badges .badge { padding: 0.5rem 1rem; background-color: #ffffff; border: 1px solid #ccc; border-radius: 20px; font-size: 0.9rem; color: #666; }
.detail-badges .badge.quality { background-color: #1e3a8a; color: #fff; border-color: #1e3a8a; font-weight: 700; }
.detail-actions { display: flex; gap: 1rem; margin-bottom: 2.5rem; }
.detail-actions .btn-primary {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #3E8AFA 0%, #1e3a8a 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    line-height: 1.6;
}
.detail-actions .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(62, 138, 250, 0.4); color: #fff; }
.watch-dropdown { position: relative; display: inline-block; }
.watch-btn-wrapper { position: relative; }
.watch-dropdown-menu {
    position: absolute; top: calc(100% + 0.5rem); left: 0; min-width: 200px; background-color: #ffffff;
    border: 2px solid #ccc; border-radius: 12px; overflow: hidden; z-index: 100; display: none; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.watch-dropdown-menu.show { display: block; }
.watch-dropdown-item {
    padding: 1rem 1.5rem; color: #000; cursor: pointer; transition: all 0.2s ease; border-bottom: 1px solid #f0f0f0;
    display: flex; align-items: center; gap: 0.75rem; font-weight: 600;
}
.watch-dropdown-item:last-child { border-bottom: none; }
.watch-dropdown-item:hover { background-color: #f5f5f5; color: #1a73e8; }
.watch-dropdown-item svg { width: 16px; height: 16px; }

.episode-selector { display: flex; gap: 1rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.selector-group { position: relative; min-width: 200px; }
.selector-label { display: block; font-size: 0.9rem; color: #666; margin-bottom: 0.5rem; font-weight: 600; }
.selector-btn {
    width: 100%; padding: 0.875rem 1.25rem; background-color: #ffffff; color: #000; border: 2px solid #ccc; border-radius: 8px;
    font-size: 1rem; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: all 0.3s ease;
}
.selector-btn:hover { border-color: #1a73e8; background-color: #f5f5f5; }
.selector-btn.active { border-color: #1a73e8; }
.selector-btn svg { transition: transform 0.3s ease; }
.selector-btn.active svg { transform: rotate(180deg); }
.dropdown-menu {
    position: absolute; top: calc(100% + 0.5rem); left: 0; right: 0; background-color: #ffffff; border: 2px solid #ccc; border-radius: 8px;
    max-height: 300px; overflow-y: auto; z-index: 100; display: none; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.dropdown-menu.show { display: block; }
.dropdown-item { padding: 0.875rem 1.25rem; color: #333; cursor: pointer; transition: all 0.2s ease; border-bottom: 1px solid #f0f0f0; }
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background-color: #f5f5f5; color: #000; }
.dropdown-item.selected { background-color: #1a73e8; color: #fff; font-weight: 700; }
.dropdown-menu::-webkit-scrollbar { width: 8px; }
.dropdown-menu::-webkit-scrollbar-track { background: #ffffff; }
.dropdown-menu::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.dropdown-menu::-webkit-scrollbar-thumb:hover { background: #aaa; }

.detail-overview { margin-bottom: 2.5rem; }
.section-heading { font-size: 1.5rem; font-weight: 700; color: #000000; margin-bottom: 1rem; }
.overview-text { font-size: 1.05rem; line-height: 1.8; color: #333333; }
.detail-genres { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2.5rem; }
.genre-tag {
    display: inline-block; padding: 0.5rem 1.25rem; background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    border: 1px solid #ccc; border-radius: 20px; color: #000; font-size: 0.95rem; transition: all 0.3s ease;
}
.genre-tag:hover { border-color: #1a73e8; transform: translateY(-2px); }
.detail-cast { margin-bottom: 3rem; }
.cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 1.5rem; }
.cast-card { text-align: center; }
.cast-photo { width: 100%; aspect-ratio: 2/3; border-radius: 8px; object-fit: cover; background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%); margin-bottom: 0.75rem; }
.cast-name { font-size: 0.9rem; font-weight: 600; color: #000000; margin-bottom: 0.25rem; }
.cast-character { font-size: 0.85rem; color: #666; }

.detail-extra { background-color: #f5f5f5; padding: 3rem 2rem; }
.extra-container { max-width: 1400px; margin: 0 auto; }
.extra-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-bottom: 3rem; }
.extra-info:empty { display: none; }
.info-item { padding: 1.5rem; background-color: #ffffff; border-radius: 8px; border: 1px solid #e0e0e0; }
.info-label { font-size: 0.9rem; color: #666; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.5px; }
.info-value { font-size: 1.1rem; color: #000000; font-weight: 600; }
.similar-section { margin-top: 3rem; }
.similar-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem; }
.similar-card {
    position: relative; display: block; border-radius: 8px; overflow: hidden; cursor: pointer; transition: transform 0.3s ease;
    background-color: #ffffff; border: 1px solid #e0e0e0;
}
.similar-card:hover { transform: translateY(-5px); }
.similar-poster { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.similar-info { padding: 1rem; }
.similar-title { font-size: 0.95rem; color: #000000; margin-bottom: 0.5rem; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.similar-rating { display: flex; align-items: center; gap: 0.25rem; color: #3E8AFA; font-size: 0.85rem; }
.loading-detail { text-align: center; padding: 5rem 2rem; min-height: 60vh; }

@media (max-width: 1024px) {
    .detail-content { grid-template-columns: 250px 1fr; gap: 2rem; }
    .detail-title { font-size: 2.5rem; }
}
@media (max-width: 768px) {
    .detail-hero { min-height: auto; padding: 4rem 1rem 2rem; }
    .detail-content { grid-template-columns: 1fr; gap: 2rem; }
    .detail-poster-container { position: relative; top: 0; max-width: 300px; margin: 0 auto; }
    .detail-title { font-size: 2rem; }
    .detail-tagline { font-size: 1rem; }
    .detail-meta { gap: 1rem; }
    .detail-actions { flex-direction: column; }
    .detail-actions .btn-primary { width: 100%; justify-content: center; }
    .episode-selector { flex-direction: column; }
    .selector-group { width: 100%; }
    .cast-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 1rem; }
    .similar-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}
@media (max-width: 480px) {
    .detail-title { font-size: 1.75rem; }
    .rating-large { font-size: 1.25rem; }
    .detail-actions .btn-primary { padding: 0.875rem 2rem; font-size: 1rem; }
    .extra-info { grid-template-columns: 1fr; }
}

/* =====================================================================
   Player page
   ===================================================================== */
body.player-page { background-color: #f5f5f5; color: #333; }
.player-container { max-width: 1400px; margin: 0 auto; padding: 6rem 1rem 2rem; }
.player-header { margin-bottom: 1.5rem; }
.back-button {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem; background-color: #ffffff; color: #333;
    border: 1px solid #ddd; border-radius: 8px; text-decoration: none; font-size: 0.95rem; font-weight: 600; transition: all 0.3s ease;
    cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.back-button:hover { background-color: #f0f0f0; border-color: #3498db; }
.player-title { font-size: 1.8rem; font-weight: 700; color: #222; margin: 1rem 0; }
.player-info { display: flex; align-items: center; gap: 1rem; color: #666; font-size: 0.95rem; margin-bottom: 1.5rem; }
.mobile-break { display: none; width: 100%; height: 0; }
.controls-row { display: flex; align-items: flex-start; gap: 1.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.server-selector { display: flex; gap: 0.75rem; flex-wrap: wrap; flex: 1; }
.server-btn {
    padding: 0.75rem 1.5rem; background-color: #ffffff; color: #333; border: 2px solid #ddd; border-radius: 8px; font-size: 0.95rem;
    font-weight: 600; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.server-btn:hover { border-color: #3498db; background-color: #f8f9fa; }
.server-btn.active { background: linear-gradient(135deg, #3498db 0%, #2980b9 100%); color: #fff; border-color: #3498db; }

.episode-controls { display: none; align-items: flex-start; gap: 0.75rem; flex-shrink: 0; }
.episode-controls.visible { display: flex; }
.ep-selector-group { position: relative; }
.ep-selector-btn {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.25rem; background-color: #ffffff; color: #333; border: 2px solid #ddd;
    border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); white-space: nowrap;
}
.ep-selector-btn:hover { border-color: #3498db; background-color: #f8f9fa; }
.ep-selector-btn.open { border-color: #3498db; background-color: #f0f7ff; }
.ep-selector-btn svg { transition: transform 0.3s ease; flex-shrink: 0; }
.ep-selector-btn.open svg { transform: rotate(180deg); }
.ep-dropdown {
    position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px; max-height: 320px; overflow-y: auto; background-color: #ffffff;
    border: 2px solid #ddd; border-radius: 10px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15); z-index: 200; display: none; animation: dropdownSlide 0.2s ease;
}
.ep-dropdown.show { display: block; }
@keyframes dropdownSlide { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.ep-dropdown-item {
    padding: 0.75rem 1.25rem; font-size: 0.9rem; color: #333; cursor: pointer; transition: all 0.15s ease; border-bottom: 1px solid #f0f0f0;
    display: flex; align-items: center; gap: 0.5rem;
}
.ep-dropdown-item:last-child { border-bottom: none; }
.ep-dropdown-item:hover { background-color: #f0f7ff; color: #2980b9; }
.ep-dropdown-item.active { background: linear-gradient(135deg, #3498db 0%, #2980b9 100%); color: #fff; font-weight: 700; }
.ep-dropdown-item .ep-num { font-weight: 700; min-width: 24px; }
.ep-dropdown-item .ep-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-dropdown::-webkit-scrollbar { width: 6px; }
.ep-dropdown::-webkit-scrollbar-track { background: transparent; }
.ep-dropdown::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.ep-dropdown::-webkit-scrollbar-thumb:hover { background: #aaa; }
.ep-loading { padding: 1.5rem; text-align: center; color: #999; font-size: 0.9rem; }
.ep-loading .mini-spinner { border: 3px solid #e0e0e0; border-top: 3px solid #3498db; border-radius: 50%; width: 20px; height: 20px; animation: spin 0.8s linear infinite; margin: 0 auto 0.5rem; }

.player-wrapper {
    position: relative; width: 100%; padding-bottom: 56.25%; background-color: #000; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}
.player-iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.loading-player { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.loading-player .spinner { border-width: 4px; border-top-color: #3498db; width: 50px; height: 50px; }
.player-notice { margin-top: 1.5rem; padding: 1.25rem; background-color: #ffffff; border-left: 4px solid #3498db; border-radius: 8px; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); }
.player-notice h3 { font-size: 1.1rem; color: #e67e22; margin: 0 0 0.5rem 0; }
.player-notice p { font-size: 0.95rem; color: #555; margin: 0; line-height: 1.6; }

@media (max-width: 768px) {
    .player-container { padding: 5rem 0.5rem 1rem; }
    .player-title { font-size: 1.4rem; }
    .player-info { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
    .mobile-break { display: block; }
    .controls-row { flex-direction: column; gap: 1rem; }
    .server-selector { width: 100%; }
    .server-btn { flex: 1 1 auto; min-width: calc(33.333% - 0.5rem); max-width: calc(33.333% - 0.5rem); }
    .episode-controls { width: 100%; }
    .episode-controls .ep-selector-group { flex: 1; }
    .ep-selector-btn { width: 100%; justify-content: space-between; }
    .ep-dropdown { left: 0; right: 0; min-width: unset; }
}

/* =====================================================================
   Inner-page footer
   ===================================================================== */
.footer {
    background: linear-gradient(180deg, #f5f5f5 0%, #ffffff 100%);
    border-top: 1px solid #e0e0e0;
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
}
.footer-container { max-width: 1200px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 1.5fr 2fr; gap: 4rem; margin-bottom: 3rem; padding-bottom: 3rem; border-bottom: 1px solid #e0e0e0; }
.footer-brand { max-width: 350px; }
.footer-logo { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.footer-logo img { height: 50px; width: auto; object-fit: contain; }
.footer-description { color: #666; line-height: 1.8; font-size: 0.95rem; }
.footer .footer-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.footer-column { display: flex; flex-direction: column; }
.footer-title { color: #000000; font-size: 1.1rem; font-weight: 600; margin-bottom: 1.25rem; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-link { color: #666; text-decoration: none; font-size: 0.95rem; transition: all 0.3s ease; display: inline-block; }
.footer-link:hover { color: #3E8AFA; padding-left: 5px; }
.footer-bottom { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; text-align: center; }
.footer-social { display: flex; gap: 1.5rem; }
.social-link {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background-color: #e0e0e0; border-radius: 50%;
    color: #000000; text-decoration: none; transition: all 0.3s ease;
}
.social-link:hover { background-color: #1e3a8a; color: #ffffff; transform: translateY(-3px); }
.footer-copyright { color: #999; font-size: 0.9rem; }
.heart { color: #ff4757; display: inline-block; animation: heartbeat 1.5s ease-in-out infinite; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 25% { transform: scale(1.1); } 50% { transform: scale(1); } }
.footer-extra { display: flex; align-items: center; gap: 1rem; }
.footer-extra-link { color: #999; text-decoration: none; font-size: 0.85rem; transition: color 0.3s ease; }
.footer-extra-link:hover { color: #3E8AFA; }
.separator { color: #ccc; font-size: 0.8rem; }

/* Simple footer (search page) */
.footer.footer-simple { background: #f5f5f5; border-top: 1px solid #e0e0e0; padding: 2rem; margin-top: 0; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.footer-links-row { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer-links-row a { color: #666; font-size: 0.9rem; text-decoration: none; transition: color 0.2s; }
.footer-links-row a:hover { color: #3E8AFA; }
.footer-copy { color: #999; font-size: 0.82rem; }

@media (max-width: 1024px) {
    .footer .footer-links { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
}
@media (max-width: 768px) {
    .nav-container { flex-direction: row; gap: 0; padding: 0 1rem; }
    .hamburger { display: flex; margin-left: auto; }
    .login-btn { display: flex; margin-left: 0.5rem; padding: 8px 14px; font-size: 13px; }
    .login-btn svg { display: none; }
    .nav-menu {
        position: fixed; top: 65px; right: -100%; width: 280px; height: calc(100vh - 65px);
        background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%); flex-direction: column; gap: 0; padding: 2rem 0;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3); transition: right 0.3s ease; overflow-y: auto; z-index: 999;
    }
    .nav-menu.active { right: 0; }
    .nav-menu li { width: 100%; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
    .nav-link { display: block; padding: 1.2rem 2rem; font-size: 1.1rem; transition: all 0.3s ease; }
    .nav-link:hover { background-color: rgba(255, 255, 255, 0.1); padding-left: 2.5rem; }

    .footer { padding: 3rem 1.5rem 1.5rem; margin-top: 3rem; }
    .footer-top { grid-template-columns: 1fr; gap: 2.5rem; margin-bottom: 2rem; padding-bottom: 2rem; }
    .footer-brand { max-width: 100%; }
    .footer .footer-links { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
    .footer-title { font-size: 1rem; margin-bottom: 1rem; }
}
@media (max-width: 480px) {
    .navbar { padding: 0.75rem 0; }
    .nav-menu { width: 100%; top: 57px; height: calc(100vh - 57px); }
    .hamburger { width: 28px; height: 22px; }
    .hamburger-line { height: 2.5px; }

    .footer { padding: 2.5rem 1rem 1rem; }
    .footer .footer-links { grid-template-columns: 1fr; gap: 2rem; }
    .footer-column { text-align: center; }
    .footer-list { align-items: center; }
    .footer-link:hover { padding-left: 0; }
    .footer-social { gap: 1.25rem; }
    .social-link { width: 36px; height: 36px; }
    .footer-copyright { font-size: 0.85rem; }
    .footer-extra { flex-direction: column; gap: 0.5rem; }
    .separator { display: none; }
}

/* =====================================================================
   SEO content blocks, related grids, episode lists, home trending
   ===================================================================== */
.seo-block {
    max-width: 1400px; margin: 2rem auto 0; padding: 1.5rem 2rem; background: #ffffff; border: 1px solid #e0e0e0;
    border-radius: 8px; color: #333; line-height: 1.8;
}
.seo-block h2 { font-size: 1.4rem; font-weight: 700; color: #000; margin-bottom: 0.75rem; line-height: 1.3; }
.seo-block h3 { font-size: 1.1rem; font-weight: 700; color: #000; margin: 1.25rem 0 0.5rem; }
.seo-block h4 { font-size: 0.98rem; font-weight: 600; color: #1e3a8a; margin: 0.75rem 0 0.2rem; }
.seo-block p { font-size: 0.97rem; margin-bottom: 0.9rem; }
.seo-block a { color: #1a73e8; font-weight: 600; }
.seo-block a:hover { text-decoration: underline; }
.details-page .seo-block { margin: 0 0 3rem; }
.listing-intro { max-width: 1400px; margin: -1rem auto 2rem; color: #555; font-size: 0.95rem; line-height: 1.7; }
.related-section { max-width: 1400px; margin: 2.5rem auto 0; }
.related-section .section-heading { margin-bottom: 1rem; }
.episode-list { max-width: 1400px; margin: 2rem auto 0; }
.episode-list .section-heading { margin-bottom: 1rem; }
.episode-list ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.6rem; }
.episode-list a {
    display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.9rem; background: #fff; border: 1px solid #e0e0e0;
    border-radius: 6px; color: #333; font-size: 0.9rem; transition: border-color 0.2s, background 0.2s;
}
.episode-list a:hover { border-color: #3498db; background: #f8fbff; }
.episode-list a.active { border-color: #3498db; background: #f0f7ff; font-weight: 600; }
.episode-list .ep-num { font-weight: 700; color: #1e3a8a; min-width: 34px; }
.episode-list .ep-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.episode-list .ep-date { color: #999; font-size: 0.8rem; white-space: nowrap; }

.home .mw-heading-second { font-size: 20px; font-weight: 600; position: relative; padding-left: 30px; margin: 0 0 15px; color: #fff; line-height: 1.2; }
.home .mw-heading-second:before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #3E8AFA; left: 0; position: absolute; top: 8px; }
.home-trending { margin: 30px 0 10px; }
.home-trending .movies-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.home .seo-content ol { margin: 0 0 1rem; padding-left: 40px; }
.home .seo-content li { margin-bottom: 0.35rem; }
.home .seo-content a { color: #3E8AFA; text-decoration: underline; }

@media (max-width: 768px) {
    .seo-block { padding: 1.25rem 1rem; }
    .seo-block h2 { font-size: 1.2rem; }
    .episode-list ul { grid-template-columns: 1fr; }
    .home-trending .movies-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.75rem; }
}
@media (max-width: 480px) {
    .home-trending .movies-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Search page type toggle */
.search-type-toggle { display: flex; justify-content: center; margin-top: 1rem; }

@media (max-width: 1024px) { .similar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Cast cards are links; actor page */
a.cast-card { display: block; color: inherit; transition: transform 0.25s ease; }
a.cast-card:hover { transform: translateY(-4px); }
a.cast-card:hover .cast-name { color: #1a73e8; }
.person-hero { min-height: auto; padding-bottom: 1rem; }
.person-hero .detail-poster { aspect-ratio: 2/3; object-fit: cover; }
.person-page .detail-tagline { font-style: normal; color: #1e3a8a; font-weight: 600; }
.person-page .known-for-label { align-self: center; color: #666; font-weight: 600; margin-right: 0.25rem; }
.person-page .bio-text { max-height: 12.6em; overflow: hidden; position: relative; }
.person-page .bio-text.expanded { max-height: none; }
.person-page .bio-text:not(.expanded)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3em; background: linear-gradient(rgba(245,245,245,0), #f5f5f5); }
.person-page .bio-toggle { background: none; border: none; color: #1a73e8; font-weight: 600; cursor: pointer; padding: 0.25rem 0; font-size: 0.95rem; }
.person-page .content-section .section-title { font-size: 1.5rem; }

/* Navbar search (all inner pages, desktop + mobile) */
.nav-search {
    display: flex; flex: 1; max-width: 520px; margin: 0 1.5rem; background: #fff; border-radius: 6px; overflow: hidden;
    border: 2px solid #3E8AFA; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); transition: box-shadow 0.2s, border-color 0.2s;
}
.nav-search:focus-within { border-color: #fff; box-shadow: 0 0 0 3px rgba(62, 138, 250, 0.45); }
.nav-search input { flex: 1; min-width: 0; border: none; outline: none; padding: 0.55rem 0.9rem; font-size: 0.9rem; color: #1e293b; font-family: inherit; background: #fff; }
.nav-search input::placeholder { color: #8a93a6; }
.nav-search button { background: #3E8AFA; color: #fff; border: none; padding: 0 0.9rem; cursor: pointer; display: flex; align-items: center; transition: background 0.2s; }
.nav-search button:hover { background: #1e3a8a; }
body.has-page-search .nav-search { display: none; }
@media (max-width: 768px) {
    .nav-search { margin: 0 0.75rem; max-width: none; }
    .nav-search input { padding: 0.5rem 0.7rem; font-size: 0.85rem; }
    .nav-search button { padding: 0 0.7rem; }
    .hamburger { margin-left: 0; }
    body.has-page-search .hamburger { margin-left: auto; }
}

/* =====================================================================
   Card redesign (compact info, rating on poster, hover play)
   ===================================================================== */
.movie-card, .results-section .movie-card {
    display: block; position: relative; background: #ffffff; border: none; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08); transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.movie-card:hover, .results-section .movie-card:hover { transform: translateY(-5px); box-shadow: 0 14px 28px rgba(30, 58, 138, 0.22); }
.poster-wrap { position: relative; overflow: hidden; aspect-ratio: 2/3; background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%); }
.movie-poster, .results-section .movie-poster { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; transition: transform 0.4s ease; }
.movie-card:hover .movie-poster { transform: scale(1.07); }
.card-overlay {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.25s ease;
    background: linear-gradient(to top, rgba(10, 22, 56, 0.9) 0%, rgba(10, 22, 56, 0.25) 50%, rgba(10, 22, 56, 0.05) 100%);
}
.movie-card:hover .card-overlay { opacity: 1; }
.play-icon {
    width: 54px; height: 54px; border-radius: 50%; background: #3E8AFA; color: #fff; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4); transform: scale(0.75); transition: transform 0.25s ease;
}
.play-icon svg { margin-left: 3px; }
.movie-card:hover .play-icon { transform: scale(1); }
.quality-badge, .results-section .quality-badge { top: 8px; right: 8px; font-size: 0.68rem; padding: 3px 8px; border-radius: 6px; line-height: 1.4; box-shadow: 0 2px 6px rgba(0,0,0,0.25); }
.rank-badge { top: 8px; left: 8px; border-radius: 6px; line-height: 1.4; }
.movie-rating, .results-section .movie-rating {
    position: absolute; left: 8px; bottom: 8px; display: flex; align-items: center; gap: 4px; background: rgba(15, 23, 42, 0.82); color: #fff;
    font-size: 0.74rem; font-weight: 700; padding: 3px 9px; border-radius: 20px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.movie-rating svg, .results-section .movie-rating svg { color: #60a5fa; width: 12px; height: 12px; }
.type-badge { display: none; }
.movie-info, .results-section .movie-info { padding: 0.6rem 0.75rem 0.7rem; }
.movie-title, .results-section .movie-title {
    display: block; font-size: 0.9rem; font-weight: 600; color: #111827; line-height: 1.35; margin-bottom: 0.25rem; min-height: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: unset;
}
.movie-card:hover .movie-title { color: #1e3a8a; }
.movie-meta, .results-section .movie-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; color: #6b7280; }
.movie-year, .results-section .movie-year { color: #6b7280; }
.movie-kind { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: #1e3a8a; background: #e8effc; padding: 2px 7px; border-radius: 4px; }
.movies-grid, .results-section .movies-grid { gap: 1.25rem; }
@media (max-width: 768px) {
    .movies-grid, .results-section .movies-grid { gap: 0.9rem; }
    .movie-info, .results-section .movie-info { padding: 0.5rem 0.6rem 0.6rem; }
    .movie-title, .results-section .movie-title { font-size: 0.82rem; }
    .play-icon { width: 44px; height: 44px; }
}

/* =====================================================================
   Responsive player: fits width AND height on every device
   ===================================================================== */
.player-container { max-width: 1600px; }
.player-wrapper {
    position: relative; width: 100%; padding-bottom: 0; aspect-ratio: 16 / 9; min-height: 180px;
    /* never taller than the viewport (landscape phones, small laptops); keeps 16:9 and centres */
    max-width: calc((100vh - 120px) * 16 / 9);
    max-width: calc((100svh - 120px) * 16 / 9);
    margin: 0 auto;
}
@supports not (aspect-ratio: 16 / 9) {
    .player-wrapper { padding-bottom: 56.25%; max-width: none; }
}
.player-iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.server-btn, .ep-selector-btn { min-height: 44px; }           /* comfortable tap targets on touch devices */
@media (min-width: 1900px) {                                   /* TVs and 4K monitors */
    .player-container { max-width: 1800px; }
    .player-title { font-size: 2.2rem; }
    .server-btn, .ep-selector-btn { font-size: 1.1rem; padding: 0.9rem 1.8rem; }
}
@media (max-width: 900px) and (orientation: landscape) {      /* phones held sideways */
    .player-container { padding: 4.5rem 1rem 1rem; }
    .player-wrapper { max-width: calc((100vh - 70px) * 16 / 9); max-width: calc((100svh - 70px) * 16 / 9); }
    .player-header, .player-info { margin-bottom: 0.5rem; }
    .player-title { font-size: 1.2rem; margin: 0.5rem 0; }
    .controls-row { flex-direction: row; gap: 0.75rem; margin-bottom: 0.75rem; }
    .server-btn { flex: 0 1 auto; min-width: auto; max-width: none; padding: 0.55rem 1rem; font-size: 0.85rem; }
}
@media (max-width: 480px) {
    .player-container { padding: 4.5rem 0.5rem 1rem; }
    .player-wrapper { border-radius: 8px; }
    .player-title { font-size: 1.25rem; }
}

/* Watch page: one shared width for every block (header, title, servers, player, notice, article, episodes, related) */
.player-container { max-width: 1400px; padding-left: 2rem; padding-right: 2rem; }
.player-page .seo-block, .player-page .related-section, .player-page .episode-list { max-width: none; margin-left: 0; margin-right: 0; }
.player-wrapper { max-width: none; margin: 0; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 120px); max-height: calc(100svh - 120px); }
@media (min-width: 1900px) { .player-container { max-width: 1600px; } }
@media (max-width: 900px) and (orientation: landscape) { .player-wrapper { max-width: none; max-height: calc(100vh - 70px); max-height: calc(100svh - 70px); } }
@media (max-width: 768px) { .player-container { padding-left: 1rem; padding-right: 1rem; } }
@media (max-width: 480px) { .player-container { padding-left: 0.75rem; padding-right: 0.75rem; } }

/* ShareThis widget spacing */
.share-bar { max-width: 1400px; margin: 1.5rem auto 0.5rem; padding-top: 0.25rem; min-height: 40px; clear: both; }
.detail-info .share-bar { margin: 0 0 2rem; max-width: 640px; }
.player-page .share-bar { margin: 1.5rem 0 0.5rem; max-width: none; }
.results-section .share-bar { margin: 0 auto 1.5rem; }
.home .share-bar { margin: 0 auto 1.5rem; }

/* Season / Episode selectors on the watch page: styled like the active (blue) server button */
.ep-selector-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%); color: #fff; border-color: #3498db;
    box-shadow: 0 2px 8px rgba(41, 128, 185, 0.35);
}
.ep-selector-btn:hover { background: linear-gradient(135deg, #3E8AFA 0%, #1e3a8a 100%); border-color: #1e3a8a; color: #fff; }
.ep-selector-btn.open { background: linear-gradient(135deg, #1e3a8a 0%, #1e3a8a 100%); border-color: #1e3a8a; color: #fff; }
.ep-selector-btn svg { color: #fff; }

/* Season / Episode selectors on TV title pages: same blue as the watch page selectors */
.selector-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%); color: #fff; border-color: #3498db;
    box-shadow: 0 2px 8px rgba(41, 128, 185, 0.35);
}
.selector-btn:hover { background: linear-gradient(135deg, #3E8AFA 0%, #1e3a8a 100%); border-color: #1e3a8a; color: #fff; }
.selector-btn.active { background: linear-gradient(135deg, #1e3a8a 0%, #1e3a8a 100%); border-color: #1e3a8a; color: #fff; }
.selector-btn svg { color: #fff; }
.selector-label { color: #1e3a8a; }
