:root {
    color-scheme: dark;
    --mcfun-ink: #f8fafc;
    --mcfun-muted: #94a3b8;
    --mcfun-panel: rgba(9, 13, 23, 0.78);
    --mcfun-border: rgba(255, 255, 255, 0.12);
    --mcfun-red: #d11f2f;
    --mcfun-red-dark: #84111b;
    --mcfun-green: #22c55e;
    --mcfun-gold: #fbbf24;
    --mcfun-stone: #334155;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body.mcfun-logo-page {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--mcfun-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 22% 18%, rgba(34, 197, 94, 0.22), transparent 26rem),
        radial-gradient(circle at 82% 14%, rgba(209, 31, 47, 0.32), transparent 28rem),
        linear-gradient(135deg, #06080e 0%, #101827 46%, #080b12 100%);
}

.mcfun-logo-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), transparent 76%);
}

.mcfun-logo-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(290px, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: clamp(28px, 5vw, 72px);
    padding: 42px 0;
}

.mcfun-logo-copy {
    max-width: 450px;
}

.mcfun-logo-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 950;
    letter-spacing: 0;
    background: linear-gradient(145deg, var(--mcfun-red), var(--mcfun-red-dark));
    border: 3px solid rgba(255, 255, 255, 0.86);
    box-shadow:
        0 20px 45px rgba(209, 31, 47, 0.38),
        inset 0 -10px 0 rgba(0, 0, 0, 0.18);
}

.mcfun-logo-kicker {
    margin: 34px 0 10px;
    color: var(--mcfun-green);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.mcfun-logo-copy h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 0.95;
    letter-spacing: 0;
}

.mcfun-logo-copy p:not(.mcfun-logo-kicker) {
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.8;
}

.mcfun-logo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.mcfun-logo-button,
.mcfun-logo-link {
    min-height: 44px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
    border: 1px solid var(--mcfun-border);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.mcfun-logo-button {
    color: #06120b;
    background: linear-gradient(135deg, #86efac, var(--mcfun-green));
    border-color: rgba(134, 239, 172, 0.7);
}

.mcfun-logo-button:hover,
.mcfun-logo-link:hover,
.mcfun-logo-back:hover {
    transform: translateY(-2px);
}

.mcfun-logo-preview {
    min-width: 0;
}

.home-logo-hero {
    position: relative;
    width: min(760px, 100%);
    margin-right: auto;
    margin-left: auto;
    animation: fadeInDown 0.9s ease-out both;
}

.mcfun-logo-stage {
    position: relative;
    min-height: clamp(420px, 62vw, 640px);
    overflow: hidden;
    isolation: isolate;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 54%, rgba(34, 197, 94, 0.2), transparent 18rem),
        radial-gradient(circle at 50% 50%, rgba(209, 31, 47, 0.22), transparent 23rem),
        linear-gradient(155deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.98));
    border: 1px solid var(--mcfun-border);
    box-shadow:
        0 28px 90px rgba(0, 0, 0, 0.48),
        inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.mcfun-logo-stage--home {
    width: min(100%, 760px);
    min-height: clamp(200px, 24vw, 270px);
    margin: 0 auto;
    overflow: visible;
    background: none;
    border: 0;
    box-shadow: none;
}

.mcfun-logo-stage--home .mcfun-logo-mark {
    width: min(94%, 640px);
    aspect-ratio: 3.5 / 1;
}

.mcfun-logo-stage--home .mcfun-logo-face {
    grid-template-columns: repeat(5, max-content);
    justify-content: center;
    column-gap: clamp(6px, 1.2vw, 16px);
    padding: clamp(14px, 2.4vw, 26px);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 22%),
        linear-gradient(145deg, #e12535 0%, var(--mcfun-red) 52%, var(--mcfun-red-dark) 100%);
    border: clamp(5px, 0.9vw, 8px) solid #fff;
    box-shadow:
        0 28px 58px rgba(209, 31, 47, 0.34),
        inset 0 -16px 0 rgba(0, 0, 0, 0.16),
        inset 0 12px 0 rgba(255, 255, 255, 0.09);
}

.mcfun-logo-stage--home .mcfun-logo-face::before,
.mcfun-logo-stage--home .mcfun-logo-face::after {
    display: block;
}

.mcfun-logo-stage--home .mcfun-logo-face span {
    font-size: clamp(54px, 9vw, 112px);
    font-weight: 1000;
    -webkit-text-stroke: 1px currentColor;
    text-shadow:
        0 5px 0 rgba(0, 0, 0, 0.28),
        0 0 20px rgba(209, 31, 47, 0.3);
}

.mcfun-logo-grid {
    position: absolute;
    inset: 0;
    z-index: -3;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.22) 1px, transparent 1px);
    background-size: 34px 34px;
    transform: perspective(520px) rotateX(62deg) translateY(120px) scale(1.28);
    transform-origin: 50% 100%;
}

.mcfun-logo-beam {
    position: absolute;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    z-index: -2;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.42), rgba(34, 197, 94, 0.28) 28%, transparent 66%);
    transform: scale(0);
    opacity: 0;
}

.is-playing .mcfun-logo-beam {
    animation: mcfun-beam 4.6s cubic-bezier(.22, 1, .36, 1) both;
}

.mcfun-logo-orbit {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.mcfun-logo-orbit span {
    position: absolute;
    left: calc(50% - var(--s) / 2);
    top: calc(50% - var(--s) / 2);
    width: var(--s);
    height: var(--s);
    background: var(--c);
    box-shadow:
        inset 0 -5px 0 rgba(0, 0, 0, 0.2),
        0 0 24px color-mix(in srgb, var(--c), transparent 38%);
    transform: translate(var(--x), var(--y)) rotate(0deg) scale(0.4);
    opacity: 0;
}

.is-playing .mcfun-logo-orbit span {
    animation: mcfun-block-flight 4.7s cubic-bezier(.17, .84, .44, 1) both;
    animation-delay: var(--d);
}

.mcfun-logo-mark {
    position: relative;
    width: min(78vw, 600px);
    aspect-ratio: 2.75 / 1;
    display: grid;
    place-items: center;
    transform-style: preserve-3d;
}

.mcfun-logo-face {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    padding: clamp(18px, 4vw, 38px);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 22%),
        linear-gradient(145deg, #e12535 0%, var(--mcfun-red) 52%, var(--mcfun-red-dark) 100%);
    border: clamp(5px, 1.1vw, 9px) solid #fff;
    box-shadow:
        0 36px 70px rgba(209, 31, 47, 0.4),
        inset 0 -20px 0 rgba(0, 0, 0, 0.16),
        inset 0 16px 0 rgba(255, 255, 255, 0.09);
    transform: translateY(28px) rotateX(64deg) scale(0.66);
    transform-origin: 50% 100%;
    opacity: 0;
}

.is-playing .mcfun-logo-face {
    animation: mcfun-logo-land 4.6s cubic-bezier(.17, .84, .44, 1) both;
}

.mcfun-logo-face::before,
.mcfun-logo-face::after {
    content: "";
    position: absolute;
    inset: 12px;
    pointer-events: none;
}

.mcfun-logo-face::before {
    border: 2px solid rgba(255, 255, 255, 0.22);
}

.mcfun-logo-face::after {
    background:
        linear-gradient(90deg, transparent 19%, rgba(255, 255, 255, 0.16) 19% 20%, transparent 20% 39%, rgba(255, 255, 255, 0.12) 39% 40%, transparent 40% 59%, rgba(255, 255, 255, 0.12) 59% 60%, transparent 60% 79%, rgba(255, 255, 255, 0.12) 79% 80%, transparent 80%);
    mix-blend-mode: screen;
}

.mcfun-logo-face span {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: clamp(46px, 9vw, 108px);
    font-weight: 1000;
    line-height: 1;
    letter-spacing: 0;
    text-shadow:
        0 4px 0 rgba(0, 0, 0, 0.24),
        0 0 18px rgba(255, 255, 255, 0.25);
    opacity: 0;
    transform: translateY(-34px) scale(0.82);
}

.is-playing .mcfun-logo-face span {
    animation: mcfun-letter-pop 1.05s cubic-bezier(.18, .89, .32, 1.28) both;
    animation-delay: calc(1.52s + var(--i) * 0.13s);
}

.mcfun-logo-shadow {
    position: absolute;
    inset: 54% 8% 12%;
    z-index: -1;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.54), transparent 68%);
    filter: blur(12px);
    opacity: 0;
    transform: scaleX(0.46);
}

.is-playing .mcfun-logo-shadow {
    animation: mcfun-shadow 4.6s ease both;
}

.mcfun-logo-spark {
    position: absolute;
    width: 16px;
    height: 16px;
    opacity: 0;
    background: #fff;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.85);
}

.mcfun-logo-spark--one {
    top: 4%;
    right: 16%;
}

.mcfun-logo-spark--two {
    left: 12%;
    bottom: 22%;
    background: var(--mcfun-green);
}

.mcfun-logo-spark--three {
    right: 8%;
    bottom: 18%;
    background: var(--mcfun-gold);
}

.is-playing .mcfun-logo-spark {
    animation: mcfun-spark 1.7s ease both;
}

.is-playing .mcfun-logo-spark--one {
    animation-delay: 2.25s;
}

.is-playing .mcfun-logo-spark--two {
    animation-delay: 2.55s;
}

.is-playing .mcfun-logo-spark--three {
    animation-delay: 2.86s;
}

.mcfun-logo-console {
    position: absolute;
    left: 50%;
    bottom: clamp(34px, 8vw, 64px);
    width: min(440px, 76%);
    height: 28px;
    display: flex;
    justify-content: space-between;
    transform: translateX(-50%);
    opacity: 0.9;
}

.mcfun-logo-console span {
    width: 28%;
    height: 100%;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.24), transparent 16% 84%, rgba(255, 255, 255, 0.24)),
        linear-gradient(180deg, #475569, #1e293b);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.26);
}

.is-playing .mcfun-logo-console span {
    animation: mcfun-console 1.4s ease both;
}

.is-playing .mcfun-logo-console span:nth-child(2) {
    animation-delay: 0.13s;
}

.is-playing .mcfun-logo-console span:nth-child(3) {
    animation-delay: 0.26s;
}

@keyframes mcfun-block-flight {
    0% {
        opacity: 0;
        transform: translate(var(--x), var(--y)) rotate(0deg) scale(0.34);
    }
    18% {
        opacity: 1;
    }
    58% {
        opacity: 1;
        transform: translate(calc(var(--x) * 0.22), calc(var(--y) * 0.18)) rotate(240deg) scale(1);
    }
    74% {
        transform: translate(0, 0) rotate(360deg) scale(0.72);
        opacity: 0.86;
    }
    100% {
        transform: translate(0, 0) rotate(410deg) scale(0);
        opacity: 0;
    }
}

@keyframes mcfun-logo-land {
    0% {
        opacity: 0;
        transform: translateY(80px) rotateX(72deg) scale(0.5);
        filter: blur(8px);
    }
    32% {
        opacity: 1;
        filter: blur(0);
    }
    52% {
        transform: translateY(-8px) rotateX(0deg) scale(1.04);
    }
    64% {
        transform: translateY(0) rotateX(0deg) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg) scale(1);
    }
}

@keyframes mcfun-letter-pop {
    0% {
        opacity: 0;
        transform: translateY(-34px) scale(0.82);
    }
    58% {
        opacity: 1;
        transform: translateY(7px) scale(1.08);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes mcfun-beam {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    20% {
        opacity: 0.8;
    }
    54% {
        opacity: 0.36;
        transform: scale(2.4);
    }
    100% {
        opacity: 0.1;
        transform: scale(3.1);
    }
}

@keyframes mcfun-shadow {
    0% {
        opacity: 0;
        transform: scaleX(0.35);
    }
    52% {
        opacity: 0.64;
        transform: scaleX(0.9);
    }
    100% {
        opacity: 0.54;
        transform: scaleX(1);
    }
}

@keyframes mcfun-spark {
    0% {
        opacity: 0;
        transform: rotate(0deg) scale(0);
    }
    34% {
        opacity: 1;
        transform: rotate(45deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: rotate(135deg) scale(0.2);
    }
}

@keyframes mcfun-console {
    0%,
    100% {
        transform: translateY(0);
    }
    48% {
        transform: translateY(12px);
    }
}

@media (max-width: 820px) {
    .mcfun-logo-shell {
        grid-template-columns: 1fr;
        align-items: start;
        padding-top: 28px;
    }

    .mcfun-logo-copy {
        max-width: 680px;
    }

    .mcfun-logo-stage {
        min-height: 430px;
    }
}

@media (max-width: 560px) {
    .mcfun-logo-shell {
        width: min(100% - 24px, 1180px);
    }

    .mcfun-logo-copy h1 {
        font-size: 32px;
        line-height: 1.08;
    }

    .mcfun-logo-copy p:not(.mcfun-logo-kicker) {
        font-size: 15px;
    }

    .mcfun-logo-stage {
        min-height: 340px;
    }

    .mcfun-logo-stage--home {
        min-height: 170px;
    }

    .mcfun-logo-mark {
        width: 94%;
    }

    .mcfun-logo-face {
        padding: 16px;
    }

    .mcfun-logo-face span {
        font-size: clamp(40px, 15vw, 72px);
    }

    .mcfun-logo-stage--home .mcfun-logo-face span {
        font-size: clamp(48px, 13vw, 62px);
        -webkit-text-stroke-width: 0.75px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mcfun-logo-stage,
    .mcfun-logo-stage *,
    .mcfun-logo-stage::before,
    .mcfun-logo-stage::after,
    .mcfun-logo-stage *::before,
    .mcfun-logo-stage *::after,
    .home-logo-hero {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }

    .mcfun-logo-face,
    .mcfun-logo-face span,
    .mcfun-logo-shadow {
        opacity: 1;
        transform: none;
        filter: none;
    }
}
