:root {
    --primary: #3498db;
    --secondary: #2ecc71;
    --accent: #9b59b6;
    --light-bg: #f8f9fa;
    --dark-text: #2c3e50;
    --base-font-size: 12px; /* 基础字体大小 */
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf9 100%);
    min-height: 100vh;
    padding-top: 20px; /* 减小顶部导航栏间距 */
    color: var(--dark-text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: var(--base-font-size); /* 设置基础字体大小 */
}
/* 为 fixed-top 导航栏预留空间 */
body {
    padding-top: 56px;   /* 导航栏高度，可根据实际微调 */
}
/* 导航栏样式优化 */
.navbar {
    background: linear-gradient(45deg, #9b59b6, #3498db);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem; /* 减小导航栏内边距 */
}

/* 增大导航栏标题字体大小 */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* 增大导航栏链接字体大小 */
.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 0.75rem; /* 减小导航链接内边距 */
    font-size: 1.1rem;
}

/* 卡片样式优化 */
.card {
    border-radius: 8px; /* 减小圆角半径 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06); /* 减小阴影强度 */
    margin-bottom: 1.5rem; /* 减小卡片间距 */
    border: none;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.card-header {
    background: linear-gradient(45deg, var(--primary), #1a6ca8);
    color: white;
    border-radius: 8px 8px 0 0 !important;
    font-weight: 600;
    padding: 0.75rem 1.25rem; /* 减小头部内边距 */
    font-size: 1.1rem; /* 减小头部字体 */
}

.card-body {
    padding: 1rem; /* 减小内容区边距 */
}

/* 按钮样式优化 */
.btn {
    padding: 0.4rem 0.8rem; /* 减小按钮内边距 */
    font-size: 0.9rem; /* 减小按钮字体 */
    border-radius: 0.3rem; /* 减小按钮圆角 */
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), #2980b9);
    border: none;
}

.btn-danger {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    border: none;
}

.btn-success {
    background: linear-gradient(45deg, var(--secondary), #27ae60);
    border: none;
}

.btn-accent {
    background: linear-gradient(45deg, var(--accent), #8e44ad);
    border: none;
    color: white;
}

/* 表单控件优化 */
.form-control, .form-select {
    padding: 0.375rem 0.75rem; /* 减小表单控件内边距 */
    font-size: 0.9rem; /* 减小表单字体 */
    line-height: 1.5;
    border-radius: 0.25rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25); /* 减小焦点光晕 */
}

/* 表格样式优化 */
.table {
    font-size: 0.9rem; /* 减小表格字体 */
}

/* 在你的 CSS 文件中添加 */
.custom-top-margin {
    margin-top: 10px; /* 自定义间距值 */
}

.table thead th {
    background: linear-gradient(45deg, var(--primary), #2980b9);
    color: white;
    font-weight: 600;
    vertical-align: middle;
    padding: 0.75rem; /* 减小表头内边距 */
}

.table tbody td {
    padding: 0.6rem 0.75rem; /* 减小表格内容内边距 */
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

/* 分页控件优化 */
.pagination {
    margin: 0; /* 移除分页控件默认外边距 */
}

.page-link {
    padding: 0.375rem 0.75rem; /* 减小分页链接内边距 */
    font-size: 0.9rem; /* 减小分页字体 */
}

.per-page-select {
    padding: 0.25rem 0.5rem; /* 减小每页显示数下拉框内边距 */
    font-size: 0.9rem;
}

/* 单词行样式 */
.word-row {
    transition: all 0.3s ease;
}

.word-row:hover {
    background-color: #f0f7ff;
}

.phonetic {
    font-family: 'Times New Roman', serif;
    color: #e74c3c;
}

.part-of-speech {
    font-style: italic;
    color: #27ae60;
}

.collocation {
    background-color: #f8f9fa;
    padding: 0.1rem 0.4rem; /* 减小搭配标签内边距 */
    border-radius: 3px; /* 减小搭配标签圆角 */
    font-family: monospace;
    color: #9b59b6;
    font-size: 0.85rem; /* 减小搭配标签字体 */
}

/* 浮动按钮优化 */
.floating-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /* 减小浮动按钮阴影 */
    border-radius: 50%;
    width: 48px; /* 减小浮动按钮尺寸 */
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem; /* 减小浮动按钮图标大小 */
}

/* 页脚样式优化 */
.footer {
    background: linear-gradient(45deg, #2c3e50, #34495e);
    color: white;
    padding: 1rem 0; /* 减小页脚内边距 */
    margin-top: 2rem; /* 减小页脚上边距 */
}

/* 搜索框优化 */
.search-container {
    background: white;
    border-radius: 50px;
    padding: 0.3rem 1rem; /* 减小搜索框内边距 */
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08); /* 减小搜索框阴影 */
}

/* 编辑区和列表区间距优化 */
.edit-area {
    margin-bottom: 1.5rem; /* 减小编辑区下边距 */
}

.list-area {
    margin-top: 1.5rem; /* 减小列表区上边距 */
}

/* 加载指示器优化 */
#loadingIndicator {
    padding: 1rem 0; /* 减小加载指示器内边距 */
}

/* 响应式调整 */
@media (max-width: 768px) {
    .table-responsive {
        border: none;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem; /* 减小移动端按钮间距 */
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-header > div {
        margin-bottom: 0.5rem; /* 减小移动端卡片头部元素间距 */
    }
    /*==============================================================*/
     /*2. 主容器左右边距缩小（通用 .container-fluid）*/
    .container-fluid {
        padding-left: 2px !important;
        padding-right: 2px !important;
    }
 .container-fluid.mt-4 {
        margin-top: 0 !important;
    }

}

