:root {
    --mndf-bg: #07070b;
    --mndf-card: rgba(255,255,255,.075);
    --mndf-card-strong: rgba(255,255,255,.12);
    --mndf-line: rgba(255,255,255,.16);
    --mndf-text: #ffffff;
    --mndf-muted: rgba(255,255,255,.68);
    --mndf-gold: #f8d36b;
    --mndf-pink: #ff4fd8;
    --mndf-blue: #55d6ff;
}

.mndf-wrap {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(42px, 6vw, 86px) clamp(16px, 3vw, 34px);
    border-radius: 34px;
    background:
        radial-gradient(circle at 18% 12%, rgba(248,211,107,.20), transparent 28%),
        radial-gradient(circle at 84% 18%, rgba(85,214,255,.17), transparent 30%),
        radial-gradient(circle at 52% 100%, rgba(255,79,216,.14), transparent 32%),
        linear-gradient(135deg, #07070b 0%, #12121c 55%, #090912 100%);
    color: var(--mndf-text);
    box-shadow: 0 25px 80px rgba(0,0,0,.42);
}

.mndf-wrap * {
    box-sizing: border-box;
}

.mndf-ambient {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    filter: blur(44px);
    opacity: .25;
    pointer-events: none;
    z-index: -1;
    animation: mndfFloat 9s ease-in-out infinite alternate;
}

.mndf-ambient-one {
    left: -120px;
    top: 18%;
    background: var(--mndf-pink);
}

.mndf-ambient-two {
    right: -130px;
    bottom: 0;
    background: var(--mndf-blue);
    animation-delay: -3s;
}

@keyframes mndfFloat {
    from { transform: translate3d(0,0,0) scale(1); }
    to { transform: translate3d(36px,-28px,0) scale(1.16); }
}

.mndf-head {
    max-width: 880px;
    margin: 0 auto 24px;
    text-align: center;
}

.mndf-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 14px;
    border: 1px solid rgba(248,211,107,.36);
    border-radius: 999px;
    background: rgba(248,211,107,.10);
    color: var(--mndf-gold);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.mndf-kicker::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mndf-gold);
    box-shadow: 0 0 18px var(--mndf-gold);
}

.mndf-head h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(34px, 6vw, 76px);
    line-height: .92;
    letter-spacing: -.055em;
    font-weight: 950;
    text-transform: uppercase;
    text-shadow: 0 12px 34px rgba(0,0,0,.36);
}

.mndf-head p {
    max-width: 620px;
    margin: 16px auto 0;
    color: var(--mndf-muted);
    font-size: clamp(15px, 2vw, 19px);
    line-height: 1.55;
}

.mndf-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 auto 30px;
}

.mndf-filter {
    border: 1px solid var(--mndf-line);
    color: #fff;
    background: rgba(255,255,255,.07);
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 800;
    cursor: pointer;
    backdrop-filter: blur(14px);
    transition: transform .25s ease, background .25s ease, border-color .25s ease;
}

.mndf-filter:hover,
.mndf-filter.is-active {
    transform: translateY(-2px);
    border-color: rgba(248,211,107,.55);
    background: rgba(248,211,107,.16);
}

.mndf-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(14px, 2vw, 24px);
    max-width: 1240px;
    margin: 0 auto;
    perspective: 1200px;
}

.mndf-card {
    grid-column: span 4;
    min-height: 430px;
    cursor: pointer;
    outline: none;
    transform: translateY(26px) scale(.985);
    opacity: 0;
    transition: opacity .65s ease, transform .65s cubic-bezier(.2,.82,.2,1), filter .3s ease;
}

.mndf-card.is-visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.mndf-card.is-hidden {
    display: none;
}

.mndf-card-inner {
    position: relative;
    height: 100%;
    min-height: 430px;
    overflow: hidden;
    border-radius: 28px;
    background: var(--mndf-card);
    border: 1px solid var(--mndf-line);
    box-shadow: 0 20px 55px rgba(0,0,0,.35);
    transform-style: preserve-3d;
    transform:
        rotateX(var(--rx, 0deg))
        rotateY(var(--ry, 0deg))
        translateZ(0);
    transition: transform .18s ease, border-color .28s ease, box-shadow .28s ease;
    backdrop-filter: blur(18px);
}

.mndf-card:hover .mndf-card-inner,
.mndf-card:focus .mndf-card-inner {
    border-color: rgba(248,211,107,.45);
    box-shadow: 0 32px 90px rgba(0,0,0,.48), 0 0 0 1px rgba(248,211,107,.13) inset;
}

.mndf-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(248,211,107,.18), rgba(255,79,216,.13), rgba(85,214,255,.16));
}

.mndf-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.06) contrast(1.03);
    transition: transform .7s cubic-bezier(.2,.82,.2,1), filter .45s ease;
}

.mndf-card:hover .mndf-media img {
    transform: scale(1.13);
    filter: saturate(1.24) contrast(1.08);
}

.mndf-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(0,0,0,.05) 0%, rgba(0,0,0,.18) 36%, rgba(0,0,0,.86) 100%),
        radial-gradient(circle at var(--mx, 50%) var(--my, 35%), rgba(255,255,255,.26), transparent 25%);
    mix-blend-mode: normal;
}

.mndf-placeholder {
    display: grid;
    place-items: center;
    height: 100%;
    color: rgba(255,255,255,.78);
    font-size: 34px;
    font-weight: 950;
    letter-spacing: -.04em;
}

.mndf-shine {
    position: absolute;
    inset: -80% -120%;
    background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.26) 50%, transparent 64%);
    transform: translateX(-35%) rotate(8deg);
    opacity: 0;
    pointer-events: none;
}

.mndf-card:hover .mndf-shine {
    opacity: 1;
    animation: mndfShine .85s ease forwards;
}

@keyframes mndfShine {
    to { transform: translateX(35%) rotate(8deg); }
}

.mndf-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px;
    z-index: 2;
    transform: translateZ(40px);
}

.mndf-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    color: rgba(255,255,255,.78);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mndf-meta span {
    max-width: 70%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mndf-content h3 {
    margin: 0;
    color: #fff;
    font-size: clamp(22px, 2.4vw, 34px);
    line-height: 1;
    letter-spacing: -.04em;
    font-weight: 950;
    text-shadow: 0 6px 24px rgba(0,0,0,.48);
}

.mndf-content p {
    margin: 12px 0 0;
    color: rgba(255,255,255,.75);
    line-height: 1.5;
    font-size: 14px;
}

.mndf-play {
    position: absolute;
    left: 24px;
    top: 24px;
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.26);
    backdrop-filter: blur(16px);
    z-index: 3;
    box-shadow: 0 18px 40px rgba(0,0,0,.28);
}

.mndf-play::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: inherit;
    border: 1px solid rgba(255,255,255,.16);
    animation: mndfPulse 1.6s ease-in-out infinite;
}

.mndf-play span {
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 17px solid #fff;
    margin-left: 4px;
}

@keyframes mndfPulse {
    0%, 100% { transform: scale(.95); opacity: .45; }
    50% { transform: scale(1.18); opacity: .12; }
}

.mndf-empty {
    max-width: 760px;
    margin: 0 auto;
    padding: 26px;
    text-align: center;
    border: 1px dashed rgba(255,255,255,.22);
    border-radius: 24px;
    background: rgba(255,255,255,.08);
}

.mndf-empty strong,
.mndf-empty span {
    display: block;
}

.mndf-empty span {
    color: var(--mndf-muted);
    margin-top: 7px;
}

.mndf-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    place-items: center;
    padding: 22px;
    background: rgba(0,0,0,.78);
    backdrop-filter: blur(18px);
}

.mndf-modal.is-open {
    display: grid;
    animation: mndfFade .24s ease both;
}

@keyframes mndfFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mndf-modal-box {
    width: min(1120px, 96vw);
    max-height: 92vh;
    overflow: hidden;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(22,22,34,.96), rgba(8,8,13,.96));
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 40px 140px rgba(0,0,0,.68);
    animation: mndfZoom .28s cubic-bezier(.2,.82,.2,1) both;
}

@keyframes mndfZoom {
    from { transform: translateY(20px) scale(.96); opacity: .4; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.mndf-modal-media {
    background: #000;
    display: grid;
    place-items: center;
    max-height: 72vh;
}

.mndf-modal-media img,
.mndf-modal-media video,
.mndf-modal-media iframe {
    display: block;
    width: 100%;
    max-height: 72vh;
    border: 0;
}

.mndf-modal-media img {
    object-fit: contain;
}

.mndf-modal-media iframe {
    aspect-ratio: 16 / 9;
    height: auto;
}

.mndf-modal-text {
    padding: 22px 26px 26px;
}

.mndf-modal-text span {
    display: block;
    color: var(--mndf-gold);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: .13em;
    margin-bottom: 8px;
}

.mndf-modal-text h3 {
    margin: 0;
    color: #fff;
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1;
    letter-spacing: -.04em;
}

.mndf-modal-text p {
    margin: 12px 0 0;
    color: rgba(255,255,255,.72);
    line-height: 1.55;
}

.mndf-modal-close {
    position: fixed;
    right: 22px;
    top: 18px;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 34px;
    line-height: 42px;
    cursor: pointer;
    z-index: 2;
    backdrop-filter: blur(12px);
    transition: transform .2s ease, background .2s ease;
}

.mndf-modal-close:hover {
    transform: rotate(90deg) scale(1.04);
    background: rgba(255,255,255,.20);
}

@media (max-width: 1024px) {
    .mndf-card {
        grid-column: span 6;
    }
}

@media (max-width: 680px) {
    .mndf-wrap {
        border-radius: 24px;
        padding: 36px 12px;
    }

    .mndf-grid {
        gap: 16px;
    }

    .mndf-card {
        grid-column: span 12;
        min-height: 390px;
    }

    .mndf-card-inner {
        min-height: 390px;
        border-radius: 24px;
    }

    .mndf-content {
        padding: 20px;
    }

    .mndf-modal {
        padding: 10px;
    }

    .mndf-modal-close {
        right: 12px;
        top: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mndf-wrap *,
    .mndf-wrap *::before,
    .mndf-wrap *::after {
        animation: none !important;
        transition: none !important;
    }

    .mndf-card,
    .mndf-card.is-visible {
        opacity: 1;
        transform: none;
    }
}
