@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --bg: #000000;
    --surface: #0a0a0a;
    --surface-hover: #111111;
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --max-width: 1280px;
    --header-height: 64px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input {
    font: inherit;
    color: inherit;
    border: none;
    outline: none;
    background: none;
}

/* ============================================
   LAYOUT CONTAINER
   ============================================ */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 24px;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 32px;
    }
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.header__logo {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}

.header__logo-img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

/* Desktop Nav */
.header__nav {
    display: none;
    align-items: center;
    gap: 4px;
}

.header__nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition), background var(--transition);
}

.header__nav-link:hover,
.header__nav-link.is-active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

/* Search */
.header__search {
    display: none;
    position: relative;
}

.header__search-input {
    width: 220px;
    padding: 9px 14px 9px 36px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.85rem;
    transition: border-color var(--transition), background var(--transition);
}

.header__search-input::placeholder {
    color: var(--text-muted);
}

.header__search-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
}

.header__search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
    color: var(--text-muted);
}

/* Hamburger */
.header__hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    border-radius: 8px;
    transition: background var(--transition);
}

.header__hamburger:hover {
    background: rgba(255, 255, 255, 0.06);
}

.header__hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

/* Hamburger open state */
.header__hamburger.is-open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.header__hamburger.is-open span:nth-child(2) {
    opacity: 0;
}

.header__hamburger.is-open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.97);
    z-index: 99;
    padding: 24px 16px;
    flex-direction: column;
    gap: 8px;
    animation: slideDown 0.3s ease;
}

.mobile-menu.is-open {
    display: flex;
}

.mobile-menu__link {
    padding: 14px 16px;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 10px;
    transition: color var(--transition), background var(--transition);
}

.mobile-menu__link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.mobile-menu__search {
    margin-top: 8px;
    position: relative;
}

.mobile-menu__search-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.95rem;
}

.mobile-menu__search-input::placeholder {
    color: var(--text-muted);
}

.mobile-menu__search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop breakpoints */
@media (min-width: 768px) {
    .header__search {
        display: block;
    }
}

@media (min-width: 1024px) {
    .header__nav {
        display: flex;
    }

    .header__hamburger {
        display: none;
    }
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main {
    flex: 1;
    padding: 24px 0 40px;
}

/* Section Header */
.section-header {
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}

.section-status {
    display: none;
}

/* ============================================
   POSTS GRID
   ============================================ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 18px;
    }
}

/* ============================================
   POST CARD
   ============================================ */
.post-card {
    border-radius: 1px;
    overflow: hidden;
    background: transparent;
    border: none;
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
}

.post-card:hover {
    transform: scale(1.03);
}

.post-link {
    display: block;
    color: inherit;
}

.post-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #0a0a0a;
    display: block;
    border-radius: 1px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: box-shadow var(--transition);
}

.post-card:hover .post-poster {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7);
}

.post-body {
    padding: 8px 2px 4px;
}

.post-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 767px) {
    .post-title {
        font-size: 0.9rem;
    }
}

.post-meta {
    display: none;
    /* hidden per new design */
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.post-card.skeleton {
    background: var(--surface);
    border-color: var(--border);
    pointer-events: none;
}

.post-card.skeleton .post-poster {
    background: linear-gradient(110deg, #0a0a0a 30%, #151515 50%, #0a0a0a 70%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.post-card.skeleton .skel-title {
    height: 14px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    margin: 10px 12px 6px;
}

.post-card.skeleton .skel-sub {
    height: 10px;
    width: 60%;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    margin: 0 12px 12px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 32px 0 16px;
    flex-wrap: wrap;
}

.pagination__btn {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
    padding: 0 12px;
    user-select: none;
}

.pagination__btn:hover:not(:disabled):not(.is-active) {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text);
}

.pagination__btn.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 0 16px var(--accent-glow);
}

.pagination__btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination__dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 40px;
    color: var(--text-muted);
    font-size: 0.9rem;
    user-select: none;
}

.pagination__btn--nav {
    font-weight: 600;
    gap: 4px;
    padding: 0 16px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 32px 0;
}

.footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.footer__logo {
    display: inline-block;
}

.footer__logo-img {
    height: 28px;
    width: auto;
    object-fit: contain;
    opacity: 0.85;
}

.footer__copyright {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.footer__disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 500px;
    line-height: 1.5;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   UTILITIES
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   POST DETAIL PAGE
   ============================================ */
.post-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 0 48px;
    position: relative;
    overflow: hidden;
    animation: pdFadeIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pdFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Backdrop */
.post-detail__backdrop-bg {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    filter: blur(50px) saturate(1.4);
    -webkit-filter: blur(50px) saturate(1.4);
    transform: scale(1.2);
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
}

.post-detail__backdrop-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(0, 0, 0, 0.15) 0%,
            rgba(0, 0, 0, 0.35) 50%,
            rgba(0, 0, 0, 0.7) 85%,
            rgba(0, 0, 0, 0.9) 100%);
}

/* ---------- Poster ---------- */
.post-detail__poster-wrap {
    width: 220px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    margin-bottom: 28px;
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-detail__poster-wrap:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 20px 56px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 80px rgba(59, 130, 246, 0.1);
}

.post-detail__poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.post-detail__poster-wrap:hover .post-detail__poster {
    transform: scale(1.04);
}

/* ---------- Title ---------- */
.post-detail__title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 16px;
    color: #fff;
    letter-spacing: -0.03em;
    max-width: 700px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

/* ---------- Meta row ---------- */
.post-detail__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.post-detail__meta-item {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    letter-spacing: 0.01em;
}

.post-detail__sep {
    display: none;
    /* pills replace pipe separators */
}

/* ---------- Overview ---------- */
.post-detail__overview {
    max-width: 640px;
    font-size: 0.92rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 auto 32px;
    padding: 0 16px;
}

/* ---------- Trailer Button ---------- */
.post-detail__trailer-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 32px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    margin-bottom: 36px;
    box-shadow:
        0 4px 24px rgba(59, 130, 246, 0.35),
        0 0 0 0 rgba(59, 130, 246, 0);
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.post-detail__trailer-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent 60%);
    border-radius: inherit;
    pointer-events: none;
}

.post-detail__trailer-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow:
        0 8px 36px rgba(59, 130, 246, 0.5),
        0 0 0 3px rgba(59, 130, 246, 0.15);
}

.post-detail__trailer-btn:active {
    transform: translateY(0) scale(0.98);
}

.post-detail__trailer-btn svg {
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* ---------- Download Section ---------- */
.download-section {
    width: 100%;
    max-width: 700px;
    padding: 28px 28px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dl-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dl-heading {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--accent);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dl-heading::before {
    content: '';
    width: 3px;
    height: 1.1em;
    background: var(--accent);
    border-radius: 2px;
}

.dl-buttons-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dl-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text);
    font-weight: 600;
    transition: all 0.25s ease;
    font-size: 0.88rem;
}

.dl-btn:hover {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.dl-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.dl-select {
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-radius: 10px;
    font-size: 0.88rem;
    outline: none;
    min-width: 120px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.dl-select:focus {
    border-color: var(--accent);
}

.dl-action-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    padding: 10px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    transition: all 0.25s ease;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.25);
}

.dl-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4);
}

.dl-action-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

/* ============================================
   TRAILER MODAL
   ============================================ */
.trailer-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: tmFadeIn 0.3s ease;
}

@keyframes tmFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.trailer-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.trailer-modal__content {
    position: relative;
    width: 90%;
    max-width: 920px;
    z-index: 1;
    animation: tmSlideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes tmSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.trailer-modal__close {
    position: absolute;
    top: -48px;
    right: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.trailer-modal__close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

.trailer-modal__player {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.trailer-modal__player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================================
   MOBILE RESPONSIVE — POST DETAIL
   ============================================ */
@media (max-width: 768px) {
    .post-detail {
        padding: 20px 0 36px;
    }

    .post-detail__poster-wrap {
        width: 160px;
        border-radius: 10px;
        margin-bottom: 20px;
    }

    .post-detail__title {
        font-size: 1.35rem;
        margin-bottom: 12px;
        padding: 0 12px;
    }

    .post-detail__meta {
        gap: 6px;
        margin-bottom: 18px;
    }

    .post-detail__meta-item {
        font-size: 0.78rem;
        padding: 4px 10px;
    }

    .post-detail__overview {
        font-size: 0.85rem;
        margin-bottom: 24px;
    }

    .post-detail__trailer-btn {
        padding: 11px 24px;
        font-size: 0.85rem;
        margin-bottom: 28px;
    }

    .download-section {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .dl-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .dl-btn {
        width: 100%;
        justify-content: center;
    }

    .trailer-modal__content {
        width: 95%;
    }

    .trailer-modal__close {
        top: -42px;
    }
}

@media (max-width: 480px) {
    .post-detail__poster-wrap {
        width: 140px;
    }

    .post-detail__title {
        font-size: 1.15rem;
    }

    .post-detail__meta-item {
        font-size: 0.72rem;
        padding: 3px 8px;
    }
}