/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f0f8ff;
    color: #333;
}

/* 头部样式 */
header {
    background-color: #5f9ea0;
    color: white;
    padding: 1rem;
    text-align: center;
}

/* 主容器样式 */
.container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background-color: white;
    border-radius: 5px;
    padding: 1rem;
    margin-right: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.category-section h2 {
    margin-bottom: 1rem;
    color: #5f9ea0;
}

.category-input {
    display: flex;
    margin-bottom: 1rem;
}

.category-input input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px 0 0 3px;
}

.category-input button {
    padding: 0.5rem;
    background-color: #5f9ea0;
    color: white;
    border: none;
    border-radius: 0 3px 3px 0;
    cursor: pointer;
}

#category-list {
    list-style: none;
}

#category-list li {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: #f0f8ff;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#category-list li.active {
    background-color: #5f9ea0;
    color: white;
}

/* 内容区域样式 */
.content {
    flex: 1;
    background-color: white;
    border-radius: 5px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.word-management h2, .word-list-container h2 {
    margin-bottom: 1rem;
    color: #5f9ea0;
}

.word-form {
    background-color: #f0f8ff;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.form-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.form-buttons button {
    padding: 0.5rem 1rem;
    background-color: #5f9ea0;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.import-container {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f0f8ff;
    border-radius: 5px;
}

.import-tabs {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 1px solid #ddd;
}

.import-tab {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 0.5rem;
    border-radius: 3px 3px 0 0;
}

.import-tab.active {
    background-color: #5f9ea0;
    color: white;
}

.import-content {
    margin-bottom: 1rem;
}

#import-text {
    width: 100%;
    height: 100px;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    resize: vertical;
}

#import-url {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-bottom: 1rem;
}

#confirm-import, #cancel-import {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin-right: 0.5rem;
}

#confirm-import {
    background-color: #5f9ea0;
    color: white;
}

#cancel-import {
    background-color: #cd5c5c;
    color: white;
}

/* 单词列表样式 */
#word-list {
    width: 100%;
    border-collapse: collapse;
}

#word-list th, #word-list td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

#word-list th {
    background-color: #5f9ea0;
    color: white;
}

#word-list tr:nth-child(even) {
    background-color: #f0f8ff;
}

.play-btn, .play-slow-btn, .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 0.5rem;
    font-size: 1rem;
}

.play-btn {
    color: #5f9ea0;
}

.play-slow-btn {
    color: #8fbc8f;
}

.delete-btn {
    color: #cd5c5c;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-right: 0;
        margin-bottom: 1rem;
    }
}