#hz-intro {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 50% 42%,
            rgba(8, 35, 20, 0.2),
            transparent 48%
        ),
        #000;
    color: #d7e0d8;
    font-family:
        "Courier New",
        Courier,
        monospace;
    transition:
        opacity 900ms ease,
        visibility 900ms ease;
}

#hz-intro.hz-intro-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#hz-intro::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.16;
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.025) 0,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px,
            transparent 4px
        );
    animation: hzScan 9s linear infinite;
}

#hz-intro::after {
    content: "";
    position: absolute;
    inset: -20%;
    pointer-events: none;
    background:
        radial-gradient(
            circle,
            transparent 25%,
            rgba(0, 0, 0, 0.96) 76%
        );
}

.hz-intro-frame {
    position: relative;
    z-index: 2;
    width: min(850px, calc(100% - 38px));
    min-height: min(520px, calc(100vh - 70px));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px 24px 20px;
    border: 1px solid rgba(96, 255, 145, 0.16);
    border-radius: 8px;
    background: rgba(0, 3, 1, 0.72);
    box-shadow:
        0 0 80px rgba(24, 255, 96, 0.045),
        inset 0 0 42px rgba(24, 255, 96, 0.025);
}

.hz-intro-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: rgba(119, 255, 158, 0.75);
    font-size: 11px;
    letter-spacing: 3px;
}

.hz-intro-title {
    color: #a2ffbc;
    font-size: clamp(18px, 4vw, 29px);
    letter-spacing: clamp(5px, 1.4vw, 12px);
    text-shadow: 0 0 18px rgba(60, 255, 115, 0.28);
}

.hz-intro-code {
    color: rgba(183, 196, 185, 0.38);
    text-align: right;
}

.hz-intro-story {
    width: min(710px, 100%);
    min-height: 250px;
    margin: 35px auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hz-intro-text {
    margin: 0;
    color: #d5d7ce;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(21px, 4.3vw, 37px);
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: 0.8px;
    text-align: center;
    text-shadow: 0 0 22px rgba(226, 230, 213, 0.08);
    transition:
        opacity 650ms ease,
        transform 650ms ease;
}

#hz-intro-text.hz-fragment-out {
    opacity: 0;
    transform: translateY(-9px);
}

#hz-intro-text.hz-fragment-danger {
    color: #ff8796;
}

#hz-intro-text.hz-fragment-zil {
    color: #e4c993;
}

.hz-cursor {
    display: inline-block;
    width: 0.6em;
    color: #63ff91;
    animation: hzBlink 760ms steps(1) infinite;
}

.hz-intro-footer {
    display: grid;
    gap: 16px;
}

.hz-intro-progress {
    height: 1px;
    overflow: hidden;
    background: rgba(100, 255, 140, 0.1);
}

.hz-intro-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: rgba(100, 255, 140, 0.65);
    box-shadow: 0 0 12px rgba(100, 255, 140, 0.35);
    transition: width 700ms ease;
}

.hz-intro-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hz-intro-button {
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid rgba(98, 255, 143, 0.3);
    border-radius: 3px;
    color: rgba(153, 255, 181, 0.9);
    background: rgba(6, 30, 14, 0.36);
    font-family: "Courier New", Courier, monospace;
    font-size: 12px;
    letter-spacing: 2px;
    cursor: pointer;
    transition:
        background 200ms ease,
        border-color 200ms ease,
        color 200ms ease;
}

.hz-intro-button:active {
    background: rgba(34, 120, 61, 0.24);
    border-color: rgba(98, 255, 143, 0.7);
}

#hz-intro-continue {
    margin-left: auto;
    color: #c2ffcf;
    border-color: rgba(98, 255, 143, 0.58);
}

.hz-intro-note {
    color: rgba(170, 184, 174, 0.35);
    font-size: 9px;
    letter-spacing: 1.4px;
    text-align: center;
}

@keyframes hzBlink {
    0%,
    48% {
        opacity: 1;
    }

    49%,
    100% {
        opacity: 0;
    }
}

@keyframes hzScan {
    from {
        transform: translateY(-8px);
    }

    to {
        transform: translateY(8px);
    }
}

@media (max-width: 600px) {
    .hz-intro-frame {
        width: calc(100% - 22px);
        min-height: calc(100vh - 34px);
        padding: 24px 17px 17px;
    }

    .hz-intro-code {
        display: none;
    }

    .hz-intro-story {
        min-height: 310px;
        margin-top: 20px;
    }

    .hz-intro-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .hz-intro-button,
    #hz-intro-continue {
        width: 100%;
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    #hz-intro::before,
    .hz-cursor {
        animation: none;
    }
}
