* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.app {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* 页面切换 */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* 首页 */
.hero {
    text-align: center;
    padding: 40px 20px 20px;
}

.hero-emoji {
    font-size: 64px;
    margin-bottom: 16px;
}

.hero h1 {
    margin: 0 0 8px;
    font-size: 28px;
    color: #fff;
}

.hero p {
    margin: 0;
    font-size: 16px;
    color: rgba(255,255,255,0.9);
}

/* 介绍区 */
.intro-box {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    margin: 20px 0 32px;
    text-align: center;
}

.de-trio {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.de-card {
    width: 70px;
    height: 90px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.de-white {
    background: #fff;
    border: 3px solid #e74c3c;
}

.de-yellow {
    background: #ffeaa7;
    border: 3px solid #f39c12;
}

.de-black {
    background: #636e72;
    border: 3px solid #2d3436;
}

.de-char {
    font-size: 40px;
    font-weight: 800;
}

.de-white .de-char { color: #e74c3c; }
.de-yellow .de-char { color: #d35400; }
.de-black .de-char { color: #fff; }

.intro-tip {
    color: #666;
    font-size: 15px;
    margin: 0;
}

/* 开始按钮 */
.start-btn {
    width: 100%;
    background: #fff;
    border: none;
    border-radius: 16px;
    padding: 20px;
    font-size: 20px;
    font-weight: 700;
    color: #764ba2;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.start-btn:hover {
    transform: translateY(-2px);
}

.start-btn:active {
    transform: translateY(0);
}

/* 游戏页面 */
.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 20px;
}

.back-btn {
    background: rgba(255,255,255,0.9);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}

.level-text {
    font-size: 18px;
    color: #fff;
    font-weight: 600;
}

/* 题目区 */
.question-box {
    background: #fff;
    border-radius: 20px;
    padding: 40px 24px;
    text-align: center;
    margin-bottom: 24px;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.question-text {
    font-size: 28px;
    color: #333;
    margin: 0;
    line-height: 1.5;
}

/* 选项 */
.options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.option-btn {
    background: #fff;
    border: 3px solid #e0e0e0;
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.option-btn.correct {
    border-color: #27ae60;
    background: #d5f5e3;
}

.option-btn.wrong {
    border-color: #e74c3c;
    background: #fadbd8;
}

.option-btn.disabled {
    pointer-events: none;
    opacity: 0.6;
}

.option-char {
    font-size: 42px;
    font-weight: 800;
}

.option-btn[data-answer="的"] .option-char { color: #e74c3c; }
.option-btn[data-answer="地"] .option-char { color: #f39c12; }
.option-btn[data-answer="得"] .option-char { color: #2d3436; }

/* 反馈区 */
.feedback-box {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    animation: slideUp 0.3s ease;
}

.feedback-box.hidden {
    display: none;
}

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

.feedback-emoji {
    font-size: 48px;
    margin-bottom: 8px;
}

.feedback-text {
    font-size: 18px;
    color: #333;
    margin: 0 0 16px;
}

.next-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 24px;
    cursor: pointer;
}

/* 结果页面 */
.result-box {
    background: #fff;
    border-radius: 24px;
    padding: 48px 32px;
    text-align: center;
    margin-top: 40px;
}

.result-emoji {
    font-size: 72px;
    margin-bottom: 16px;
}

.result-box h2 {
    font-size: 24px;
    color: #333;
    margin: 0 0 8px;
}

.result-box p {
    font-size: 16px;
    color: #666;
    margin: 0 0 32px;
}

.restart-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    padding: 16px;
    border-radius: 16px;
    cursor: pointer;
    margin-bottom: 12px;
}

.home-btn {
    width: 100%;
    background: #f0f0f0;
    border: none;
    color: #666;
    font-size: 16px;
    padding: 14px;
    border-radius: 16px;
    cursor: pointer;
}

/* 响应式 */
@media (max-width: 400px) {
    .hero h1 {
        font-size: 24px;
    }
    
    .de-card {
        width: 60px;
        height: 80px;
    }
    
    .de-char {
        font-size: 32px;
    }
    
    .question-text {
        font-size: 24px;
    }
    
    .option-char {
        font-size: 36px;
    }
}
