:root {
    --bg: #09090b;
    --bg-soft: #111115;
    --panel: #17171c;
    --panel-high: #202027;
    --red: #e00027;
    --red-dark: #8e0019;
    --yellow: #ffda00;
    --white: #fff;
    --text: #ededf1;
    --muted: #bbbcc5;
    --line: rgba(255, 255, 255, .13);
    --radius: 20px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-width: 320px;
    margin: 0;
    background:
        radial-gradient(circle at 12% -8%, rgba(224, 0, 39, .18), transparent 430px),
        radial-gradient(circle at 90% 8%, rgba(255, 218, 0, .07), transparent 390px),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: var(--yellow);
    text-decoration: none;
}

a:hover {
    color: var(--white);
}

a:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 3px;
}

.best {
    width: min(1220px, calc(100% - 28px));
    margin: 0 auto;
}

.wrap {
    width: 100%;
}

.flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.blurb {
    margin: 26px 0 22px;
    padding: clamp(24px, 4vw, 46px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(224, 0, 39, .16), rgba(23, 23, 28, .96) 52%, rgba(255, 218, 0, .045));
    text-align: center;
}

.blurb h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(2.2rem, 6vw, 5rem);
    line-height: .95;
    letter-spacing: -.065em;
}

.blurb h3 {
    margin: 14px 0 0;
    color: var(--yellow);
    font-size: clamp(.78rem, 1.6vw, 1rem);
    letter-spacing: .14em;
}

.blurb p {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.8vw, 1.15rem);
}

.blurb strong {
    color: var(--white);
}

.content-intro {
    margin: 0 0 28px;
    padding: clamp(22px, 3.6vw, 40px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, var(--panel-high), var(--panel));
}

.content-intro h2 {
    max-width: 820px;
    margin: 0;
    color: var(--yellow);
    font-size: clamp(1.55rem, 2.6vw, 2.35rem);
    line-height: 1.15;
    letter-spacing: -.035em;
}

.content-intro p {
    max-width: 980px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 1.5vw, 1.18rem);
    line-height: 1.78;
}

section.free,
section.best {
    width: 100%;
    margin: 0 0 22px;
}

.col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

section.best .col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

article {
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(155deg, var(--panel-high), var(--panel));
}

.thumb-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #24242b, #0d0d10);
}

.thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: #18181d;
}

.card-cta-wrap {
    position: relative;
    overflow: hidden;
    margin: 14px 18px 0;
    padding: 3px;
    border-radius: 14px;
    background: transparent;
    isolation: isolate;
}

.card-cta-wrap::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: -170%;
    background: conic-gradient(from 0deg, transparent 0 17%, var(--yellow) 24%, #fff 28%, var(--red) 34%, transparent 42% 67%, var(--red) 74%, var(--yellow) 80%, transparent 88%);
    animation: ctaOutlineFlow 3.4s linear infinite;
}

.card-cta-wrap::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 3px;
    border-radius: 11px;
    background: linear-gradient(145deg, #2b2b31, #101012);
}

.card-cta {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    padding: 12px 16px;
    border-radius: 11px;
}

.card-cta span {
    color: var(--white);
    font-size: clamp(.76rem, 1.25vw, .92rem);
    font-weight: 900;
    letter-spacing: .045em;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
}

.card-cta img {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    object-fit: contain;
}

@keyframes ctaOutlineFlow {
    to { transform: rotate(360deg); }
}

article > .wrap {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: clamp(20px, 2.6vw, 30px);
}

.meta {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.meta h2 {
    margin: 0 0 14px;
    color: var(--yellow);
    font-size: clamp(1.55rem, 2.2vw, 2rem);
    line-height: 1.1;
    letter-spacing: -.035em;
}

.meta p {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.08rem, 1.25vw, 1.2rem);
    line-height: 1.72;
}

.meta p + p {
    margin-top: 16px;
}

.card-links {
    margin-top: auto !important;
    padding-top: 20px;
    color: var(--yellow);
    font-weight: 800;
}

.card-links a {
    text-decoration: underline;
    text-decoration-color: rgba(255, 218, 0, .42);
    text-underline-offset: 4px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.tags span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid rgba(224, 0, 39, .32);
    border-radius: 999px;
    background: rgba(224, 0, 39, .08);
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

main > .wrap:last-child {
    margin: 12px 0 32px;
    padding: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
}

main > .wrap:last-child p {
    margin: 0;
    font-size: 1rem;
}

@media (max-width: 980px) {
    section.best .col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .best {
        width: min(100% - 18px, 1220px);
    }

    .col,
    section.best .col {
        grid-template-columns: 1fr;
    }

    .meta p {
        font-size: 1.08rem;
    }

    .card-cta-wrap {
        margin-inline: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .card-cta-wrap::before {
        animation: none;
    }

    .thumb {
        transition: none;
    }
}

/* =========================================================
   MICRO UI, 3D PREVIEWS AND REFINED MOTION
========================================================= */
article {
    position: relative;
    perspective: 1000px;
    transition: transform .28s ease, border-color .28s ease, background .28s ease;
}

article:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 218, 0, .26);
    background: linear-gradient(155deg, #24242c, #17171c);
}

.thumb-wrap {
    margin: 14px 14px 0;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 16px;
    transform: perspective(900px) rotateX(2deg) translateZ(0);
    transform-origin: center bottom;
    box-shadow:
        0 8px 0 -3px #08080a,
        0 15px 28px rgba(0, 0, 0, .42),
        inset 0 1px 0 rgba(255, 255, 255, .1);
    transition: transform .32s ease, border-color .32s ease;
}

article:hover .thumb-wrap {
    transform: perspective(900px) rotateX(0) translateY(-2px);
    border-color: rgba(255, 218, 0, .32);
}

.thumb-wrap::before {
    content: "PREVIEW  •  HD";
    position: absolute;
    z-index: 3;
    top: 10px;
    left: 10px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    background: rgba(9, 9, 11, .78);
    color: #fff;
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1;
    backdrop-filter: blur(7px);
}

.thumb-wrap::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: -35% -70%;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(105deg, transparent 43%, rgba(255, 255, 255, .16) 49%, rgba(255, 218, 0, .1) 52%, transparent 59%);
    transform: translateX(-42%);
    animation: thumbGlassSweep 6.2s ease-in-out infinite;
}

@keyframes thumbGlassSweep {
    0%, 58% { opacity: 0; transform: translateX(-42%); }
    64% { opacity: 1; }
    82% { opacity: 1; transform: translateX(42%); }
    88%, 100% { opacity: 0; transform: translateX(42%); }
}

.card-cta-wrap {
    box-shadow: 0 8px 18px rgba(0, 0, 0, .24);
    transition: transform .2s ease;
}

.card-cta-wrap:hover {
    transform: translateY(-2px);
}

.card-cta::after {
    content: "▶";
    display: inline-grid;
    place-items: center;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    border: 1px solid rgba(255, 255, 255, .23);
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    color: var(--yellow);
    font-size: .68rem;
    line-height: 1;
    animation: playNudge 1.8s ease-in-out infinite;
}

.card-cta img {
    display: none;
}

@keyframes playNudge {
    0%, 100% { transform: translateX(0) scale(1); }
    50% { transform: translateX(3px) scale(1.06); }
}

.card-micro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 11px 20px 0;
}

.card-micro span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 4px 7px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 6px;
    background: rgba(255, 255, 255, .035);
    color: #a9aab3;
    font-size: .61rem;
    font-weight: 900;
    letter-spacing: .075em;
    line-height: 1;
}

.card-micro .online {
    border-color: rgba(85, 238, 136, .2);
    color: #8df7ad;
}

.online i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #55ee88;
    box-shadow: 0 0 0 0 rgba(85, 238, 136, .45);
    animation: onlinePulse 1.55s ease-out infinite;
}

@keyframes onlinePulse {
    0% { box-shadow: 0 0 0 0 rgba(85, 238, 136, .5); opacity: 1; }
    70% { box-shadow: 0 0 0 7px rgba(85, 238, 136, 0); opacity: .72; }
    100% { box-shadow: 0 0 0 0 rgba(85, 238, 136, 0); opacity: 1; }
}

.app-cta {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 12px 14px;
    border: 1px solid rgba(85, 238, 136, .24);
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(85, 238, 136, .09), rgba(255, 255, 255, .025));
    color: #eafcef;
    font-size: .84rem;
    font-weight: 800;
    line-height: 1.25;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.app-cta::before {
    content: "↓";
    grid-row: 1;
    grid-column: 1;
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 8px;
    background: rgba(85, 238, 136, .12);
    color: #8df7ad;
    font-size: 1.05rem;
}

.app-cta span {
    grid-column: 2;
    color: #8df7ad;
    font-size: .58rem;
    font-weight: 950;
    letter-spacing: .08em;
}

.app-cta strong {
    grid-column: 2;
    color: inherit;
    font-size: .88rem;
}

.app-cta:hover {
    border-color: rgba(85, 238, 136, .48);
    background: linear-gradient(145deg, rgba(85, 238, 136, .15), rgba(255, 255, 255, .04));
    color: #fff;
    transform: translateY(-2px);
}

@media (max-width: 700px) {
    article:hover {
        transform: none;
    }

    .thumb-wrap {
        margin-inline: 10px;
    }

    .card-micro {
        margin-inline: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    article,
    .thumb-wrap,
    .card-cta-wrap,
    .app-cta {
        transition: none;
    }

    .thumb-wrap::after,
    .card-cta::after,
    .online i {
        animation: none;
    }
}
