body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 100%;
    padding: 15px;
    box-sizing: border-box;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.loading {
    text-align: center;
    padding: 20px;
}

.vocabulary-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
}

.vocabulary-card {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    cursor: pointer;
    position: relative;
    min-height: 60px;
    padding-right: 70px; /* 为按钮留出更多空间 */
}

.vocabulary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.word {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.pronunciation, .romaji {
    display: none;
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.romaji {
    font-size: 1rem;
    color: #95a5a6;
    font-style: italic;
}

.show-details .pronunciation,
.show-details .romaji {
    display: block;
}

/* 底部导航栏样式 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    z-index: 100;
}

.nav-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8rem;
    color: #95a5a6;
    cursor: pointer;
    padding: 5px 10px;
}

.nav-btn i {
    font-size: 1.2rem;
    margin-bottom: 3px;
}

.nav-btn.active {
    color: #3498db;
}

.page {
    display: none;
    padding-bottom: 70px; /* 为底部导航留出更多空间 */
}

.page.active {
    display: block;
}

/* 按钮样式 - 修改部分 */
.actions {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    height: 100%;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.8rem; /* 增大按钮大小 */
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    width: 50px;
    height: 50px;
}

.add-mistake {
    color: #e74c3c;
}

.remove-mistake {
    color: #2ecc71;
}

.action-btn:hover {
    transform: scale(1.1);
}

/* 平板电脑和更大屏幕的响应式设计 */
@media (min-width: 600px) {
    .vocabulary-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .container {
        max-width: 90%;
        margin: 0 auto;
    }

    .action-btn {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
    }
}

/* 桌面电脑的响应式设计 */
@media (min-width: 900px) {
    .vocabulary-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .container {
        max-width: 1200px;
    }

    .bottom-nav {
        padding: 15px 0;
    }

    .nav-btn {
        font-size: 1rem;
    }

    .nav-btn i {
        font-size: 1.5rem;
    }
}

/* 练习页面样式 */
#practicePage {
    text-align: center;
}

.practice-card {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 20px auto;
    max-width: 500px;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.practice-word {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
}

.practice-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.next-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.next-btn:hover {
    background-color: #2980b9;
}

/* 移动端调整 */
@media (max-width: 600px) {
    .practice-card {
        padding: 20px;
        min-height: 150px;
    }

    .practice-word {
        font-size: 1.8rem;
    }

    .practice-actions {
        flex-direction: column;
        gap: 10px;
    }

    .next-btn {
        width: 100%;
    }
}

#practicePage .action-btn.add-mistake {
    min-width: 220px;
    white-space: nowrap;
}

.upload-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.upload-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.upload-btn:hover {
    background-color: #2980b9;
}

.upload-btn i {
    font-size: 1.2rem;
}
