* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Kulim Park', sans-serif;
    background: #050505;
    color: #ffffff;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    border: none;
    outline: none;
}

/* =========================================================
   HEADER
   ========================================================= */

.header {
    width: 100%;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    background: #090909;
    position: relative;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 26px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
}

.logo span {
    display: block;
    margin-top: 2px;
    color: #888;
    font-size: 11px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.search-btn:hover {
    color: #d4af37;
}

.app-btn {
    padding: 11px 18px;
    background: #d4af37;
    color: #111;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s ease;
}

.app-btn:hover {
    background: #f0cc55;
}

/* =========================================================
   NAVIGATION
   ========================================================= */

.navbar {
    width: 100%;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 38px;
    background: #111;
    border-top: 1px solid #202020;
    border-bottom: 1px solid #202020;
    position: relative;
    z-index: 90;
}

.navbar a {
    color: #bdbdbd;
    font-size: 13px;
    font-weight: 500;
    transition: 0.2s ease;
}

.navbar a:hover {
    color: #fff;
}

/* =========================================================
   HERO
   ========================================================= */

.hero-background {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 620px;
    margin-left: 8%;
    padding-top: 30px;
}

.hero-category {
    color: #d4af37;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
}

.hero-content h2 {
    font-size: 64px;
    line-height: 1;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-details {
    display: flex;
    align-items: center;
    gap: 13px;
    color: #ddd;
    font-size: 14px;
    margin-bottom: 22px;
}

.imdb {
    display: flex;
    align-items: center;
    border: 1px solid #d4af37;
    border-radius: 3px;
    overflow: hidden;
}

.imdb strong {
    background: #f1cf62;
    color: #111;
    padding: 8px 11px;
    font-size: 13px;
}

.imdb>span {
    padding: 8px 11px;
}

.hero-description {
    max-width: 610px;
    color: #ddd;
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 25px;
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.watch-btn,
.download-btn {
    height: 46px;
    min-width: 150px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s ease;
}

.watch-btn {
    background: #d4af37;
    color: #111;
}

.watch-btn:hover {
    background: #f0cc55;
}

.download-btn {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.download-btn:hover {
    border-color: #d4af37;
    color: #d4af37;
}

/* =========================================================
   GENERAL SECTIONS
   ========================================================= */

.section {
    width: 100%;
    padding: 42px 48px 10px;
    background: #050505;
}

.section-title-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.section-title-row h2 {
    font-size: 21px;
    font-weight: 500;
}

/* =========================================================
   VIEW ALL
   ========================================================= */

.view-all {
    padding: 7px 13px;
    color: #d4af37;
    border: 1px solid #d4af37;
    border-radius: 3px;
    font-size: 11px;
}

.view-all:hover {
    background: #d4af37;
    color: #111;
}

/* =========================================================
   TABS
   ========================================================= */

.tabs {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tab {
    padding: 7px 12px;
    background: transparent;
    color: #777;
    border-bottom: 2px solid transparent;
    font-size: 12px;
    cursor: pointer;
}

.tab:hover {
    color: #fff;
}

.tab.active {
    color: #d4af37;
    border-bottom-color: #d4af37;
}

/* =========================================================
   MOVIE ROW
   ========================================================= */

.movie-row {
    width: 100%;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start;
    gap: 14px;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 2px 2px 15px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: auto;
}

.movie-row::-webkit-scrollbar {
    display: none;
}

/* =========================================================
   NORMAL MOVIE CARDS
   ========================================================= */

.movie-card {
    position: relative;
    flex: 0 0 160px !important;
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
    background: transparent;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
}

.movie-card img {
    width: 160px !important;
    height: 230px !important;
    object-fit: cover;
    display: block;
    border-radius: 3px;
    background: #171717;
    user-select: none;
    -webkit-user-drag: none;
}

.movie-card h3 {
    margin-top: 7px;
    color: #eee;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 500;
}

.movie-meta {
    margin-top: 5px;
    color: #777;
    font-size: 10px;
    line-height: 1.3;
}

/* =========================================================
   BADGE
   ========================================================= */

.badge {
    position: absolute;
    top: 7px;
    left: 7px;
    padding: 4px 7px;
    background: #d4af37;
    color: #111;
    border-radius: 3px;
    font-size: 8px;
    font-weight: 500;
    z-index: 2;
}

/* =========================================================
   TRENDING
   ========================================================= */

.trending-section {
    padding-top: 45px;
}

.trending-tabs {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 18px;
}

.trending-tabs button {
    padding: 6px 0;
    background: transparent;
    color: #777;
    border-bottom: 2px solid transparent;
    font-size: 12px;
    cursor: pointer;
}

.trending-tabs button:hover {
    color: #fff;
}

.trending-tabs button.trending-active {
    color: #d4af37;
    border-bottom-color: #d4af37;
}

/* =========================================================
   PAGINATION - NORMAL PAGES
   ========================================================= */

.pagination {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 40px 15px 55px;
    background: #050505;
}

.pagination-number,
.pagination-arrow {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #303030;
    border-radius: 4px;
    background: #171717;
    color: #888;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s ease;
}

.pagination-number:hover,
.pagination-arrow:hover {
    color: #d4af37;
    border-color: #d4af37;
}

.pagination-number.active {
    background: #d4af37;
    border-color: #d4af37;
    color: #111;
    font-weight: 500;
}

/* =========================================================
   PAGINATED CATALOG
   IMPORTANT:
   These !important rules override the inline CSS
   generated inside build_pages.py.
   ========================================================= */

.movie-catalog {
    width: 100% !important;
    padding: 45px 45px 45px !important;
    min-height: auto !important;
    background: #050505 !important;
}

.catalog-header {
    margin-bottom: 24px !important;
}

.catalog-header h1 {
    margin: 0 !important;
    color: #fff;
    font-size: 27px !important;
    line-height: 1.2;
}

.catalog-header p {
    margin-top: 7px !important;
    color: #777;
    font-size: 12px;
}

/* =========================================================
   CATALOG GRID
   ========================================================= */

.catalog-grid {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat( auto-fill, minmax(145px, 1fr)) !important;
    gap: 25px 14px !important;
    align-items: start;
}

/* =========================================================
   CATALOG CARD
   ========================================================= */

.catalog-grid .movie-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: none !important;
    display: block !important;
    background: transparent !important;
    overflow: visible !important;
    text-decoration: none;
}

.catalog-grid .movie-card img {
    width: 100% !important;
    height: 215px !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 3px !important;
    background: #171717 !important;
}

.catalog-grid .movie-card:hover {
    transform: translateY(-5px);
}

.catalog-grid .movie-card h3 {
    margin-top: 6px !important;
    color: #eee !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
}

.catalog-grid .movie-meta {
    margin-top: 4px !important;
    margin-bottom: 0 !important;
    color: #777 !important;
    font-size: 10px !important;
    line-height: 1.3 !important;
}

/* =========================================================
   CATALOG PAGINATION
   ========================================================= */

.catalog-pagination {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
    margin-top: 42px !important;
    padding-bottom: 15px;
}

.catalog-pagination a,
.catalog-pagination span {
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    color: #888 !important;
    background: #171717 !important;
    border: 1px solid #303030 !important;
    font-size: 12px !important;
}

.catalog-pagination a:hover {
    color: #d4af37 !important;
    border-color: #d4af37 !important;
}

.catalog-pagination .pagination-number.active {
    background: #d4af37 !important;
    color: #111 !important;
    border-color: #d4af37 !important;
}

.catalog-pagination .disabled {
    opacity: 0.3;
    cursor: default;
}

.footer {
    width: 100%;
    background: #0b0b0b;
    border-top: 1px solid #1d1d1d;
}

.footer-content {
    width: 100%;
    max-width: 1200px;
    margin: auto;
    padding: 0 45px 40px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
}

.footer-about h2 {
    font-size: 23px;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.footer-about p {
    max-width: 500px;
    color: #777;
    font-size: 12px;
    line-height: 1.7;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-column h3 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 4px;
}

.footer-column a {
    color: #777;
    font-size: 12px;
}

.footer-column a:hover {
    color: #d4af37;
}

.footer-bottom {
    border-top: 1px solid #1d1d1d;
    text-align: center;
    padding: 18px;
    font-size: 12px;
}

/* =========================================================
   BACK TO TOP
   ========================================================= */

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 43px;
    height: 43px;
    border-radius: 50%;
    background: #d4af37;
    color: #111;
    font-size: 20px;
    cursor: pointer;
    z-index: 200;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: 0.2s ease;
}

.back-to-top:hover {
    transform: translateY(-4px);
    background: #f0cc55;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {
    .header {
        padding: 0 28px;
    }
    .navbar {
        gap: 25px;
    }
    .hero-content {
        margin-left: 5%;
    }
    .hero-content h2 {
        font-size: 52px;
    }
    .section {
        padding-left: 28px;
        padding-right: 28px;
    }
    .movie-catalog {
        padding-left: 28px !important;
        padding-right: 28px !important;
    }
    .catalog-grid {
        grid-template-columns: repeat( auto-fill, minmax(140px, 1fr)) !important;
    }
    .catalog-grid .movie-card img {
        height: 205px !important;
    }
    .footer-content {
        padding-left: 28px;
        padding-right: 28px;
        gap: 30px;
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    .header {
        height: 62px;
        padding: 0 15px;
    }
    .logo {
        gap: 7px;
    }
    .logo h1 {
        font-size: 19px;
    }
    .logo span {
        font-size: 8px;
    }
    .header-right {
        gap: 4px;
    }
    .search-btn {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }
    .app-btn {
        padding: 8px 10px;
        font-size: 10px;
    }
    /* NAVIGATION */
    .navbar {
        height: 42px;
        justify-content: flex-start;
        gap: 20px;
        overflow-x: auto;
        padding: 0 15px;
        scrollbar-width: none;
    }
    .navbar::-webkit-scrollbar {
        display: none;
    }
    .navbar a {
        white-space: nowrap;
        font-size: 13px;
    }
    /* HERO */
    .hero {
        min-height: 500px;
        align-items: flex-end;
        background-position: center;
    }
    .hero-content {
        width: 100%;
        margin: 0;
        padding: 0 18px 38px;
    }
    .hero-category {
        font-size: 11px;
        margin-bottom: 7px;
    }
    .hero-content h2 {
        font-size: 40px;
        margin-bottom: 13px;
    }
    .hero-details {
        gap: 8px;
        font-size: 11px;
        margin-bottom: 15px;
    }
    .imdb strong,
    .imdb>span {
        padding: 6px 8px;
        font-size: 10px;
    }
    .hero-description {
        font-size: 11px;
        line-height: 1.5;
        margin-bottom: 18px;
    }
    .hero-buttons {
        gap: 7px;
    }
    .watch-btn,
    .download-btn {
        min-width: 0;
        height: 41px;
        padding: 0 12px;
        font-size: 11px;
    }
    /* SECTIONS */
    .section {
        padding: 35px 15px 10px;
    }
    .section-title-row h2 {
        font-size: 18px;
    }
    /* MOVIE ROW */
    .movie-row {
        gap: 10px;
        width: calc(100vw - 10px);
    }
    .movie-card {
        flex: 0 0 135px !important;
        width: 135px !important;
        min-width: 135px !important;
        max-width: 135px !important;
    }
    .movie-card img {
        width: 135px !important;
        height: 195px !important;
    }
    .movie-card h3 {
        font-size: 11px;
    }
    .movie-meta {
        font-size: 9px;
    }
    /* CATALOG */
    .movie-catalog {
        padding: 30px 15px 35px !important;
    }
    .catalog-header {
        margin-bottom: 18px !important;
    }
    .catalog-header h1 {
        font-size: 21px !important;
    }
    .catalog-header p {
        font-size: 10px;
    }
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px 9px !important;
    }
    .catalog-grid .movie-card img {
        height: 175px !important;
    }
    .catalog-grid .movie-card h3 {
        font-size: 10px !important;
    }
    .catalog-grid .movie-meta {
        font-size: 8px !important;
    }
    /* PAGINATION */
    .pagination-number,
    .pagination-arrow {
        width: 34px;
        height: 34px;
        font-size: 11px;
    }
    .catalog-pagination {
        gap: 5px !important;
        margin-top: 32px !important;
    }
    .catalog-pagination a,
    .catalog-pagination span {
        width: 32px !important;
        height: 32px !important;
        font-size: 10px !important;
    }
    /* FOOTER */
    .footer-content {
        padding: 0 18px 30px;
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .footer-about p {
        font-size: 11px;
    }
    /* BACK TO TOP */
    .back-to-top {
        width: 38px;
        height: 38px;
        right: 15px;
        bottom: 15px;
        font-size: 17px;
    }
}

/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 480px) {
    .header {
        padding: 0 11px;
    }
    .app-btn {
        padding: 7px 8px;
        font-size: 9px;
    }
    .navbar {
        gap: 17px;
    }
    .hero {
        min-height: 470px;
    }
    .hero-content {
        padding: 0 15px 32px;
    }
    .hero-content h2 {
        font-size: 36px;
    }
    .hero-buttons {
        width: 100%;
    }
    .watch-btn,
    .download-btn {
        flex: 1;
        width: 50%;
    }
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px 10px !important;
    }
    .catalog-grid .movie-card img {
        height: 205px !important;
    }
    .catalog-grid .movie-card h3 {
        font-size: 11px !important;
    }
    .movie-card:active {
        transform: translateY(-5px) scale(0.98);
    }
    .pagination-number,
    .pagination-arrow {
        width: 31px;
        height: 31px;
    }
}

/* =========================================================
   CARD TOUCH EFFECT
   ========================================================= */

@media (min-width: 769px) {
    .movie-card:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 768px) {
    .movie-card {
        transition: transform 0.2s ease;
    }
    .movie-card:active {
        transform: translateY(-5px) scale(0.98);
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.search {
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

.app-btn {
    position: relative;
    z-index: 2;
    white-space: nowrap;
    padding: 10px 18px;
}

/* ================================
   HEADER SEARCH + DOWNLOAD BUTTON
   ================================ */

.header-right {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 25px !important;
    white-space: nowrap !important;
}

.search {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    margin-right: 10px !important;
}

.app-btn {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    min-width: 145px !important;
    padding: 12px 20px !important;
    background: #d4af37 !important;
    color: #111 !important;
    border-radius: 5px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    z-index: 5 !important;
}

/* Desktop header spacing */

@media (min-width: 769px) {
    .header {
        padding-left: 45px !important;
        padding-right: 45px !important;
    }
    .header-right {
        gap: 30px !important;
    }
    .search {
        margin-right: 5px !important;
    }
}

/* Mobile */

@media (max-width: 768px) {
    .header-right {
        gap: 10px !important;
    }
    .search {
        font-size: 13px !important;
        margin-right: 3px !important;
    }
    .app-btn {
        min-width: auto !important;
        padding: 9px 12px !important;
        font-size: 10px !important;
    }
}

/* ==========================================
   FINAL HEADER FIX
   Search and Download APP must be separate
   ========================================== */

.header {
    width: 100%;
    min-height: 70px;
    display: flex !important;
    align-items: center !important;
    padding: 0 35px !important;
    gap: 25px !important;
    overflow: visible !important;
}

/* Logo */

.logo {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

/* Navigation */

.navbar {
    flex: 1 1 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 28px !important;
    min-width: 0 !important;
    white-space: nowrap !important;
}

/* SEARCH - this is the correct class */

.search-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 70px !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 5px !important;
    margin: 0 !important;
    background: transparent !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
}

/* DOWNLOAD APP */

.app-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 145px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 18px !important;
    margin: 0 !important;
    background: #d4af37 !important;
    color: #111111 !important;
    border-radius: 5px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    position: relative !important;
    z-index: 10 !important;
}

/* ==========================================
   LAPTOP / DESKTOP
   ========================================== */

@media (min-width: 1000px) {
    .header {
        padding-left: 40px !important;
        padding-right: 40px !important;
        gap: 30px !important;
    }
    .navbar {
        gap: 32px !important;
    }
    .search-btn {
        margin-left: 10px !important;
        margin-right: 5px !important;
    }
    .app-btn {
        margin-left: 0 !important;
    }
}

/* ==========================================
   TABLET
   ========================================== */

@media (max-width: 999px) {
    .header {
        padding: 0 20px !important;
        gap: 15px !important;
    }
    .navbar {
        gap: 18px !important;
    }
    .navbar a {
        font-size: 13px !important;
    }
    .search-btn {
        font-size: 13px !important;
        min-width: 55px !important;
    }
    .app-btn {
        min-width: 120px !important;
        padding: 0 12px !important;
        font-size: 11px !important;
    }
}

/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 700px) {
    .header {
        min-height: 60px !important;
        padding: 0 12px !important;
        gap: 8px !important;
    }
    .logo h1 {
        font-size: 18px !important;
    }
    .logo span {
        font-size: 8px !important;
    }
    .navbar {
        justify-content: flex-start !important;
        gap: 16px !important;
        overflow-x: auto !important;
        scrollbar-width: none !important;
    }
    .navbar::-webkit-scrollbar {
        display: none !important;
    }
    .navbar a {
        font-size: 13px !important;
    }
    .search-btn {
        min-width: 48px !important;
        font-size: 12px !important;
    }
    .app-btn {
        min-width: 105px !important;
        height: 38px !important;
        padding: 0 10px !important;
        font-size: 10px !important;
    }
}