* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    overflow: hidden;
    background: #fff6f8;
    color: #503c43;
    font-family:
        "Microsoft YaHei",
        "PingFang SC",
        Arial,
        sans-serif;
}

button {
    font: inherit;
}

#app {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    position: relative;
    overflow: hidden;
}

.screen {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hidden {
    display: none !important;
}


/* 加载画面 */

.loading-screen {
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #080808;
    color: white;
}

.loading-text {
    margin: 0 0 25px;
    font-size: 18px;
    letter-spacing: 3px;
}

.loading-dots {
    display: flex;
    gap: 12px;
}

.loading-dots span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ff9fbd;
    animation: loadingBounce 0.9s infinite alternate;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loadingBounce {
    from {
        transform: translateY(0);
        opacity: 0.35;
    }

    to {
        transform: translateY(-13px);
        opacity: 1;
    }
}


/* 主要场景 */

.main-scene {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background:
        radial-gradient(
            circle at top,
            #fffdfd 0%,
            #ffe8ef 52%,
            #ffd9e6 100%
        );
}

.main-scene::before,
.main-scene::after {
    content: "♡";
    position: absolute;
    color: rgba(255, 128, 169, 0.22);
    font-size: 130px;
    pointer-events: none;
}

.main-scene::before {
    top: 4%;
    left: -20px;
    transform: rotate(-15deg);
}

.main-scene::after {
    right: -10px;
    bottom: 4%;
    transform: rotate(18deg);
}


/* 小猫 */

.cat-area {
    position: relative;
    z-index: 3;
    width: min(62vw, 290px);
    height: min(62vw, 290px);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 22px;
}

.cat-image {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: center bottom;
}

.cat-fallback {
    position: relative;
    z-index: 2;
    display: none;
    font-size: clamp(110px, 40vw, 220px);
    line-height: 1;
    transform-origin: center bottom;
}

.impact-shadow {
    position: absolute;
    z-index: 1;
    bottom: 0;
    left: 50%;
    width: 65%;
    height: 24px;
    border-radius: 50%;
    background: rgba(90, 58, 66, 0.22);
    filter: blur(7px);
    transform: translateX(-50%) scaleX(0.35);
}


/* 对话框 */

.message-card {
    position: relative;
    z-index: 5;
    width: min(92vw, 540px);
    padding: 24px 22px;
    text-align: center;
    border: 2px solid rgba(255, 133, 171, 0.3);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow:
        0 18px 45px rgba(147, 76, 100, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
}

.message-card h1,
.message-card h2 {
    margin: 8px 0 20px;
    line-height: 1.5;
}

.message-card h1 {
    font-size: clamp(23px, 6vw, 34px);
    color: #e85f91;
}

.message-card h2 {
    font-size: clamp(22px, 5.5vw, 31px);
    color: #684a56;
}

.message-card p {
    line-height: 1.7;
}

.small-text {
    margin: 0;
    color: #c76d8d;
    font-size: 16px;
}

.answer-hint {
    min-height: 25px;
    margin: 4px 0 12px;
    color: #e85f91;
    font-weight: bold;
}


/* 按钮 */

.button-group {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.primary-button,
.answer-button {
    min-width: 125px;
    padding: 14px 24px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    color: white;
    background: linear-gradient(135deg, #ff84ad, #f35f93);
    box-shadow: 0 9px 20px rgba(239, 88, 140, 0.28);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.primary-button {
    font-size: 18px;
}

.answer-button {
    font-size: 18px;
    font-weight: bold;
}

.secondary-button {
    color: #d9638b;
    border: 2px solid #f4a3be;
    background: #fff4f7;
    box-shadow: none;
}

.primary-button:active,
.answer-button:active {
    transform: scale(0.95);
}


/* 回答正确 */

.success-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, #ff92b5, #f45d92);
    font-size: 40px;
    font-weight: bold;
    box-shadow: 0 10px 28px rgba(244, 93, 146, 0.28);
}

.progress-track {
    width: 100%;
    height: 15px;
    margin-top: 20px;
    overflow: hidden;
    border-radius: 999px;
    background: #f6dce5;
}

.progress-bar {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff9bbb, #f45e92);
}

.progress-text {
    margin: 10px 0 0;
    color: #d8678e;
    font-weight: bold;
}


/* 手机适配 */

@media (max-height: 700px) {

    .cat-area {
        width: min(42vw, 210px);
        height: min(42vw, 210px);
        margin-bottom: 12px;
    }

    .message-card {
        padding: 18px;
    }
}
/* 照片展示场景 */

.photo-scene {
    z-index: 30;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at center,
            #fffdfd 0%,
            #ffe8ef 55%,
            #ffd5e3 100%
        );
}

.photo-scene-title {
    position: absolute;
    z-index: 50;
    top: 5%;
    width: 90%;
    text-align: center;
}

.photo-scene-title p {
    margin: 0 0 7px;
    color: #d77094;
    font-size: 15px;
}

.photo-scene-title h2 {
    margin: 0;
    color: #684a56;
    font-size: clamp(21px, 5vw, 31px);
}

.photo-stage {
    position: relative;
    width: min(82vw, 410px);
    height: min(105vw, 550px);
    margin-top: 45px;
}

.memory-photo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(72vw, 350px);
    height: min(88vw, 460px);
    padding: 10px 10px 42px;
    object-fit: cover;
    border-radius: 9px;
    background: white;
    box-shadow:
        0 20px 45px rgba(91, 54, 68, 0.24),
        0 4px 10px rgba(91, 54, 68, 0.13);
    transform: translate(-50%, -50%);
}

.photo-caption {
    position: relative;
    z-index: 60;
    min-height: 38px;
    margin: 15px 0 0;
    padding: 9px 20px;
    color: #bd5e82;
    text-align: center;
    font-size: clamp(16px, 4vw, 20px);
    font-weight: bold;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 8px 25px rgba(149, 76, 102, 0.12);
    backdrop-filter: blur(6px);
}

@media (max-height: 700px) {

    .photo-stage {
        width: min(66vw, 320px);
        height: min(75vw, 390px);
        margin-top: 45px;
    }

    .memory-photo {
        width: min(57vw, 280px);
        height: min(68vw, 355px);
    }

    .photo-caption {
        margin-top: 7px;
    }
}
/* =================================
   最终马赛克场景
================================= */

.final-scene {
    z-index: 40;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 18px 14px 28px;
    overflow-y: auto;
    overflow-x: hidden;
    background:
        radial-gradient(
            circle at center,
            #fffdfd 0%,
            #ffeaf1 48%,
            #ffd4e2 100%
        );
}

.mosaic-container {
    position: relative;
    z-index: 5;
    width: min(94vw, 900px);
    min-height: 72vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1vh;
}

.mosaic-image {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border: 8px solid rgba(255, 255, 255, 0.92);
    border-radius: 22px;
    box-shadow:
        0 28px 70px rgba(111, 55, 78, 0.28),
        0 10px 24px rgba(111, 55, 78, 0.16);
}

.mosaic-glow {
    position: absolute;
    z-index: 1;
    inset: -25px;
    border-radius: 35px;
    background: rgba(255, 118, 165, 0.35);
    filter: blur(30px);
    opacity: 0;
}

.final-text-box {
    position: relative;
    z-index: 10;
    width: min(92vw, 720px);
    margin-top: 20px;
    padding: 18px 20px;
    text-align: center;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 16px 40px rgba(120, 66, 87, 0.14);
    backdrop-filter: blur(8px);
}

.final-line {
    margin: 8px 0;
    color: #704d5a;
    font-size: clamp(15px, 3.8vw, 20px);
    line-height: 1.7;
}

.final-important {
    margin-top: 15px;
    color: #e85388;
    font-size: clamp(18px, 4.8vw, 25px);
    font-weight: bold;
}

.ending-cat-area {
    position: relative;
    z-index: 12;
    width: min(92vw, 560px);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
}

.ending-cat {
    width: min(25vw, 125px);
    height: min(25vw, 125px);
    object-fit: contain;
}

.ending-message {
    max-width: 360px;
    padding: 13px 17px;
    text-align: left;
    border: 2px solid rgba(255, 126, 167, 0.25);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 28px rgba(125, 65, 87, 0.13);
}

.ending-message p {
    margin: 0 0 7px;
    color: #b65f7f;
    line-height: 1.5;
}

.ending-message strong {
    color: #684a56;
    line-height: 1.6;
}

.replay-button {
    position: relative;
    z-index: 15;
    margin-top: 15px;
    padding: 13px 28px;
    border: 0;
    border-radius: 999px;
    color: white;
    cursor: pointer;
    font-size: 17px;
    font-weight: bold;
    background: linear-gradient(135deg, #ff89af, #ed5c91);
    box-shadow: 0 10px 25px rgba(233, 79, 134, 0.3);
}


/* 花瓣 */

.petal-container {
    position: absolute;
    z-index: 3;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.petal {
    position: absolute;
    top: -60px;
    color: rgba(255, 111, 157, 0.72);
    user-select: none;
    pointer-events: none;
}


/* 汇聚用小照片 */

.flying-memory {
    position: fixed;
    z-index: 100;
    width: 78px;
    height: 78px;
    object-fit: cover;
    border: 3px solid white;
    border-radius: 10px;
    box-shadow: 0 7px 20px rgba(82, 40, 58, 0.24);
}


/* 手机适配 */

@media (max-height: 760px) {

    .mosaic-container {
        width: min(90vw, 720px);
        min-height: 62vh;
    }

    .mosaic-image {
        max-height: 66vh;
    }

    .final-text-box {
        margin-top: 8px;
    }

    .final-line {
        margin: 4px 0;
        line-height: 1.5;
    }

    .ending-cat-area {
        margin-top: 5px;
    }

    .ending-cat {
        width: min(18vw, 90px);
        height: min(18vw, 90px);
    }

    .ending-message {
        padding: 9px 13px;
        font-size: 13px;
    }

    .replay-button {
        margin-top: 8px;
        padding: 10px 24px;
    }
}

@media (max-width: 520px) {

    .ending-cat-area {
        flex-direction: column;
        gap: 4px;
    }

    .ending-message {
        text-align: center;
    }
}

.praise-words {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px 12px;
    margin-top: 6px;
    text-align: center;
}

.praise-words span {
    display: inline-block;
    padding: 7px 15px;
    color: white;
    border-radius: 999px;
    font-size: clamp(19px, 5vw, 27px);
    font-weight: bold;
    background: linear-gradient(135deg, #ff8db2, #ed5b90);
    box-shadow: 0 8px 20px rgba(231, 80, 132, 0.24);
}

.praise-words strong {
    display: block;
    width: 100%;
    margin-top: 7px;
    color: #e85388;
    font-size: clamp(19px, 4.8vw, 25px);
}

/* =================================
   多题问答
================================= */

.question-reaction {
    min-height: 58px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 4px 0 2px;
    font-size: 44px;
    line-height: 1;
}

#questionNumber {
    display: inline-block;
    padding: 5px 13px;
    border-radius: 999px;
    background: #fff0f5;
    color: #d7668e;
    font-weight: bold;
}

#questionText {
    min-height: 92px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#questionCard .answer-hint {
    min-height: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2px auto 14px;
}

@media (max-height: 700px) {

    .question-reaction {
        min-height: 42px;
        font-size: 34px;
    }

    #questionText {
        min-height: 70px;
        margin-top: 4px;
        margin-bottom: 8px;
    }

    #questionCard .answer-hint {
        min-height: 38px;
        margin-bottom: 8px;
        font-size: 14px;
    }
}

/* =================================
   猫咪素材系统
================================= */

.gift-box {
    position: absolute;
    z-index: 1;
    bottom: -5px;
    left: 50%;
    width: 46%;
    transform: translateX(-50%);
    object-fit: contain;
}

.cat-image {
    z-index: 3;
}

.landing-decoration {
    position: absolute;
    z-index: 4;
    width: 45px;
    pointer-events: none;
}

.landing-star {
    top: 25%;
    right: 5%;
}

.landing-love {
    top: 42%;
    left: 3%;
}


/* 主要背景装饰 */

.main-decorations {
    position: absolute;
    z-index: 1;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.scene-decoration {
    position: absolute;
    object-fit: contain;
    opacity: 0.7;
}

.decoration-balloon {
    top: 7%;
    left: 4%;
    width: min(14vw, 80px);
    animation: floatingDecoration 4s ease-in-out infinite;
}

.decoration-ribbon {
    top: 8%;
    right: 5%;
    width: min(14vw, 85px);
    animation: floatingDecoration 4.5s ease-in-out infinite reverse;
}

.decoration-toy {
    bottom: 4%;
    left: 5%;
    width: min(14vw, 75px);
    transform: rotate(-15deg);
}

.decoration-toy-two {
    right: 5%;
    bottom: 4%;
    width: min(14vw, 80px);
    transform: rotate(12deg);
}

@keyframes floatingDecoration {

    0%,
    100% {
        transform: translateY(0) rotate(-3deg);
    }

    50% {
        transform: translateY(-13px) rotate(4deg);
    }
}


/* 问答猫咪 */

.question-reaction {
    min-height: 95px;
    height: 95px;
}

.question-cat {
    display: block;
    width: 100px;
    height: 95px;
    object-fit: contain;
}


/* 加载小猫 */

.evidence-cat-stage {
    position: relative;
    width: 100%;
    height: 105px;
    overflow: hidden;
    margin-bottom: 4px;
}

.running-cat {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 12px;
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.foot-steps {
    position: absolute;
    z-index: 1;
    left: 5%;
    right: 5%;
    bottom: 4px;
    height: 30px;
}

.walking-paw {
    position: absolute;
    bottom: 0;
    width: 22px;
    height: 22px;
    object-fit: contain;
}


/* 照片场景装饰 */

.photo-decorations {
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
}

.photo-decoration {
    position: absolute;
    width: 45px;
    object-fit: contain;
    opacity: 0.75;
    animation: floatingDecoration 4s ease-in-out infinite;
}

.photo-love {
    top: 16%;
    left: 5%;
}

.photo-star {
    top: 24%;
    right: 6%;
}

.photo-paw {
    left: 7%;
    bottom: 12%;
}

.photo-ribbon {
    right: 5%;
    bottom: 10%;
    width: 60px;
}

.photo-side-cat {
    position: absolute;
    z-index: 65;
    right: 2%;
    bottom: 1%;
    width: min(25vw, 145px);
    object-fit: contain;
    pointer-events: none;
}


/* BOOM 猫 */

.boom-cat {
    position: fixed;
    z-index: 150;
    top: 50%;
    left: 50%;
    width: min(46vw, 260px);
    transform: translate(-50%, -50%);
    object-fit: contain;
    pointer-events: none;
}


/* 最终场景装饰 */

.final-decorations {
    position: fixed;
    z-index: 4;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.final-decoration {
    position: absolute;
    object-fit: contain;
    opacity: 0.7;
    animation: floatingDecoration 4.5s ease-in-out infinite;
}

.final-balloon {
    left: 3%;
    bottom: 6%;
    width: min(13vw, 80px);
}

.final-star-one {
    top: 10%;
    left: 4%;
    width: 42px;
}

.final-star-two {
    top: 18%;
    right: 4%;
    width: 34px;
    animation-delay: 0.7s;
}

.final-love {
    right: 5%;
    bottom: 22%;
    width: 45px;
}

.final-ribbon {
    top: 3%;
    right: 5%;
    width: min(14vw, 80px);
}


/* 结尾猫咪和箱子 */

.ending-cat-wrapper {
    position: relative;
    width: 145px;
    min-width: 145px;
    height: 135px;
}

.ending-cat {
    position: absolute;
    z-index: 2;
    left: 0;
    bottom: 13px;
    width: 110px;
    height: 110px;
}

.ending-box {
    position: absolute;
    z-index: 1;
    right: 0;
    bottom: 0;
    width: 72px;
    object-fit: contain;
}


@media (max-width: 520px) {

    .question-reaction {
        min-height: 78px;
        height: 78px;
    }

    .question-cat {
        width: 82px;
        height: 78px;
    }

    .photo-side-cat {
        width: 92px;
    }

    .ending-cat-wrapper {
        width: 125px;
        min-width: 125px;
        height: 115px;
    }

    .ending-cat {
        width: 92px;
        height: 92px;
    }

    .ending-box {
        width: 60px;
    }
}

.password-screen{
    z-index:9999;
    display:flex;
    justify-content:center;
    align-items:center;
    background:#fff6f8;
}

.password-card{
    width:min(90vw,360px);
    padding:35px;
    border-radius:25px;
    text-align:center;
    background:white;
    box-shadow:0 20px 40px rgba(0,0,0,.08);
}

.password-card h2{
    margin-bottom:15px;
    color:#e85f91;
}

.password-card p{
    color:#666;
}

#passwordInput{
    width:100%;
    padding:15px;
    margin-top:20px;
    border-radius:12px;
    border:2px solid #ffd2df;
    font-size:22px;
    text-align:center;
    outline:none;
}

#passwordButton{
    width:100%;
    margin-top:18px;
    padding:14px;
    border:none;
    border-radius:999px;
    background:#ff78a8;
    color:white;
    font-size:18px;
    cursor:pointer;
}

.password-error{
    margin-top:15px;
    color:#e74c3c;
    font-weight:bold;
    min-height:22px;
}
