/* ===================================================
   MISide — Trailers Page CSS
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800;900&family=Share+Tech+Mono&display=swap');

:root {
    --pink: #ff6b9d;
    --pink-light: #ffb3d1;
    --pink-deep: #c0175c;
    --purple: #7c3aed;
    --purple-light: #a78bfa;
    --dark: #060410;
    --dark-2: #0d0820;
    --dark-3: #160e2e;
    --border: rgba(255, 107, 157, 0.15);
    --border-hi: rgba(255, 107, 157, 0.38);
    --text: #ede6ff;
    --muted: #8a7aaa;
    --mono: 'Share Tech Mono', monospace;
    --sans: 'Outfit', sans-serif;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    background: var(--dark);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Grain */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: .045;
    pointer-events: none;
    z-index: 9000;
    animation: grainShift .18s steps(1) infinite;
}

@keyframes grainShift {
    0% {
        transform: translate(0, 0);
    }

    20% {
        transform: translate(-2%, -2%);
    }

    40% {
        transform: translate(2%, 2%);
    }

    60% {
        transform: translate(-1%, 2%);
    }

    80% {
        transform: translate(1%, -1%);
    }
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--pink-deep), var(--purple));
    border-radius: 3px;
}

/* ── NAVBAR ── */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    padding: 1rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all .4s var(--ease);
}

#navbar.scrolled {
    background: rgba(6, 4, 16, .88);
    backdrop-filter: blur(22px);
    box-shadow: 0 1px 0 var(--border);
    padding: .7rem 2.5rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: .7rem;
}

.nav-logo img {
    height: 32px;
    filter: drop-shadow(0 0 8px var(--pink));
}

.nav-logo span {
    font-size: .95rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--pink), var(--purple-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-back {
    font-family: var(--mono);
    font-size: .7rem;
    letter-spacing: .18em;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: .5rem;
    transition: color .25s;
}

.nav-back:hover {
    color: var(--pink-light);
}

.nav-back svg {
    width: 14px;
}

/* ── PAGE HERO ── */
#page-hero {
    position: relative;
    padding: 8rem 2rem 5rem;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: -5%;
    background: url('../assets/Cover/Hero.jpg') center/cover no-repeat;
    filter: brightness(.14) saturate(2) blur(3px);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, var(--dark) 0%, transparent 25%, transparent 70%, var(--dark) 100%),
        radial-gradient(ellipse 80% 60% at 50% 50%, rgba(192, 23, 92, .18) 0%, transparent 70%);
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.page-label {
    font-family: var(--mono);
    font-size: .68rem;
    letter-spacing: .3em;
    color: var(--pink);
    opacity: .8;
    display: block;
    margin-bottom: .8rem;
}

.page-title {
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.03em;
    background: linear-gradient(120deg, #fff 40%, var(--pink-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 40px rgba(255, 107, 157, .4));
    margin-bottom: 1rem;
}

.page-sub {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 300;
    max-width: 480px;
    margin: 0 auto 2.5rem;
}

/* ── FEATURED PLAYER ── */
#featured {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
    position: relative;
    z-index: 1;
}

.featured-wrap {
    border-radius: 22px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-hi);
    box-shadow: 0 40px 120px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 107, 157, .06), 0 0 80px rgba(192, 23, 92, .1);
}

/* Corner accents */
.featured-wrap::before,
.featured-wrap::after {
    content: '';
    position: absolute;
    z-index: 3;
    pointer-events: none;
    width: 60px;
    height: 60px;
    border-color: var(--pink);
    border-style: solid;
    opacity: .7;
}

.featured-wrap::before {
    top: 0;
    left: 0;
    border-width: 2px 0 0 2px;
    border-radius: 22px 0 0 0;
}

.featured-wrap::after {
    bottom: 0;
    right: 0;
    border-width: 0 2px 2px 0;
    border-radius: 0 0 22px 0;
}

/* Video element */
#featured-video {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
    background: #000;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

/* Custom play overlay */
.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(6, 4, 16, .55);
    backdrop-filter: blur(2px);
    transition: opacity .3s;
    cursor: pointer;
}

.play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink-deep), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    padding-left: 6px;
    box-shadow: 0 0 60px rgba(192, 23, 92, .6), inset 0 2px 0 rgba(255, 255, 255, .15);
    transition: transform .25s, box-shadow .25s;
    margin-bottom: 1.2rem;
}

.play-overlay:hover .play-circle {
    transform: scale(1.12);
    box-shadow: 0 0 90px rgba(192, 23, 92, .8), inset 0 2px 0 rgba(255, 255, 255, .15);
}

.play-feat-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 20px rgba(0, 0, 0, .8);
    margin-bottom: .3rem;
}

.play-feat-meta {
    font-family: var(--mono);
    font-size: .65rem;
    letter-spacing: .18em;
    color: var(--pink-light);
    opacity: .75;
}

/* Info bar below video */
.featured-info {
    background: var(--dark-2);
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--border);
}

.feat-title-text {
    font-size: 1rem;
    font-weight: 700;
}

.feat-meta-text {
    font-family: var(--mono);
    font-size: .65rem;
    letter-spacing: .1em;
    color: var(--muted);
    margin-top: .2rem;
}

.feat-tag {
    font-family: var(--mono);
    font-size: .6rem;
    letter-spacing: .15em;
    padding: .3rem .9rem;
    border-radius: 50px;
    flex-shrink: 0;
    background: rgba(255, 107, 157, .08);
    border: 1px solid var(--border-hi);
    color: var(--pink-light);
}

/* ── GRID SECTION ── */
#trailers-section {
    padding: 3rem 2rem 6rem;
}

.section-label {
    font-family: var(--mono);
    font-size: .68rem;
    letter-spacing: .28em;
    color: var(--pink);
    opacity: .7;
    display: block;
    max-width: 1100px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    gap: .8rem;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.trailers-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
}

/* Trailer card */
.trailer-card {
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background: var(--dark-2);
    border: 1px solid var(--border);
    transition: border-color .3s, box-shadow .3s, transform .4s var(--ease);
    position: relative;
}

.trailer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 3;
    background: linear-gradient(90deg, var(--purple), var(--pink), var(--purple));
    opacity: 0;
    transition: opacity .3s;
    box-shadow: 0 0 14px var(--pink);
}

.trailer-card:hover {
    border-color: var(--border-hi);
    box-shadow: 0 20px 60px rgba(192, 23, 92, .2);
    transform: translateY(-6px);
}

.trailer-card:hover::before {
    opacity: 1;
}

.trailer-card.active {
    border-color: rgba(255, 107, 157, .5);
    box-shadow: 0 0 30px rgba(192, 23, 92, .15);
}

.trailer-card.active::before {
    opacity: 1;
}

/* Thumbnail */
.card-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
}

.card-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease), filter .4s;
    filter: saturate(.85) brightness(.85);
    pointer-events: none;
}

.trailer-card:hover .card-thumb video {
    transform: scale(1.05);
    filter: saturate(1.1) brightness(.95);
}

/* Thumbnail fallback (poster image) */
.card-thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease), filter .4s;
    filter: saturate(.85) brightness(.75);
}

.trailer-card:hover .card-thumb-img {
    transform: scale(1.05);
    filter: saturate(1.1) brightness(.92);
}

/* Play icon on card */
.card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 4, 16, .25);
    transition: background .3s;
}

.trailer-card:hover .card-play {
    background: rgba(6, 4, 16, .15);
}

.card-play-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(192, 23, 92, .75);
    border: 2px solid rgba(255, 107, 157, .4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    padding-left: 5px;
    box-shadow: 0 0 30px rgba(192, 23, 92, .5);
    transform: scale(.85);
    transition: transform .3s var(--ease), box-shadow .3s;
}

.trailer-card:hover .card-play-icon {
    transform: scale(1);
    box-shadow: 0 0 50px rgba(192, 23, 92, .7);
}

/* Duration badge */
.card-dur {
    position: absolute;
    bottom: .6rem;
    right: .7rem;
    font-family: var(--mono);
    font-size: .6rem;
    letter-spacing: .1em;
    background: rgba(6, 4, 16, .8);
    color: var(--text);
    padding: .2rem .55rem;
    border-radius: 4px;
    backdrop-filter: blur(6px);
    z-index: 2;
}

/* HUD number */
.card-num {
    position: absolute;
    top: .7rem;
    left: .8rem;
    font-family: var(--mono);
    font-size: .62rem;
    letter-spacing: .18em;
    color: var(--pink-light);
    opacity: .8;
    z-index: 2;
}

/* Card info */
.card-info {
    padding: .9rem 1rem 1rem;
}

.card-title {
    font-size: .9rem;
    font-weight: 700;
    margin-bottom: .25rem;
    line-height: 1.3;
}

.card-meta {
    font-family: var(--mono);
    font-size: .62rem;
    letter-spacing: .1em;
    color: var(--muted);
}

.card-desc {
    font-size: .8rem;
    color: rgba(138, 122, 170, .75);
    margin-top: .5rem;
    line-height: 1.6;
}

/* Active card indicator */
.card-active-bar {
    height: 2px;
    background: linear-gradient(90deg, var(--pink), var(--purple));
    transform: scaleX(0);
    transition: transform .35s var(--ease);
    transform-origin: left;
}

.trailer-card.active .card-active-bar {
    transform: scaleX(1);
}

/* ── FOOTER ── */
#footer {
    background: var(--dark-2);
    padding: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-text {
    font-family: var(--mono);
    font-size: .65rem;
    letter-spacing: .15em;
    color: var(--muted);
}

.footer-text a {
    color: var(--pink-light);
    transition: color .2s;
}

.footer-text a:hover {
    color: var(--pink);
}

/* Reveal */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media(max-width:700px) {
    .trailers-grid {
        grid-template-columns: 1fr;
    }

    #featured {
        padding: 0 1rem 2rem;
    }

    .featured-info {
        flex-direction: column;
        align-items: flex-start;
    }
}