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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.main-wrapper {
    flex: 1 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 模式选择页面样式 */
.mode-selection,
.game-container {
    margin-left: auto;
    margin-right: auto;
}

.selection-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 900px;
    width: 90%;
    backdrop-filter: blur(10px);
    text-align: center;
}

.selection-container h1 {
    font-size: 3rem;
    color: #4a5568;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.mode-options h2 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 30px;
}

.mode-cards {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-direction: row;
}

.mode-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 300px;
    height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.mode-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.mode-card.selected {
    /*background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);*/
    /*transform: scale(1.05);*/
}

.mode-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.mode-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.mode-card p {
    font-size: 1rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.example {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-style: italic;
}

/* 游戏容器样式 */
.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 800px;
    width: 90%;
    backdrop-filter: blur(10px);
}

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

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

.game-info {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 15px;
    border-radius: 15px;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
}

.game-area {
    margin-bottom: 30px;
}

.target-section {
    text-align: center;
    margin-bottom: 30px;
}

.target-number {
    font-size: 4rem;
    font-weight: bold;
    color: #e53e3e;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mode-indicator {
    font-size: 1.2rem;
    color: #718096;
    font-weight: 600;
}

.input-section {
    margin-bottom: 25px;
}

.input-container {
    position: relative;
    margin-bottom: 15px;
}

#textInput {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.2rem;
    border: 3px solid #e2e8f0;
    border-radius: 15px;
    outline: none;
    transition: all 0.3s ease;
    background: white;
}

#textInput:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
    transform: translateY(-2px);
}

.input-info {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: #4299e1;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.character-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    min-height: 40px;
    padding: 10px;
    background: #f7fafc;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

.character-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.character-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.character {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2d3748;
}

.character-count {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 2px;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn.primary {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
}

.btn.secondary {
    background: linear-gradient(135deg, #a0aec0, #718096);
    color: white;
}

.btn.danger {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.btn.home {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.result-section {
    text-align: center;
    padding: 20px;
    background: #f7fafc;
    border-radius: 15px;
    margin-bottom: 20px;
}

.result-message {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 10px;
}

.result-message.success {
    background: #c6f6d5;
    color: #22543d;
    border: 2px solid #9ae6b4;
}

.result-message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 2px solid #feb2b2;
}

.level-score {
    font-size: 1.1rem;
    color: #4a5568;
    font-weight: bold;
    padding: 10px;
    background: #e6fffa;
    border-radius: 8px;
    border: 1px solid #b2f5ea;
}

.instructions {
    background: linear-gradient(135deg, #e6fffa, #b2f5ea);
    padding: 20px;
    border-radius: 15px;
    border-left: 5px solid #38b2ac;
}

.instructions h3 {
    color: #2c7a7b;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.instructions ul {
    list-style: none;
    padding-left: 0;
}

.instructions li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    color: #4a5568;
}

.instructions li:before {
    content: "•";
    color: #38b2ac;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.target-number {
    animation: pulse 2s infinite;
}

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

.character-item {
    animation: slideIn 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .selection-container,
    .game-container {
        padding: 20px;
        margin: 10px;
    }
    
    .selection-container h1 {
        font-size: 2.5rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .target-number {
        font-size: 3rem;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .mode-cards {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .mode-card {
        width: 280px;
        height: 260px;
        min-width: auto;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
}

/* 特殊效果 */
.character-item.correct {
    background: linear-gradient(135deg, #c6f6d5, #9ae6b4);
    border-color: #38a169;
}

.character-item.incorrect {
    background: linear-gradient(135deg, #fed7d7, #feb2b2);
    border-color: #e53e3e;
}

.footer-copyright {
    width: 100%;
    text-align: center;
    padding: 18px 0 10px 0;
    color: #fff;
    font-size: 1rem;
    letter-spacing: 1px;
    margin-top: 40px;
    border-radius: 0 0 20px 20px;
    box-shadow: none;
    backdrop-filter: blur(2px);
    position: static;
} 

.footer-copyright a {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
}