* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial Rounded MT Bold', 'Arial', sans-serif;
}

body {
    background-color: #f0f8ff;
    color: #333;
    font-family: 'Arial', sans-serif;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

header {
    margin-bottom: 30px;
}

h1 {
    color: #ff6b6b;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-mode-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.game-mode-selector button {
    background-color: #74b9ff;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-mode-selector button.active {
    background-color: #0984e3;
    transform: scale(1.05);
}

.game-container {
    display: none;
    background-color: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.game-container.active {
    display: block;
}

.number-display {
    margin-bottom: 20px;
}

.number-card {
    display: inline-block;
    background-color: #fdcb6e;
    border-radius: 15px;
    width: 150px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#current-number {
    font-size: 5rem;
    font-weight: bold;
    color: #2d3436;
}

.number-name {
    margin: 20px 0;
}

#number-text {
    font-size: 2.5rem;
    color: #e17055;
    font-weight: bold;
}

.number-items-container {
    margin: 30px 0;
    min-height: 100px;
}

.number-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.item {
    width: 70px;
    height: 70px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: pop 0.5s ease-out;
}

@keyframes pop {
    0% { transform: scale(0); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.navigation {
    display: flex;
    justify-content: center;
    gap: 20px;
}

button {
    background-color: #74b9ff;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 12px 25px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

button:hover:not([disabled]) {
    background-color: #0984e3;
    transform: translateY(-3px);
}

button:active:not([disabled]) {
    transform: translateY(0);
}

button:disabled {
    background-color: #b2bec3;
    cursor: not-allowed;
}

.quiz-question {
    margin-bottom: 30px;
}

.quiz-question p {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #2d3436;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.quiz-option {
    background-color: #a29bfe;
    color: white;
    font-size: 2rem;
    padding: 15px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-option:hover {
    background-color: #6c5ce7;
    transform: scale(1.05);
}

.quiz-feedback {
    min-height: 50px;
}

#feedback-text {
    font-size: 1.5rem;
    font-weight: bold;
}

.correct {
    color: #00b894;
}

.incorrect {
    color: #d63031;
}

footer {
    margin-top: 20px;
    color: #636e72;
    font-size: 0.9rem;
}

/* 庆祝动画 */
.celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    display: none;
}

.celebration.show {
    display: block;
}

.confetti {
    position: absolute;
    width: 15px;
    height: 15px;
    background-color: #ff6b6b;
    border-radius: 50%;
    animation: fall 4s ease-out forwards;
}

.confetti:nth-child(2n) {
    background-color: #74b9ff;
    width: 12px;
    height: 12px;
}

.confetti:nth-child(3n) {
    background-color: #fdcb6e;
    width: 10px;
    height: 10px;
}

.confetti:nth-child(4n) {
    background-color: #a29bfe;
    width: 8px;
    height: 8px;
}

@keyframes fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .game-mode-selector button {
        font-size: 1rem;
        padding: 8px 16px;
    }
    
    .number-card {
        width: 120px;
        height: 120px;
    }
    
    #current-number {
        font-size: 4rem;
    }
    
    #number-text {
        font-size: 2rem;
    }
    
    .quiz-options {
        grid-template-columns: 1fr;
    }
}

/* 平板优化 */
@media (max-width: 1024px) and (min-width: 768px) {
    .number-card {
        width: 180px;
        height: 180px;
    }
    
    #current-number {
        font-size: 6rem;
    }
    
    button {
        padding: 15px 30px;
        font-size: 1.4rem;
    }
    
    .quiz-option {
        font-size: 2.5rem;
        padding: 20px;
    }
}