@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=Noto+Serif+SC:wght@400;700&display=swap');

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Noto Serif SC', serif;
}

.app {
    width: 100%;
    height: 100%;
    position: relative;
}

.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    z-index: 0;
}

.page.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.bg-layer-1 {
    background: linear-gradient(180deg, #ff9a6c 0%, #ffd93d 50%, #ff9a6c 100%);
}

.bg-layer-1::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M0,100 L0,70 Q25,60 50,70 T100,70 L100,100 Z" fill="%238b5a2b" opacity="0.3"/></svg>');
    background-size: cover;
}

.kite-line {
    position: absolute;
    bottom: 20%;
    left: 50%;
    width: 2px;
    height: 60%;
    background: linear-gradient(to top, #333, transparent);
    transform-origin: bottom center;
    animation: kiteLineFlow 4s ease-in-out infinite;
}

@keyframes kiteLineFlow {
    0%, 100% { transform: translateX(-50%) rotate(-5deg); }
    50% { transform: translateX(-50%) rotate(5deg); }
}

.kite {
    position: absolute;
    top: 15%;
    left: 50%;
    width: 80px;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 100"><path d="M40,5 L70,50 L40,95 L10,50 Z" fill="%23ffd93d"/><path d="M40,20 L40,80" stroke="%23333" stroke-width="2"/><path d="M40,50 L25,40 M40,50 L55,40 M40,50 L25,60 M40,50 L55,60" stroke="%23333" stroke-width="1.5"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    transform: translateX(-50%);
    animation: kiteFloat 3s ease-in-out infinite;
}

@keyframes kiteFloat {
    0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
    25% { transform: translateX(-50%) translateY(-10px) rotate(3deg); }
    50% { transform: translateX(-50%) translateY(-5px) rotate(0deg); }
    75% { transform: translateX(-50%) translateY(-10px) rotate(-3deg); }
}

.title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 32px;
    color: #fff;
    text-align: center;
    margin-bottom: 60px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 2s ease forwards;
    opacity: 0;
}

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

.btn-start {
    padding: 15px 40px;
    font-size: 20px;
    font-family: 'Ma Shan Zheng', cursive;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 30px;
    color: #ff9a6c;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeInUp 2s ease 0.5s forwards;
    opacity: 0;
}

.btn-start:hover {
    background: #fff;
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.wind-sound {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease;
}

.wind-sound::after {
    content: '🔊';
    font-size: 20px;
}

.wind-sound.muted::after {
    content: '🔇';
}

.bg-layer-2 {
    background: linear-gradient(180deg, #a8e6cf 0%, #dcedc1 100%);
}

.wind-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.wind-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: windFloat 4s ease-in-out infinite;
}

.wind-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
}

.wind-icon span {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 24px;
    color: #333;
}

.wind-icon-1 { animation-delay: 0s; }
.wind-icon-2 { animation-delay: 0.5s; }
.wind-icon-3 { animation-delay: 1s; }

@keyframes windFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(3deg); }
    50% { transform: translateY(-5px) rotate(0deg); }
    75% { transform: translateY(-15px) rotate(-3deg); }
}

.intro-text {
    font-size: 18px;
    color: #555;
    text-align: center;
    line-height: 1.8;
    animation: fadeIn 3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.scroll-hint {
    position: absolute;
    bottom: 30px;
    font-size: 30px;
    color: #666;
    animation: bounce 2s ease-in-out infinite;
    cursor: pointer;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

.bg-layer-3 {
    background: linear-gradient(180deg, #87ceeb 0%, #98d8c8 50%, #f7dc6f 100%);
}

.person-on-kite {
    width: 150px;
    height: 200px;
    margin-bottom: 30px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 200"><ellipse cx="75" cy="50" rx="60" ry="70" fill="%23ffd93d"/><rect x="60" y="120" width="30" height="60" fill="%235d4037"/><circle cx="75" cy="115" r="20" fill="%23f5deb3"/><line x1="75" y1="50" x2="75" y2="200" stroke="%23333" stroke-width="2"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    animation: kiteFloat 4s ease-in-out infinite;
}

.section-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 28px;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.desc-text {
    font-size: 16px;
    color: #fff;
    text-align: center;
    line-height: 1.8;
    margin-bottom: 40px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.btn-test {
    padding: 15px 40px;
    font-size: 20px;
    font-family: 'Ma Shan Zheng', cursive;
    background: #ff9a6c;
    border: none;
    border-radius: 30px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-test:hover {
    background: #ff7f50;
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.bg-layer-4, .bg-layer-5, .bg-layer-6, .bg-layer-7, .bg-layer-8 {
    background: linear-gradient(180deg, #fff5e6 0%, #ffeaa7 100%);
}

.question-container {
    width: 100%;
    max-width: 400px;
    background: rgba(255,255,255,0.8);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.question-num {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 32px;
    color: #ff9a6c;
}

.question-progress {
    font-size: 14px;
    color: #999;
}

.question-title {
    font-size: 20px;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.5;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.option {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fff;
    border-radius: 15px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-right: 15px;
}

.option span {
    font-size: 15px;
    color: #555;
    flex: 1;
}

.option:hover {
    border-color: #ff9a6c;
    background: #fff5e6;
}

.option.selected {
    border-color: #ff9a6c;
    background: #ffeaa7;
    animation: selectedPulse 0.5s ease;
}

@keyframes selectedPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.bg-layer-9 {
    background: linear-gradient(180deg, #ff9a6c 0%, #ffd93d 50%, #87ceeb 100%);
}

.kite-flying {
    width: 100px;
    height: 120px;
    margin-bottom: 30px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 100"><path d="M40,5 L70,50 L40,95 L10,50 Z" fill="%23ffd93d"/><path d="M40,20 L40,80" stroke="%23333" stroke-width="2"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    animation: kiteFlyUp 3s ease-out forwards;
}

@keyframes kiteFlyUp {
    0% { transform: translateY(50px) scale(0.5); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

.transition-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 32px;
    color: #fff;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeIn 2s ease;
}

.bg-layer-10 {
    background: linear-gradient(180deg, #87ceeb 0%, #b8e0d2 100%);
}

.result-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    background-size: contain;
    background-repeat: no-repeat;
}

.result-type {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 32px;
    color: #333;
    text-align: center;
    margin-bottom: 15px;
}

.result-desc {
    font-size: 16px;
    color: #666;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 25px;
    padding: 0 20px;
}

.keywords-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.keyword {
    padding: 8px 16px;
    background: rgba(255,154,108,0.2);
    border-radius: 20px;
    font-size: 14px;
    color: #ff9a6c;
}

.btn-detail, .btn-continue {
    padding: 12px 30px;
    font-size: 18px;
    font-family: 'Ma Shan Zheng', cursive;
    background: #ff9a6c;
    border: none;
    border-radius: 25px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-detail:hover, .btn-continue:hover {
    background: #ff7f50;
    transform: scale(1.05);
}

.bg-layer-11 {
    background: linear-gradient(180deg, #dcedc1 0%, #a8e6cf 100%);
}

.village-scene {
    width: 200px;
    height: 150px;
    margin-bottom: 20px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 150"><rect x="50" y="80" width="60" height="40" fill="%238b5a2b"/><rect x="70" y="90" width="20" height="20" fill="%23fff"/><polygon points="50,80 80,50 110,80" fill="%235d4037"/><rect x="120" y="90" width="50" height="30" fill="%23a0522d"/><circle cx="145" cy="105" r="10" fill="%238b4513"/><path d="M0,140 Q50,120 100,135 T200,120 L200,150 L0,150 Z" fill="%23228b22"/><circle cx="30" cy="70" r="25" fill="%23228b22"/><circle cx="170" cy="60" r="20" fill="%23228b22"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

.detail-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 26px;
    color: #333;
    text-align: center;
    margin-bottom: 15px;
}

.detail-text {
    font-size: 16px;
    color: #555;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 20px;
}

.detail-expand {
    width: 100%;
    max-width: 350px;
    background: rgba(255,255,255,0.7);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.detail-expand p {
    font-size: 15px;
    color: #666;
    line-height: 1.8;
    text-align: justify;
}

.bg-layer-12 {
    background: linear-gradient(180deg, #fff8dc 0%, #fffacd 100%);
}

.letter-paper {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
}

.letter-paper::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px dashed #ddd;
    border-radius: 10px;
}

.letter-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 24px;
    color: #333;
    text-align: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.letter-hint {
    font-size: 14px;
    color: #999;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.letter-input {
    width: 100%;
    height: 80px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Noto Serif SC', serif;
    resize: none;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.preset-messages {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.preset-btn {
    padding: 8px 15px;
    font-size: 13px;
    background: rgba(255,154,108,0.1);
    border: 1px solid #ff9a6c;
    border-radius: 20px;
    color: #ff9a6c;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    background: #ff9a6c;
    color: #fff;
}

.btn-generate {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-family: 'Ma Shan Zheng', cursive;
    background: #ff9a6c;
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.btn-generate:hover {
    background: #ff7f50;
    transform: scale(1.02);
}

.bg-layer-13 {
    background: linear-gradient(180deg, #ff9a6c 0%, #ffd93d 100%);
}

.poster-container {
    width: 100%;
    max-width: 320px;
    background: #fff;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.poster-header {
    text-align: center;
    margin-bottom: 20px;
}

.poster-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 24px;
    color: #ff9a6c;
}

.poster-content {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.poster-result {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 28px;
    color: #333;
    margin-bottom: 15px;
}

.poster-message {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

.poster-footer {
    text-align: center;
    margin-top: 20px;
}

.poster-footer span {
    font-size: 12px;
    color: #999;
}

.share-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 26px;
    color: #fff;
    text-align: center;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.share-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.share-btn {
    padding: 12px 25px;
    font-size: 16px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 25px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: #fff;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-save {
    padding: 12px 40px;
    font-size: 18px;
    font-family: 'Ma Shan Zheng', cursive;
    background: #fff;
    border: none;
    border-radius: 25px;
    color: #ff9a6c;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save:hover {
    background: #fff5e6;
    transform: scale(1.05);
}

.bg-layer-14 {
    background: linear-gradient(180deg, #333 0%, #555 100%);
}

.end-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 36px;
    color: #ffd93d;
    text-align: center;
    margin-bottom: 20px;
}

.end-text {
    font-size: 18px;
    color: #fff;
    text-align: center;
    line-height: 2;
    margin-bottom: 40px;
}

.end-buttons {
    display: flex;
    gap: 30px;
}

.btn-replay {
    padding: 15px 35px;
    font-size: 18px;
    font-family: 'Ma Shan Zheng', cursive;
    background: #ff9a6c;
    border: none;
    border-radius: 25px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-replay:hover {
    background: #ff7f50;
    transform: scale(1.05);
}

.btn-close {
    padding: 15px 35px;
    font-size: 18px;
    font-family: 'Ma Shan Zheng', cursive;
    background: transparent;
    border: 2px solid #fff;
    border-radius: 25px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background: #fff;
    color: #333;
}

@media (max-width: 480px) {
    .title { font-size: 26px; }
    .question-title { font-size: 18px; }
    .option span { font-size: 14px; }
    .result-type { font-size: 28px; }
    .result-desc { font-size: 15px; }
}

@media (max-height: 600px) {
    .content { padding: 10px; }
    .title { margin-bottom: 30px; }
    .btn-start { padding: 12px 30px; font-size: 18px; }
    .section-title { font-size: 22px; }
    .desc-text { font-size: 14px; margin-bottom: 20px; }
}