* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    background-color: #000;
    background-image: url('1.png');
    background-repeat: no-repeat;
    background-size: 400px 600px;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 0;
    padding: 0;
    padding-top: calc((100vh - 600px) / 2);
}

/* 首页样式 */
.landing-page {
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    transform: translateY(-2.5em);
}

.landing-page .content {
    padding: 0;
    max-width: 90%;
    width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.landing-page .subtitle {
    color: #000000;
    font-size: 1.2em;
    margin-bottom: 8px;
    letter-spacing: 2px;
    font-family: "SimSun", "宋体", serif;
    font-weight: 1000;
}

.landing-page h1 {
    font-size: 2.5em;
    margin-bottom: 12px;
    letter-spacing: 3px;
    color: #000000;
    font-weight: 1000;
    font-family: "SimSun", "宋体", serif;
}

.landing-page .author {
    color: rgb(227, 186, 110);
    font-size: 1em;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.landing-page .description {
    color: #000000;
    font-size: 1.1em;
    margin-bottom: 20px;
    letter-spacing: 1px;
    max-width: 350px;
    font-family: "SimSun", "宋体", serif;
    font-weight: 1000;
}

.start-button {
    background: 
        linear-gradient(145deg, rgba(45, 15, 45, 0.8), rgba(74, 26, 74, 0.8)),
        radial-gradient(circle at 25% 25%, rgba(139, 69, 19, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 75% 75%, rgba(160, 82, 45, 0.1) 0%, transparent 60%),
        repeating-linear-gradient(45deg, transparent, transparent 1px, rgba(0, 0, 0, 0.1) 1px, rgba(0, 0, 0, 0.1) 2px),
        repeating-linear-gradient(-45deg, transparent, transparent 2px, rgba(139, 69, 19, 0.05) 2px, rgba(139, 69, 19, 0.05) 4px);
    color: #ffd700;
    border: 2px solid rgba(210, 105, 30, 0.6);
    padding: 12px 35px;
    font-size: 1.2em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 4px;
    margin-top: 45px;
    font-weight: 1000;
    font-family: "SimSun", "宋体", serif;
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.6),
        0 0 8px rgba(255, 215, 0, 0.4);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 215, 0, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(139, 69, 19, 0.3);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.start-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(139, 69, 19, 0.2) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(160, 82, 45, 0.15) 0%, transparent 30%),
        radial-gradient(circle at 50% 20%, rgba(0, 0, 0, 0.1) 0%, transparent 25%),
        linear-gradient(90deg, transparent 0%, rgba(139, 69, 19, 0.1) 20%, transparent 40%, rgba(160, 82, 45, 0.1) 60%, transparent 80%);
    border-radius: 50px;
    pointer-events: none;
}

.start-button .left-rivet {
    content: '';
    position: absolute;
    top: 50%;
    left: 8px;
    width: 10px;
    height: 10px;
    background: 
        radial-gradient(circle, rgba(255, 215, 0, 0.8) 30%, rgba(184, 134, 11, 0.8) 60%, rgba(139, 69, 19, 0.8) 100%),
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.3),
        inset 0 -1px 2px rgba(0, 0, 0, 0.4),
        0 1px 2px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(139, 69, 19, 0.3);
}

.start-button::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 8px;
    width: 10px;
    height: 10px;
    background: 
        radial-gradient(circle, rgba(255, 215, 0, 0.8) 30%, rgba(184, 134, 11, 0.8) 60%, rgba(139, 69, 19, 0.8) 100%),
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.3),
        inset 0 -1px 2px rgba(0, 0, 0, 0.4),
        0 1px 2px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(139, 69, 19, 0.3);
}

.start-button:hover {
    background: 
        linear-gradient(145deg, rgba(61, 31, 61, 0.9), rgba(90, 42, 90, 0.9)),
        radial-gradient(circle at 25% 25%, rgba(139, 69, 19, 0.2) 0%, transparent 60%),
        radial-gradient(circle at 75% 75%, rgba(160, 82, 45, 0.15) 0%, transparent 60%),
        repeating-linear-gradient(45deg, transparent, transparent 1px, rgba(0, 0, 0, 0.15) 1px, rgba(0, 0, 0, 0.15) 2px),
        repeating-linear-gradient(-45deg, transparent, transparent 2px, rgba(139, 69, 19, 0.08) 2px, rgba(139, 69, 19, 0.08) 4px);
    color: #ffff00;
    transform: translateY(-1px);
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 215, 0, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(139, 69, 19, 0.4);
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.6),
        0 0 12px rgba(255, 255, 0, 0.6);
}

/* 主内容页面样式 */
.main-content {
    min-height: 100vh;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin-top: calc(5vh - 3em);
}

.container {
    width: 400px;
    max-width: 400px;
    padding: 15px 30px;
    margin: 0 auto;
    text-align: center;
    margin-top: 20px;
}

.container header {
    text-align: center;
    position: relative;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container header h1 {
    font-size: 1.1em;
    color: #000000;
    position: relative;
    display: inline-block;
    padding: 0 25px;
    text-shadow: none;
    font-weight: bold;
    margin-bottom: 12px;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.container header h1::before,
.container header h1::after {
    width: 30px;
    height: 22px;
}

.instructions {
    background-color: rgba(255, 255, 255, 0.06);
    padding: 15px;
    margin: 0 -30px 20px -30px;
    max-width: calc(100% + 60px);
    width: calc(100% + 60px);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.instructions ul {
    list-style-type: none;
    padding: 0 15px;
    margin: 0;
}

.instructions li {
    margin-bottom: 12px;
    color: #000000;
    padding-left: 1.5em;
    padding-right: 1em;
    font-size: 0.85em;
    position: relative;
    text-shadow: none;
    line-height: 1.6;
    text-align: left;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.instructions li:last-child {
    margin-bottom: 0;
}

.instructions li::before {
    content: "•";
    position: absolute;
    left: 0.5em;
    color: #000000;
    font-weight: bold;
    font-size: 1.2em;
    line-height: 1;
}

.instructions {
    counter-reset: item;
}

.instructions li:nth-child(1) { animation-delay: 0.4s; }
.instructions li:nth-child(2) { animation-delay: 0.8s; }
.instructions li:nth-child(3) { animation-delay: 1.2s; }
.instructions li:nth-child(4) { animation-delay: 1.6s; }
.instructions li:nth-child(5) { animation-delay: 2.0s; }

.answer-section {
    text-align: center;
    margin-bottom: 20px;
    padding: 0 10px;
    margin-top: 25px;
}

.page-input {
    width: 80px;
    padding: 6px 8px;
    font-size: 0.85em;
    border: 1px solid rgba(139, 69, 19, 0.6);
    border-radius: 8px;
    margin-right: 6px;
    text-align: center;
    background: 
        linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(240, 240, 240, 0.8)),
        radial-gradient(circle at 20% 20%, rgba(139, 69, 19, 0.1) 0%, transparent 50%);
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 2.4s;
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.3),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 去掉 Firefox 的上下选择按钮 */
.page-input::-webkit-outer-spin-button,
.page-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.page-input:hover {
    border-color: rgba(0, 0, 0, 0.3);
    background-color: rgba(255, 255, 255, 0.8);
}

.page-input:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.4);
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
}

.input-group {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: min(30px, 3vw);
}

.random-answer-button {
    margin: 12px auto 0;
    padding: 8px 30px;
    font-size: 0.8em;
    border-radius: 8px;
    background: 
        linear-gradient(145deg, rgba(45, 15, 45, 0.9), rgba(74, 26, 74, 0.9)),
        radial-gradient(circle at 25% 25%, rgba(139, 69, 19, 0.2) 0%, transparent 60%);
    border: 1px solid rgba(184, 134, 11, 0.8);
    color: #ffd700;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 2.4s;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: "SimSun", "宋体", serif;
    font-weight: bold;
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.8),
        0 0 6px rgba(255, 215, 0, 0.5);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 215, 0, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.random-answer-button:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.random-answer-button:hover {
    background: 
        linear-gradient(145deg, rgba(61, 31, 61, 0.95), rgba(90, 42, 90, 0.95)),
        radial-gradient(circle at 25% 25%, rgba(139, 69, 19, 0.3) 0%, transparent 60%);
    color: #ffff00;
    transform: translateY(-1px);
    box-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 215, 0, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4);
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.8),
        0 0 8px rgba(255, 255, 0, 0.7);
}

.answer-button {
    padding: 8px 20px;
    font-size: 0.8em;
    border-radius: 8px;
    background: 
        linear-gradient(145deg, rgba(45, 15, 45, 0.9), rgba(74, 26, 74, 0.9)),
        radial-gradient(circle at 25% 25%, rgba(139, 69, 19, 0.2) 0%, transparent 60%);
    border: 1px solid rgba(184, 134, 11, 0.8);
    color: #ffd700;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 2.4s;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: "SimSun", "宋体", serif;
    font-weight: bold;
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.8),
        0 0 6px rgba(255, 215, 0, 0.5);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 215, 0, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.answer-button:hover {
    background: 
        linear-gradient(145deg, rgba(61, 31, 61, 0.95), rgba(90, 42, 90, 0.95)),
        radial-gradient(circle at 25% 25%, rgba(139, 69, 19, 0.3) 0%, transparent 60%);
    color: #ffff00;
    transform: translateY(-1px);
    box-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 215, 0, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4);
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.8),
        0 0 8px rgba(255, 255, 0, 0.7);
}

.answer-display {
    margin-top: 15px;
    padding: 15px 20px;
    background-color: transparent;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: min(30px, 3vw);
}

.answer-display.hidden {
    display: none;
}

.hidden {
    display: none;
}

.answer-display h3 {
    color: #000000;
    margin-bottom: min(15px, 1.5vw);
    font-size: clamp(1.2em, 2.4vw, 1.4em);
    text-shadow: none;
    text-align: center;
}

.h3-line {
    margin-bottom: 10px;
    line-height: 1.8;
    text-align: center;
    font-size: 20px;
}

#answer {
    font-size: clamp(1.1em, 2.2vw, 1.3em);
    color: #000000;
    margin: min(15px, 1.5vw) 0;
    font-weight: bold;
    text-shadow: none;
    line-height: 1.8;
}

.try-again-button {
    background: 
        linear-gradient(145deg, rgba(45, 15, 45, 0.9), rgba(74, 26, 74, 0.9)),
        radial-gradient(circle at 25% 25%, rgba(139, 69, 19, 0.2) 0%, transparent 60%);
    border: 1px solid rgba(184, 134, 11, 0.8);
    color: #ffd700;
    padding: 8px 30px;
    font-size: 0.8em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    margin-top: 20px;
    font-family: "SimSun", "宋体", serif;
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.8),
        0 0 6px rgba(255, 215, 0, 0.5);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 215, 0, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    width: auto;
}

.try-again-button:hover {
    background: 
        linear-gradient(145deg, rgba(61, 31, 61, 0.95), rgba(90, 42, 90, 0.95)),
        radial-gradient(circle at 25% 25%, rgba(139, 69, 19, 0.3) 0%, transparent 60%);
    color: #ffff00;
    transform: translateY(-1px);
    box-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 215, 0, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4);
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.8),
        0 0 8px rgba(255, 255, 0, 0.7);
}

.qr-container {
    position: absolute;
    top: calc((100vh - 600px) / 2 + 600px + 40px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    width: 400px;
    background-color: rgba(64, 64, 64, 0.85);
    padding: 12px 15px;
    border-radius: 10px;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page3-image {
    position: static;
    max-width: 50px;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: none;
}

.page3-image.show {
    opacity: 1;
}

.qr-description {
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: left;
    max-width: 280px;
}

.qr-description p {
    margin: 0;
    padding: 0;
    font-size: 11px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
    white-space: normal;
    word-wrap: break-word;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.page3-image.show + .qr-description {
    opacity: 1;
}

@media (max-width: 600px) {
    body {
        padding-top: calc((100vh - 600px) / 2);
    }
    
    .qr-container {
        width: 90%;
        max-width: 400px;
        top: calc((100vh - 600px) / 2 + 600px + 30px);
        padding: 10px 12px;
    }
    
    .qr-description p {
        font-size: 10px;
        line-height: 1.6;
    }
    
    .page3-image {
        max-width: 45px;
    }

    .main-content {
        margin-top: 2vh;
    }

    .container {
        width: 90%;
        max-width: 400px;
        padding: 15px 20px;
    }

    .instructions {
        margin: 0 -20px 15px -20px;
        max-width: calc(100% + 40px);
        width: calc(100% + 40px);
        padding: 12px;
    }

    .instructions ul {
        padding: 0 10px;
    }

    .instructions li {
        font-size: 0.9em;
        margin-bottom: 10px;
        padding-left: 1.5em;
        padding-right: 1em;
        line-height: 1.5;
    }

    .page-input {
        width: 70px;
        padding: 5px 6px;
        font-size: 0.8em;
    }

    .answer-button {
        padding: 5px 14px;
        font-size: 0.85em;
    }
}

.answer-chinese {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.answer-english {
    font-size: 16px;
    color: #666;
    font-style: italic;
    text-align: center;
    line-height: 1.5;
    margin-top: 8px;
}

.answer-line {
    margin-bottom: 10px;
    line-height: 1.8;
    text-align: center;
    letter-spacing: 2px;
    white-space: pre;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    font-size: 18px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
