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

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

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

header {
    text-align: center;
    margin-bottom: 2rem;
}

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

header p {
    color: #666;
    font-size: 1.1rem;
    font-style: italic;
}

.game-area {
    text-align: center;
}

.score-board {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 1rem;
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    border-radius: 15px;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.chinese-character {
    margin-bottom: 2rem;
}

.character {
    font-size: 8rem;
    font-weight: bold;
    color: #2c3e50;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    text-align: center;
    margin-bottom: 0.5rem;
}

.character:hover {
    transform: scale(1.1);
}

.pronunciation-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
}

.pronunciation-btn:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.pronunciation-btn:active {
    transform: translateY(0) scale(0.95);
}

.pronunciation-btn.playing {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.character-meaning {
    font-size: 1.2rem;
    color: #7f8c8d;
    font-style: italic;
}

.pinyin-input-area {
    margin-bottom: 2rem;
}

.instruction {
    font-size: 1.3rem;
    color: #34495e;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.pinyin-boxes {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.pinyin-box {
    width: 60px;
    height: 60px;
    border: 3px solid #3498db;
    border-radius: 10px;
    font-size: 1.8rem;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    outline: none;
    font-weight: bold;
    text-transform: lowercase;
}

.pinyin-box:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.3);
    transform: scale(1.1);
}

.pinyin-box.correct {
    background: #2ecc71;
    color: white;
    border-color: #27ae60;
}

.pinyin-box.incorrect {
    background: #e74c3c;
    color: white;
    border-color: #c0392b;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-hint {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
}

.btn-skip {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    color: white;
}

.btn-restart {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

.feedback {
    font-size: 1.5rem;
    font-weight: bold;
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feedback.success {
    color: #27ae60;
    animation: bounce 0.6s ease-in-out;
}

.feedback.error {
    color: #e74c3c;
    animation: shake 0.5s ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    width: 0%;
    transition: width 0.5s ease;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
        margin: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .character {
        font-size: 6rem;
    }
    
    .pronunciation-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .pinyin-box {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .score-board {
        font-size: 1rem;
    }
}

.contact-info {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

.contact-info p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.contact-info a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #2980b9;
    text-decoration: underline;
}