/* 基础样式重置 - 直角风格 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Arial, sans-serif;
    background: #0a0a0a;
    color: #F1E5C9;
    min-height: 100vh;
}

/* 导航栏样式 - 直角 */
.navbar {
    background: #25390C;
    padding: 15px 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #3a5516;
}

.nav-content {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.nav-content a {
    color: #EFFAE7;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    transition: all 0.2s ease;
    font-size: 16px;
    border: 1px solid #3a5516;
    background: #25390C;
}

.nav-content a:hover {
    background: #3a5516;
    color: #F1E5C9;
    transform: none;
}

/* 主容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #0a0a0a;
    padding: 20px;
}

/* 卡片容器 */
.card-container {
    background: #1a1a1a;
    padding: 30px;
    border: 2px solid #25390C;
    margin-bottom: 20px;
}

/* 闪卡样式 */
#flashcard {
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 2px solid #25390C;
    background: #1a1a1a;
    margin-bottom: 20px;
    position: relative;
}

#flashcard:hover {
    transform: none;
    border-color: #3a5516;
}

.card-front, .card-back {
    text-align: center;
    width: 100%;
}

.japanese-text {
    font-size: 2em;
    font-weight: bold;
    margin: 20px 0;
    padding: 10px;
}

.chinese-text {
    font-size: 2em;
    color: #EFFAE7;
    margin: 20px 0;
    padding: 15px;
}

.card-image {
    max-width: 100%;
    object-fit: contain;
}

.meta-info {
    font-size: 16px;
    color: #999;
    padding: 10px;
    background: #0a0a0a;
    border: 1px solid #25390C;
    width: 100%;
    text-align: center;
}

/* 控制按钮 - 直角 */
.controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 20px 0;
}

.btn {
    padding: 14px 28px;
    border: 2px solid #25390C;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    background: #1a1a1a;
    color: #F1E5C9;
}

.btn:hover {
    transform: none;
    background: #25390C;
}

.btn-again {
    background: #1a1a1a;
    color: #F1E5C9;
    border-color: #660000;
}

.btn-again:hover {
    background: #660000;
    border-color: #990000;
}

.btn-good {
    background: #1a1a1a;
    color: #F1E5C9;
    border-color: #2c541c;
}

.btn-good:hover {
    background: #2c541c;
    border-color: #3a5516;
}

/* 快捷键提示 */
.shortcuts {
    text-align: center;
    margin-top: 20px;
    padding: 12px;
    background: #25390C;
    color: #EFFAE7;
    font-size: 14px;
    border: 1px solid #3a5516;
}

/* 音频控制 */
.audio-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10; /* 确保在卡片内容之上 */
    pointer-events: auto; /* 确保可点击 */
}

.audio-btn {
    background: #25390C;
    color: #F1E5C9;
    border: 2px solid #3a5516;
    width: 48px;
    height: 48px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
}

/* 难度标识 */
.difficulty-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #25390C;
    color: #F1E5C9;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #3a5516;
}

/* 响应式设计 - 保持直角 */
@media (max-width: 768px) {
    .nav-content {
        gap: 10px;
    }
    
    .nav-content a {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .card-container {
        padding: 20px;
    }
    
    #flashcard {
        min-height: 400px;
        padding: 20px;
    }
    
    .japanese-text {
        font-size: 1.6em;
    }
    
    .chinese-text {
        font-size: 1.2em;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* 点击提示样式 */
.click-hint {
    margin-top: 20px;
    color: #888;
    font-size: 13px;
    text-align: center;
    padding: 8px;
    background: #1a1a1a;
	pointer-events: none;
	opacity: 0.8;
    border: 1px solid #25390C;
	transition: opacity 0.3s ease;
}

/* 音频按钮悬停效果 */
.audio-btn:hover {
    background: #3a5516;
    transform: none;
}

/* 修复卡片悬停效果 */
#flashcard {
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s ease;
}

/* 音频提示动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
/* 确保点击区域正确 */
#flashcard {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
}

/* 音频按钮点击区域优化 */
.audio-btn {
    background: #25390C;
    color: #F1E5C9;
    border: 2px solid #3a5516;
    width: 48px;
    height: 48px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
	pointer-events: auto; /* 确保按钮可点击 */
    touch-action: manipulation; /* 优化触摸响应 */
}

/* 确保整个卡片区域可点击 */
.card-front, .card-back {
    width: 100%;
    height: 100%;
}

#flashcard.showing-answer .click-hint {
    opacity: 0;
    visibility: hidden;
}