.replay-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    overflow: hidden;
    padding: clamp(32px, 5vw, 72px) 0 96px;
    background:
        radial-gradient(
            circle at 72% 16%,
            rgba(104, 194, 183, .10),
            transparent 32%
        ),
        radial-gradient(
            circle at 15% 52%,
            rgba(203, 169, 93, .07),
            transparent 28%
        ),
        #071416;
    color: #edf6f4;
}

.replay-page__ambient {
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: .42;
    pointer-events: none;
    background-image:
        linear-gradient(
            rgba(255,255,255,.018) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,.018) 1px,
            transparent 1px
        );
    background-size: 48px 48px;
    mask-image:
        linear-gradient(
            to bottom,
            #000,
            transparent 82%
        );
}

.replay-page__inner {
    width: min(1420px, calc(100% - 48px));
    margin: 0 auto;
}

.replay-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: clamp(36px, 5vw, 70px);
    color: rgba(230, 242, 240, .48);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.replay-breadcrumbs a {
    color: inherit;
    text-decoration: none;
    transition:
        color 180ms ease;
}

.replay-breadcrumbs a:hover {
    color: #eef9f6;
}

.replay-breadcrumbs strong {
    color: rgba(230, 242, 240, .78);
    font-weight: 500;
}

.replay-hero {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;
    align-items: end;
    gap: 40px;
    margin-bottom: clamp(36px, 5vw, 68px);
}

.replay-eyebrow {
    display: block;
    margin-bottom: 16px;
    color: #7ed4c7;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .22em;
}

.replay-hero h1 {
    max-width: 1000px;
    margin: 0;
    font-size:
        clamp(54px, 8vw, 124px);
    line-height: .87;
    letter-spacing: -.065em;
    font-weight: 650;
}

.replay-hero__copy p {
    max-width: 720px;
    margin: 28px 0 0;
    color: rgba(229, 241, 239, .62);
    font-size: clamp(16px, 1.7vw, 22px);
    line-height: 1.55;
}

.replay-hero__result {
    min-width: 210px;
    padding: 22px 0 8px 36px;
    border-left:
        1px solid rgba(255,255,255,.12);
}

.replay-hero__result small,
.replay-hero__result span {
    display: block;
    color: rgba(230, 242, 240, .47);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .16em;
}

.replay-hero__result strong {
    display: block;
    margin: 5px 0;
    color: #d7b96c;
    font-size: clamp(48px, 5vw, 76px);
    line-height: 1;
    letter-spacing: -.045em;
    font-weight: 620;
}


/* stage */

.replay-stage {
    position: relative;
    border:
        1px solid rgba(255,255,255,.10);
    border-radius: 28px;
    overflow: hidden;
    background:
        linear-gradient(
            145deg,
            rgba(18, 45, 46, .94),
            rgba(5, 17, 18, .98)
        );
    box-shadow:
        0 40px 100px rgba(0,0,0,.38);
}

.replay-stage__topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 66px;
    padding: 0 24px;
    border-bottom:
        1px solid rgba(255,255,255,.08);
}

.replay-stage__topbar > div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.replay-stage__topbar small {
    color: rgba(235,245,243,.66);
    font-size: 10px;
    letter-spacing: .21em;
}

.replay-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #75d4c5;
    box-shadow:
        0 0 0 6px rgba(117,212,197,.08),
        0 0 22px rgba(117,212,197,.55);
}

.replay-stage__meta {
    display: flex;
    align-items: center;
    gap: 26px;
}

.replay-stage__meta span {
    color: rgba(228,241,238,.40);
    font-size: 11px;
}

.replay-stage__meta b {
    margin-left: 6px;
    color: rgba(238,249,246,.86);
    font-weight: 500;
}

.replay-screen {
    position: relative;
    padding: clamp(12px, 2vw, 22px);
}

.replay-player.game-player {
    width: 100%;
    max-width: none;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.replay-player__header,
.replay-player__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 48px;
    padding: 0 4px;
    color: rgba(231,242,240,.54);
    font-size: 11px;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.replay-player__header b {
    color: #d8bd75;
    font-weight: 600;
}

.replay-player__footer {
    min-height: 52px;
}

.replay-canvas-frame {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border:
        1px solid rgba(255,255,255,.08);
    background: #081112;
}

.replay-canvas-frame canvas,
.replay-player canvas {
    display: block;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 10;
    max-height: min(72vh, 820px);
    object-fit: contain;
    background: #081112;
}

.replay-canvas-glow {
    position: absolute;
    pointer-events: none;
    inset: 0;
    border-radius: inherit;
    box-shadow:
        inset 0 0 80px rgba(0,0,0,.24);
}


/* injected replay-carousel controls */

.replay-player .replay-controls {
    display: grid;
    grid-template-columns:
        44px
        44px
        44px
        minmax(120px, 1fr)
        auto
        44px
        auto
        44px;
    align-items: center;
    gap: 8px;
    padding: 15px 4px 3px;
}

.replay-player .replay-controls button,
.replay-player .replay-controls select {
    height: 42px;
    border:
        1px solid rgba(255,255,255,.10);
    border-radius: 12px;
    background:
        rgba(255,255,255,.045);
    color: #eaf5f3;
    cursor: pointer;
}

.replay-player .replay-controls button:hover,
.replay-player .replay-controls select:hover {
    border-color:
        rgba(120, 214, 200, .42);
    background:
        rgba(120, 214, 200, .08);
}

.replay-player .replay-controls input[type="range"] {
    width: 100%;
    accent-color: #77cfc2;
}

.replay-player .replay-controls time {
    min-width: 106px;
    color: rgba(235,245,243,.72);
    text-align: center;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}


/* empty state */

.replay-empty {
    display: none;
    min-height: 460px;
    place-items: center;
    align-content: center;
    padding: 60px 20px;
    text-align: center;
    color: rgba(235,245,243,.54);
}

.replay-stage.is-empty .replay-empty {
    display: grid;
}

.replay-stage.is-empty .replay-player {
    display: none;
}

.replay-empty > span {
    color: #79cfc2;
    font-size: 44px;
}

.replay-empty h2 {
    margin: 16px 0 8px;
    color: #f0f7f5;
    font-size: 26px;
}

.replay-empty p {
    margin: 0;
}


/* metrics */

.replay-numbers {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    border-bottom:
        1px solid rgba(255,255,255,.09);
}

.replay-numbers article {
    min-height: 190px;
    padding:
        clamp(30px, 4vw, 48px)
        clamp(18px, 3vw, 38px);
    border-right:
        1px solid rgba(255,255,255,.09);
}

.replay-numbers article:last-child {
    border-right: 0;
}

.replay-numbers small,
.replay-numbers span {
    display: block;
    color: rgba(230,242,240,.42);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .14em;
}

.replay-numbers strong {
    display: block;
    margin: 11px 0 9px;
    color: #eef7f5;
    font-size: clamp(34px, 4vw, 58px);
    line-height: 1;
    font-weight: 520;
}


/* lower content */

.replay-story {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;
    gap: 60px;
    align-items: end;
    padding:
        clamp(62px, 8vw, 112px)
        0;
}

.replay-story > div:first-child {
    max-width: 800px;
}

.replay-story > div:first-child > span {
    color: #75cfc2;
    font-size: 10px;
    letter-spacing: .2em;
}

.replay-story h2 {
    margin: 17px 0 20px;
    font-size:
        clamp(34px, 4.6vw, 72px);
    line-height: .98;
    letter-spacing: -.045em;
    font-weight: 560;
}

.replay-story p {
    max-width: 680px;
    margin: 0;
    color: rgba(231,242,240,.56);
    font-size: 17px;
    line-height: 1.65;
}

.replay-story__actions {
    display: flex;
    flex-direction: column;
    min-width: 270px;
    gap: 10px;
}

.replay-primary,
.replay-secondary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 0 20px;
    border-radius: 14px;
    text-decoration: none;
    font: inherit;
}

.replay-primary {
    border: 1px solid #83d7ca;
    background: #83d7ca;
    color: #071514;
    font-weight: 650;
}

.replay-primary:hover {
    filter: brightness(1.06);
}

.replay-secondary {
    border:
        1px solid rgba(255,255,255,.12);
    background:
        rgba(255,255,255,.035);
    color: #eaf4f2;
    cursor: pointer;
}

.replay-secondary:hover {
    border-color:
        rgba(255,255,255,.24);
}

.replay-back {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding-top: 28px;
    border-top:
        1px solid rgba(255,255,255,.08);
}

.replay-back a {
    color: rgba(231,242,240,.48);
    text-decoration: none;
    font-size: 13px;
}

.replay-back a:hover {
    color: #f0f7f5;
}


/* responsive */

@media (max-width: 900px) {
    .replay-page__inner {
        width: min(100% - 28px, 1420px);
    }

    .replay-hero {
        grid-template-columns: 1fr;
    }

    .replay-hero__result {
        padding:
            18px 0 0;
        border-left: 0;
        border-top:
            1px solid rgba(255,255,255,.1);
    }

    .replay-numbers {
        grid-template-columns:
            repeat(2, minmax(0,1fr));
    }

    .replay-numbers article:nth-child(2) {
        border-right: 0;
    }

    .replay-numbers article:nth-child(-n+2) {
        border-bottom:
            1px solid rgba(255,255,255,.09);
    }

    .replay-story {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .replay-story__actions {
        min-width: 0;
    }
}

@media (max-width: 680px) {
    .replay-page {
        padding-top: 24px;
    }

    .replay-hero h1 {
        font-size: clamp(48px, 17vw, 78px);
    }

    .replay-stage {
        border-radius: 18px;
    }

    .replay-stage__topbar {
        min-height: 58px;
        padding: 0 14px;
    }

    .replay-stage__meta {
        gap: 10px;
    }

    .replay-stage__meta span {
        font-size: 9px;
    }

    .replay-screen {
        padding: 8px;
    }

    .replay-canvas-frame {
        border-radius: 12px;
    }

    .replay-player .replay-controls {
        grid-template-columns:
            42px
            42px
            42px
            1fr
            42px;
    }

    .replay-player .replay-controls time {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: start;
        min-width: 0;
    }

    .replay-player .replay-controls select {
        grid-column: 4;
        grid-row: 2;
    }

    .replay-player .replay-controls [data-replay-full] {
        grid-column: 5;
        grid-row: 2;
    }

    .replay-player .replay-controls input[type="range"] {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .replay-numbers {
        grid-template-columns: 1fr 1fr;
    }

    .replay-numbers article {
        min-height: 145px;
        padding: 27px 18px;
    }

    .replay-back {
        flex-direction: column;
    }
}
