* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: #f3f3f3;
    color: #222;
    font-family:
        "Microsoft YaHei",
        "PingFang SC",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
}

.game {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

#game-screen {
    width: 100%;
    max-width: 640px;
    min-height: 100vh;
    padding: 50px 22px;
}


/* =========================
   开场
========================= */

#intro-screen {
    padding-top: 12vh;
}

#intro-screen h1 {
    margin: 0 0 32px;
    font-size: 25px;
    font-weight: 500;
    line-height: 1.6;
}

#intro-screen p {
    margin: 0 0 16px;
    color: #666;
    font-size: 14px;
    line-height: 2;
}

#intro-screen .time {
    margin-top: 30px;
    color: #999;
    font-size: 12px;
}

#start-button {
    margin-top: 42px;
    padding: 0;
    border: none;
    background: transparent;
    color: #356db8;
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
}

#start-button::before {
    content: "○ ";
}

#start-button:active {
    opacity: 0.5;
}


/* =========================
   调查卡片
========================= */

#question-screen {
    width: 100%;
    padding-top: 8vh;
}

.question-card {
    width: 100%;
    padding: 30px 26px 32px;

    background: #fafafa;
    border: 1px solid #dedede;
    border-radius: 4px;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.025);

    transition:
        background 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}


/* =========================
   题号
========================= */

.question-number {
    margin-bottom: 22px;

    color: #999;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.5px;
}


/* =========================
   问题文字
========================= */

#question-text {
    min-height: 35px;

    margin: 0 0 30px;

    color: #222;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.9;
    letter-spacing: 0.3px;

    transition:
        opacity 0.3s ease;
}


/* =========================
   选项区域
========================= */

#options {
    display: flex;
    flex-direction: column;
    gap: 9px;
}


/* =========================
   选项
========================= */

.option-button {
    width: 100%;

    padding: 13px 15px;

    border: 1px solid #d7d7d7;
    border-radius: 3px;

    background: #ffffff;
    color: #356db8;

    font-family: inherit;
    font-size: 14px;
    line-height: 1.7;
    text-align: left;

    cursor: pointer;

    opacity: 0;

    transform: translateY(5px);

    transition:
        opacity 0.45s ease,
        transform 0.45s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease;
}


/* JS 会添加这个状态 */

.option-button.show {
    opacity: 1;
    transform: translateY(0);
}


/* 点击 */

.option-button.selected {
    background: #eeeeee;
    border-color: #c8c8c8;
    color: #333333;
}


/* 其他选项消失 */

.option-button.fade-out {
    opacity: 0;
    transform: translateY(-4px);
}


/* =========================
   异常状态
========================= */

.glitch-text {
    color: #9b1c1c !important;
}

.black-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
}

.flash-screen {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: #8f0000;
    pointer-events: none;
}


/* =========================
   隐藏
========================= */

.hidden {
    display: none !important;
}


/* =========================
   手机
========================= */

@media (max-width: 600px) {

    body {
        background: #f3f3f3;
    }

    #game-screen {
        padding: 28px 15px 40px;
    }

    #question-screen {
        padding-top: 5vh;
    }

    .question-card {
        padding: 25px 19px 27px;
    }

    .question-number {
        margin-bottom: 19px;
    }

    #question-text {
        font-size: 16px;
        margin-bottom: 25px;
    }

    .option-button {
        padding: 13px 13px;
        font-size: 14px;
    }
}


.q9-crossed {
    position: relative;
    color: #9b1c1c !important;
}

.q9-crossed::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    top: 50%;
    height: 2px;
    background: #9b1c1c;
    transform: translateY(-50%);
    pointer-events: none;
}


/* =========================================
   异常闪屏
========================================= */

.glitch-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
}

.glitch-flash.active {
    animation: glitchEffect 1s ease;
}


@keyframes glitchEffect {

    0% {
        opacity: 0;
        filter: blur(0px);
        transform: translateX(0);
    }


    15% {
        opacity: 0.9;
        filter: blur(3px);
        transform: translateX(-8px);
    }


    30% {
        opacity: 0.3;
        filter: blur(1px);
        transform: translateX(6px);
    }


    45% {
        opacity: 1;
        filter: blur(5px);
        transform: translateX(-4px);
    }


    60% {
        opacity: 0.4;
        filter: blur(2px);
        transform: translateX(3px);
    }


    80% {
        opacity: 0.8;
        filter: blur(4px);
        transform: translateX(-2px);
    }


    100% {
        opacity: 0;
        filter: blur(0);
        transform: translateX(0);
    }

}


/* =========================================
   异常状态：克制的黑底暗红字
========================================= */

html.dark-glitch {
    background: #000000 !important;
}

body.dark-glitch {
    background: #000000 !important;
    color: #8f2020 !important;
    min-height: 100vh;
}

body.dark-glitch #question-screen {
    background: #000000 !important;
    color: #8f2020 !important;
}

body.dark-glitch .question-card {
    background: #000000 !important;
    color: #8f2020 !important;
    border: none !important;
    box-shadow: none !important;
}

body.dark-glitch .question-number {
    color: #8f2020 !important;
}

body.dark-glitch #question-text {
    color: #8f2020 !important;
}

body.dark-glitch .option-button {
    background: transparent !important;
    color: #8f2020 !important;
    border: none !important;
    box-shadow: none !important;
}

body.dark-glitch .glitch-text {
    color: #8f2020 !important;
}


body.glitch-shake {

    animation: shakeScreen 0.4s;

}


@keyframes shakeScreen {

    0% {
        transform: translate(0);
    }

    25% {
        transform: translate(-5px,2px);
    }

    50% {
        transform: translate(5px,-3px);
    }

    75% {
        transform: translate(-3px,3px);
    }

    100% {
        transform: translate(0);
    }

}


/* =========================================
   封面：正式问卷样式
========================================= */

.intro-box {
    width: 100%;
    max-width: 560px;
    box-sizing: border-box;

    margin: 28px auto;
    padding: 28px 30px;

    background: #ffffff;
    border: 1px solid #d6d6d6;

    color: #333333;

    text-align: left;
}


/* 问卷标题 */

.intro-box h1 {
    margin: 0 0 22px 0;

    font-size: 30px;

    font-weight: 900;

    color: #426b91;

    letter-spacing: 1px;

    text-align: center;

    line-height: 1.4;
}


/* 标题下面的说明文字 */

.intro-box p {
    margin: 0;

    font-size: 14px;
    line-height: 1.9;

    color: #666666;
}


/* 开始按钮 */

.intro-box .start-button {
    display: block;

    width: 100%;

    margin-top: 26px;
    padding: 12px 0;

    background: #ffffff;

    border: 1px solid #9aa7b5;

    color: #426b91;

    font-size: 14px;

    cursor: pointer;

    transition: all 0.2s ease;
}

.intro-box .start-button:hover {
    background: #f5f7f9;
}


/* =========================================
   Q8：七重特殊选项故障效果
========================================= */

.q8-special-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.q8-special-option {
    display: block;

    width: 100%;

    color: #8f2020 !important;

    background: transparent !important;

    border: none !important;

    box-shadow: none !important;

    font-size: 16px;

    font-weight: 500;

    padding: 9px 0;

    margin: 0;

    text-align: left;

    cursor: pointer;

    opacity: 0;

    transform: translateX(-18px);

    animation:
        q8OptionAppear
        0.25s
        ease-out
        forwards;
}


.q8-special-option.show {
    opacity: 1;
}

.q8-special-option:hover {
    color: #6f1515 !important;
}

.q8-special-option.selected {
    color: #6f1515 !important;
}

.q8-special-option.fade-out {
    opacity: 0;
    pointer-events: none;
}


/* 每一个出现的位置稍微不同 */

.q8-special-option:nth-child(1) {
    animation-delay: 0s;
}

.q8-special-option:nth-child(2) {
    animation-delay: 0.08s;
}

.q8-special-option:nth-child(3) {
    animation-delay: 0.16s;
}

.q8-special-option:nth-child(4) {
    animation-delay: 0.24s;
}

.q8-special-option:nth-child(5) {
    animation-delay: 0.32s;
}

.q8-special-option:nth-child(6) {
    animation-delay: 0.40s;
}

.q8-special-option:nth-child(7) {
    animation-delay: 0.48s;
}


/* 出现时的故障抖动 */

@keyframes q8Appear {

    0% {
        opacity: 0;
        transform: translateX(-18px);
        filter: blur(4px);
    }

    35% {
        opacity: 1;
        transform: translateX(10px);
        filter: blur(1px);
    }

    60% {
        transform: translateX(-7px);
        filter: blur(0);
    }

    80% {
        transform: translateX(4px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}


/* 整个选项区域轻微震动 */

.q8-shake {
    animation: q8ScreenShake 0.65s ease-out;
}

@keyframes q8ScreenShake {

    0% {
        transform: translate(0, 0);
    }

    15% {
        transform: translate(-7px, 2px);
    }

    30% {
        transform: translate(8px, -2px);
    }

    45% {
        transform: translate(-6px, 1px);
    }

    60% {
        transform: translate(5px, -1px);
    }

    75% {
        transform: translate(-2px, 1px);
    }

    100% {
        transform: translate(0, 0);
    }
}


/* ==================================================
   黑红状态
   Q11开始永久保持
================================================== */

html.dark-glitch,
body.dark-glitch {

    background: #050505 !important;

    color: #8f2020 !important;
}


/* 整个游戏界面 */

html.dark-glitch .game,
body.dark-glitch .game,
html.dark-glitch #game-screen,
body.dark-glitch #game-screen {

    background: #050505 !important;

    color: #8f2020 !important;

    border-color: transparent !important;

    box-shadow: none !important;
}


/* 问题编号 */

html.dark-glitch .question-number,
body.dark-glitch .question-number {

    color: #8f2020 !important;
}


/* 问题文字 */

html.dark-glitch #question-text,
body.dark-glitch #question-text {

    color: #8f2020 !important;
}


/* 选项 */

html.dark-glitch .option-button,
body.dark-glitch .option-button {

    color: #8f2020 !important;

    background: transparent !important;

    border-color: transparent !important;

    box-shadow: none !important;
}


/* 鼠标放上去也不要恢复白色 */

html.dark-glitch .option-button:hover,
body.dark-glitch .option-button:hover {

    color: #b02a2a !important;

    background: transparent !important;

    border-color: transparent !important;
}


/* 特殊文字 */

html.dark-glitch .special-text,
body.dark-glitch .special-text,
html.dark-glitch .glitch-text,
body.dark-glitch .glitch-text {

    color: #8f2020 !important;

    background: transparent !important;

    border: none !important;

    box-shadow: none !important;
}

/* ==================================================
   Q12开始：永久黑红模式
================================================== */

html.dark-glitch,
body.dark-glitch {

    background: #050505 !important;
    color: #7f1d1d !important;
}


/* 整个页面 */

html.dark-glitch .game,
body.dark-glitch .game,
html.dark-glitch #game-screen,
body.dark-glitch #game-screen {

    background: #050505 !important;
    color: #7f1d1d !important;
    border-color: transparent !important;
    box-shadow: none !important;
}


/* 题号 */

html.dark-glitch .question-number,
body.dark-glitch .question-number {

    color: #7f1d1d !important;
}


/* 普通问题 */

html.dark-glitch #question-text,
body.dark-glitch #question-text {

    color: #7f1d1d !important;
}


/* 普通选项 */

html.dark-glitch .option-button,
body.dark-glitch .option-button {

    color: #7f1d1d !important;
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}


/* 鼠标经过选项 */

html.dark-glitch .option-button:hover,
body.dark-glitch .option-button:hover {

    color: #9f2424 !important;
    background: transparent !important;
}


/* 特殊文字 */

html.dark-glitch .glitch-text,
body.dark-glitch .glitch-text {

    color: #7f1d1d !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* ==================================================
   最后留言输入框
================================================== */

#final-input,
.final-input,
textarea {

    background: transparent !important;

    color: #7f1d1d !important;

    border: 1px solid #7f1d1d !important;

    border-radius: 4px;

    width: 90%;

    max-width: 420px;

    height: 90px;

    padding: 12px;

    font-size: 15px;

    outline: none;

    box-shadow: none !important;

}


/* 输入时 */

textarea:focus,
#final-input:focus,
.final-input:focus {

    border-color: #9f2424 !important;

    box-shadow: 0 0 10px rgba(127,29,29,0.3) !important;

}


/* 输入框里面的文字 */

textarea {

    caret-color: #9f2424;

}


/* 提示文字 */

textarea::placeholder {

    color: #7f1d1d;

    opacity: 0.7;

}


/* ==================================================
   结尾页面
================================================== */

.ending-card {

    width: 80%;

    max-width: 520px;

    padding: 40px 30px;

    margin: auto;

    text-align: center;


    border: 1px solid #7f1d1d;

    background: transparent;


    animation:
        endingAppear
        1s
        ease;
}


.ending-card h1 {

    color: #7f1d1d;

    font-size: 28px;

    margin-bottom: 25px;

}


.ending-card p {

    color: #7f1d1d;

    font-size: 15px;

    line-height: 2;

}



@keyframes endingAppear {

    from {

        opacity: 0;

        transform:
            translateY(20px);

        filter: blur(5px);

    }


    to {

        opacity: 1;

        transform:
            translateY(0);

        filter: blur(0);

    }

}