* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "楷体", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}

body {
    background-color: #f9f0e0;
    color: #4a3520;
    overflow-x: hidden;
    position: relative;
    background-image: url('https://img.freepik.com/free-photo/chinese-style-texture_1194-6544.jpg');
    background-size: cover;
    background-attachment: fixed;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #8b4513;
    background-image: url('https://img.freepik.com/free-photo/brown-wooden-textured-flooring-background_53876-128530.jpg');
    padding: 10px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-bottom: 3px solid #d4a76a;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    border-radius: 50%;
    border: 2px solid #d4a76a;
}

.logo h1 {
    font-size: 28px;
    margin-right: 10px;
    color: #f1dbb3;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slogan {
    font-size: 14px;
    color: #d4a76a;
}

.main-nav {
    display: flex;
    gap: 20px;
}

.nav-item {
    text-decoration: none;
    color: #f1dbb3;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-item:hover, .nav-item.active {
    background-color: rgba(212, 167, 106, 0.3);
    transform: translateY(-2px);
}

.user-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    background-color: #d4a76a;
    color: #4a3520;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background-color: #c69c6d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.teacher-btn {
    background-color: #8b4513;
    color: #f1dbb3;
    border: 1px solid #d4a76a;
}

.teacher-btn:hover {
    background-color: #6b3000;
}

/* 主容器样式 */
.container {
    display: flex;
    position: relative;
    min-height: calc(100vh - 70px);
    padding: 20px;
}

/* 侧边栏样式 */
.sidebar {
    width: 80px;
    padding: 20px 10px;
    background-color: rgba(139, 69, 19, 0.1);
    border-right: 2px solid #d4a76a;
    border-radius: 0 10px 10px 0;
}

.language-select {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.lang-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #8b4513;
    background-color: #f1dbb3;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    color: #4a3520;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.lang-btn.active {
    background-color: #8b4513;
    color: #f1dbb3;
    transform: scale(1.1);
}

.lang-btn:hover:not(.active) {
    background-color: #d4a76a;
    transform: scale(1.1);
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    padding: 0 20px;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #d4a76a;
    padding-bottom: 10px;
}

.section-icon {
    margin-right: 15px;
}

.icon-img {
    width: 40px;
    height: 40px;
    border: 2px solid #8b4513;
    border-radius: 50%;
    padding: 5px;
    background-color: #f1dbb3;
}

.section-title {
    font-size: 32px;
    font-weight: bold;
    color: #8b4513;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* 练习区域样式 */
.practice-area {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    margin-bottom: 30px;
}

.practice-card {
    background: linear-gradient(135deg, #f1dbb3 0%, #d4a76a 100%);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border: 3px solid #8b4513;
    max-width: 500px;
    width: 100%;
    transition: all 0.3s ease;
}

.practice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.practice-card h3 {
    font-size: 28px;
    color: #8b4513;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.practice-card p {
    font-size: 18px;
    color: #4a3520;
    margin-bottom: 30px;
    line-height: 1.6;
}

.start-practice-btn {
    background: linear-gradient(135deg, #8b4513 0%, #5e2f0d 100%);
    color: #f1dbb3;
    border: none;
    padding: 15px 30px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.start-practice-btn:hover {
    background: linear-gradient(135deg, #6b3000 0%, #4a2000 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.start-practice-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 吉祥物样式 */
.mascot {
    position: absolute;
    bottom: 0;
    left: 100px;
    z-index: 1;
}

.mascot-img {
    width: 180px;
    height: auto;
    filter: drop-shadow(3px 3px 5px rgba(0, 0, 0, 0.3));
}

.parachute {
    position: absolute;
    top: 50px;
    right: 50px;
    z-index: 1;
}

.parachute-img {
    width: 180px;
    height: auto;
    filter: drop-shadow(3px 3px 5px rgba(0, 0, 0, 0.3));
}

/* 游戏容器样式 */
.game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    text-align: center;
    background-color: rgba(241, 219, 179, 0.8);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid #8b4513;
}

.game-container h1 {
    color: #8b4513;
    margin-bottom: 20px;
    font-size: 36px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    font-size: 18px;
    background-color: #d4a76a;
    padding: 10px;
    border-radius: 10px;
    color: #4a3520;
    font-weight: bold;
    border: 1px solid #8b4513;
}

.game-area {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-image: url('https://img.freepik.com/free-photo/old-paper-texture_1194-6280.jpg');
    background-size: cover;
    border: 1px solid #8b4513;
}

.target-text {
    font-size: 24px;
    margin-bottom: 20px;
    min-height: 60px;
    line-height: 1.5;
    color: #4a3520;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
    font-weight: bold;
}

.user-input-display {
    font-size: 24px;
    margin-bottom: 10px;
    min-height: 36px;
    color: #4a3520;
}

.user-input {
    width: 100%;
    padding: 10px;
    font-size: 18px;
    border: 2px solid #8b4513;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s;
    background-color: rgba(255, 255, 255, 0.7);
    color: #4a3520;
}

.user-input:focus {
    border-color: #8b4513;
    box-shadow: 0 0 8px rgba(139, 69, 19, 0.5);
}

.keyboard {
    margin-bottom: 20px;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.key {
    width: 40px;
    height: 40px;
    margin: 0 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f1dbb3;
    border-radius: 5px;
    box-shadow: 0 3px 0 #8b4513;
    font-weight: bold;
    transition: all 0.1s;
    color: #4a3520;
    border: 1px solid #8b4513;
}

.key.active {
    background-color: #8b4513;
    color: #f1dbb3;
    transform: translateY(3px);
    box-shadow: 0 0 0 #8b4513;
}

.key.space {
    width: 200px;
}

.controls {
    margin-bottom: 20px;
}

.controls .btn {
    margin: 0 10px;
    padding: 12px 25px;
    font-size: 18px;
    background-color: #8b4513;
    color: #f1dbb3;
    border-radius: 5px;
    box-shadow: 0 4px 0 #5e2f0d;
}

.controls .btn:hover {
    background-color: #6b3000;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #5e2f0d;
}

.controls .btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #5e2f0d;
}

.game-over {
    background-color: rgba(241, 219, 179, 0.95);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    border: 2px solid #8b4513;
    min-width: 300px;
}

.game-over h2 {
    color: #8b4513;
    margin-bottom: 20px;
    font-size: 28px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.game-over p {
    font-size: 18px;
    margin-bottom: 10px;
    color: #4a3520;
}

.game-over .btn {
    margin-top: 20px;
    background-color: #8b4513;
    color: #f1dbb3;
    box-shadow: 0 4px 0 #5e2f0d;
}

.game-over .btn:hover {
    background-color: #6b3000;
}

.hidden {
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 10px;
    }
    
    .logo {
        margin-bottom: 10px;
    }
    
    .main-nav {
        margin-bottom: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .practice-card {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .practice-card h3 {
        font-size: 24px;
    }
    
    .practice-card p {
        font-size: 16px;
    }
    
    .start-practice-btn {
        font-size: 18px;
        padding: 12px 25px;
    }
    
    .mascot, .parachute {
        display: none;
    }
}

@media (max-width: 480px) {
    .practice-area {
        min-height: 300px;
        padding: 0 10px;
    }
    
    .practice-card {
        padding: 25px 15px;
    }
    
    .practice-card h3 {
        font-size: 22px;
    }
    
    .practice-card p {
        font-size: 14px;
        margin-bottom: 25px;
    }
    
    .start-practice-btn {
        font-size: 16px;
        padding: 10px 20px;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .keyboard-row {
        flex-wrap: wrap;
    }
    
    .key {
        margin-bottom: 5px;
    }
}
