/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 自定义滚动条样式 */
::-webkit-scrollbar {
    width: 3px;
    height: 3px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 1.5px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 1.5px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Firefox滚动条样式 */
* {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    background-color: #2c3e50;
    color: #fff;
    padding: 0.05rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 头部内容布局 */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    line-height: 1.3;
}

/* 头部图标样式 */
.header-icon {
    width: 21px;
    height: 21px;
    vertical-align: middle;
    fill: currentColor;
    stroke: currentColor;
}

/* 头部导航样式 */
.header-nav {
    display: flex;
    align-items: center;
}

/* 管理后台链接样式 */
.admin-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.35rem 0.9rem;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.3);
}

/* 导航样式 */
nav {
    background-color: #34495e;
    padding: 0.15rem 0;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.35rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-block;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

/* 主要内容样式 */
main {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin: 0.5rem 0;
    width: 100%;
    box-sizing: border-box;
    flex-grow: 1;
    flex-shrink: 0;
    flex-basis: auto;
}

/* 页面标题样式 */
h2 {
    text-align: center;
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

/* 工具说明样式 */
.tool-description {
    background-color: #f8f9fa;
    padding: 1.5rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    color: #495057;
    line-height: 1.7;
    transition: all 0.3s ease;
}

/* 隐藏元素样式 */
.tool-description.hidden {
    display: none;
}

.tool-description p {
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.tool-description h3 {
    color: #343a40;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.tool-description ul {
    margin: 0 0 0 1.25rem;
    padding: 0;
    list-style-type: disc;
}

.tool-description li {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #5a6268;
}

.tool-description li strong {
    color: #495057;
    font-weight: 600;
}

/* 词库统计样式 */
.library-stats {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.stats-box {
    background-color: #e3f2fd;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #bbdefb;
    color: #1565c0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: auto;
    width: auto;
}

.stats-box p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}

.stats-content {
    margin: 0;
    font-size: 0.95rem;
    white-space: nowrap;
}

.stats-content strong {
    color: #0d47a1;
    font-weight: 600;
}

/* 隐藏元素样式 */
.library-stats.hidden {
    display: none;
}

/* 页面头部样式 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h2 {
    margin: 0;
    color: #333;
}

/* 头部操作区域样式 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
}

/* 确保按钮不换行且自适应宽度 */
.header-actions .btn {
    white-space: nowrap;
    width: auto;
    flex-shrink: 0;
}

/* 移除原批量操作按钮样式 */
.batch-actions {
    display: none;
}

/* 管理后台搜索表单样式 */
.page-header .search-form {
    margin: 0;
    display: flex;
    max-width: none;
    align-items: center;
}

/* 搜索框与按钮合并容器 */
.search-container {
    position: relative;
    display: inline-block;
    width: 150px;
}

/* 搜索输入框 */
.search-container input {
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    background-color: #f9fafb;
}

.search-container input:focus {
    border-color: #3498db;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-container input::placeholder {
    color: #9ca3af;
}

/* 搜索按钮（图标） */
.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 3rem;
    background-color: transparent;
    border: none;
    border-radius: 0 25px 25px 0;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.search-btn svg {
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background-color: #f3f4f6;
    color: #3498db;
}

.search-btn:hover svg {
    transform: scale(1.1);
}

/* 按钮聚焦样式 */
.search-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 检测表单样式 */
.search-form {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 10px;
}

/* 响应式调整 - 小屏幕设备上优化按钮位置 */
@media (max-width: 768px) {
    .text-input-group textarea,
    .highlighted-text {
        padding-right: 10px; /* 小屏幕上移除右侧内边距 */
    }
    
    .button-group {
        position: static !important;
        margin: 1rem auto 0 !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }
    
    .btn-submit {
        position: static !important;
        margin: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        flex: 1 !important;
        min-width: 120px !important;
        width: auto !important;
    }
}

.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* 表单行布局 */
.form-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: nowrap;
}

/* 平台选择器样式 */
.platform-selector {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0 !important;
    display: flex;
    align-items: center;
}

/* 平台选择器内部select样式 */
.platform-selector select {
    margin: 0;
}

/* 词库统计样式调整 */
.library-stats {
    margin: 0 !important;
    flex: 0 0 auto;
    width: auto;
    min-width: auto;
    display: flex;
    align-items: center;
}

.library-stats .stats-box {
    margin: 0;
    width: auto;
    min-width: auto;
    box-sizing: border-box;
    white-space: nowrap;
}

/* 确保form-group在form-row中没有额外边距 */
.form-row .form-group {
    margin-bottom: 0;
}

/* 自定义select样式 */
select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    /* 调整下拉箭头位置 */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6,9 12,15 18,9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 12px;
}

select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

select:hover {
    border-color: #b3b3b3;
}

/* 确保伪元素箭头不显示 */
select::-ms-expand {
    display: none;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #555;
    margin: 0;
    font-size: 0.95rem;
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    max-height: 300px;
}

/* 文本输入组样式 - 用于实现按钮在文本框右下角 */
.text-input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.text-input-group textarea,
.highlighted-text {
    padding-right: 260px; /* 增加右侧内边距，容纳两个按钮 */
    min-height: 140px;
}

/* 高亮文本容器样式 */
.highlighted-text {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    resize: vertical;
    background-color: white;
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
    transition: border-color 0.3s ease;
    cursor: text;
}

.highlighted-text:hover {
    border-color: #b3b3b3;
}

.highlighted-text:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

/* 违禁词高亮样式 */
.highlighted-word {
    background-color: #f8d7da;
    color: #721c24;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
}

.highlighted-word:hover {
    background-color: #f5c6cb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* 已修正词高亮样式 */
.corrected-word {
    background-color: #d4edda;
    color: #155724;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
}

.corrected-word:hover {
    background-color: #c3e6cb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* 空占位符样式 */
.highlighted-text:empty:before {
    content: attr(placeholder);
    color: #999;
    pointer-events: none;
}

/* 操作按钮区域样式 */
.action-buttons {
    margin: 1rem 0;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.action-buttons.hidden {
    display: none;
}

/* 辅助按钮基础样式 */
.action-buttons .btn {
    margin: 0;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    min-width: 120px;
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    background-color: #6c757d;
    color: white;
}

/* 清空按钮样式 */
.action-buttons .btn:first-child {
    background-color: #e74c3c;
    color: white;
}

.action-buttons .btn:first-child:hover {
    background-color: #c0392b;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
    transform: translateY(-2px);
}

/* 复制按钮样式 */
.action-buttons .btn:last-child {
    background-color: #2ecc71;
    color: white;
}

.action-buttons .btn:last-child:hover {
    background-color: #27ae60;
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
    transform: translateY(-2px);
}

/* 按钮点击效果 */
.action-buttons .btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.1s ease;
}

/* 按钮图标样式 */
.btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    stroke: currentColor;
}

/* 按钮组样式 - 用于文本框右下角的按钮排列 */
.button-group {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: flex;
    gap: 0.5rem;
    z-index: 10; /* 确保按钮显示在文本之上 */
}

/* 提交按钮样式 - 定位在文本框右下角 */
.btn-submit {
    margin: 0 !important;
    padding: 0.6rem 1.2rem !important;
    font-size: 0.9rem !important;
    min-width: auto !important;
    width: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    background-color: rgba(52, 152, 219, 0.95) !important;
    backdrop-filter: blur(2px); /* 添加轻微的毛玻璃效果，提高可读性 */
}

/* 示例文案按钮样式 */
.btn-extra {
    background-color: rgba(97, 97, 97, 0.95) !important;
}

.btn {
    background-color: #3498db;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem auto 0;
    width: auto;
    min-width: 120px;
    font-weight: 500;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

/* 为链接按钮添加文本装饰去除 */
a.btn {
    text-decoration: none !important;
    display: inline-block;
    margin: 0;
}

.btn:hover {
    background-color: #2980b9;
}

/* 小按钮样式 */
.btn-sm {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
    min-width: auto !important;
    margin: 0 !important;
    display: inline-block !important;
}

/* 主要按钮样式 */
.btn-primary {
    background-color: #3498db;
}

/* 危险按钮样式 */
.btn-danger {
    background-color: #e74c3c;
}

/* 结果样式 */
.results {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

.results.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.results.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.results h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.results h3 .word-count {
    font-size: 0.95rem;
    font-weight: normal;
    color: inherit;
    margin-left: auto;
}

.results p {
    margin: 0 0 0.75rem 0;
    font-weight: 500;
}

.results ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

.results li {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 管理后台样式 */
.admin-login {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-login h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* 批量操作按钮样式 */
.batch-actions {
    margin-bottom: 1rem;
    text-align: right;
}

/* 违禁词管理列表样式 */
.word-list {
    margin-top: 2rem;
}

.word-list table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

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

/* 文本居右样式 */
.text-right {
    text-align: right !important;
}

/* 操作列表头和数据居右 */
.word-list th:last-child,
.word-list td:last-child {
    text-align: right;
}

/* 操作列样式调整 */
.operations-column {
    width: 120px;
    white-space: nowrap;
    padding: 0.75rem 0.5rem !important;
}

/* 操作列链接间距调整 */
.operations-column a {
    margin-left: 0.5rem;
}

.operations-column a:first-child {
    margin-left: 0;
}

/* 平台图标样式 */
.platform-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 40px;
    max-height: 40px;
    overflow: hidden;
}

.platform-icon img,
.platform-icon svg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    fill: currentColor;
}

/* 平台列表中的图标单元格样式 */
.platforms-table .word-list td:nth-child(2) {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem !important;
    vertical-align: middle;
}

/* 确保平台图标垂直居中 */
.platform-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* 下拉菜单中的平台图标样式 */
select option {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
}

/* 确保select选项中的HTML内容能正确渲染 */
select {
    /* 确保下拉菜单能显示HTML内容 */
    font-size: 0.95rem;
    padding: 0.75rem;
}

/* 优化平台选择下拉菜单的样式 */
.platform-selector select {
    background-position: right 11px center;
}

/* 自定义下拉菜单样式 */
.custom-select {
    position: relative;
    width: 100%;
    font-size: 1rem;
}

.select-selected {
    background-color: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.3s ease;
}

.select-selected:hover, .select-selected.select-arrow-active {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.selected-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: calc(100% - 20px);
}

.selected-value img, .selected-value svg {
    max-width: 16px;
    max-height: 16px;
    object-fit: contain;
    vertical-align: middle;
}

.select-arrow {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #666;
    transition: transform 0.3s ease;
}

.select-arrow-active .select-arrow {
    transform: rotate(180deg);
}

.select-items {
    position: absolute;
    background-color: white;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    z-index: 99;
    max-height: 150px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
}

.select-items.show {
    display: block;
}

.select-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s ease;
    font-size: 0.95rem;
}

.select-item:hover {
    background-color: #f8f9fa;
}

.select-item img, .select-item svg {
    max-width: 16px;
    max-height: 16px;
    object-fit: contain;
    vertical-align: middle;
}

/* 确保图标在各种情况下都能正确显示 */
.custom-select img,
.custom-select svg {
    fill: currentColor;
    stroke: currentColor;
}

/* 处理不同类型的图标内容 */
.platform-icon-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.platform-icon-content img,
.platform-icon-content svg {
    max-width: 16px;
    max-height: 16px;
    object-fit: contain;
    fill: currentColor;
}

/* 复选框列宽度（第1列） */
.word-list th:first-child,
.word-list td:first-child {
    width: 35px;
    text-align: center;
    padding: 0.75rem 0.5rem !important;
}

/* 违禁词列宽度（第2列） */
.word-list th:nth-child(2),
.word-list td:nth-child(2) {
    flex: 1;
    min-width: 150px;
}

/* 平台名称列宽度（第3列） */
.word-list th:nth-child(3),
.word-list td:nth-child(3) {
    width: 120px;
}

/* 添加时间列样式 - 匹配倒数第二列（操作列之前） */
.word-list th:nth-last-child(2),
.word-list td:nth-last-child(2) {
    width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.word-list th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.word-list tr:hover {
    background-color: #f8f9fa;
}

/* 操作链接样式 */
.text-right a {
    margin-left: 1rem;
    color: #3498db;
    text-decoration: none;
}

.text-right a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 禁用链接样式 */
.text-right a.disabled {
    color: #6c757d;
    cursor: not-allowed;
    pointer-events: none;
    text-decoration: none;
}

/* 表单样式 */
.form-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
}

/* 确保表单输入元素自适应宽度 */
.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

/* 确保表单输入元素聚焦效果 */
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

/* 移除form-control的默认margin-bottom，使用form-group的gap */
.form-control {
    margin-bottom: 0 !important;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination a {
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #e9ecef;
}

.pagination a.active {
    background-color: #3498db;
    color: #fff;
    border-color: #3498db;
}

.pagination a.disabled {
    background-color: #f1f3f5;
    color: #adb5bd;
    cursor: not-allowed;
    pointer-events: none;
    border-color: #dee2e6;
}

/* 消息样式 */
.message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 页脚样式 */
footer {
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    margin: 0.5rem 0 0 0;
    border-radius: 4px;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

/* 自定义弹窗样式 */
.custom-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 30px; /* 显示在页面顶部 */
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-alert.show {
    opacity: 1;
    visibility: visible;
}

.custom-alert-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.custom-alert-header {
    background-color: #3498db;
    color: #fff;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.custom-alert-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.custom-alert-body {
    padding: 1.5rem;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.6;
}

.custom-alert-body p {
    margin: 0;
}

.custom-alert-footer {
    padding: 0 1.5rem 1.5rem;
    text-align: center;
}

.custom-alert-footer .btn {
    margin: 0;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    min-width: auto;
    width: auto;
    display: inline-block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    main {
        padding: 1rem;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .word-list table {
        font-size: 0.875rem;
    }
    
    .word-list th,
    .word-list td {
        padding: 0.5rem;
    }
    
    /* 手机页面表单调整 */
    .form-row {
        flex-wrap: nowrap;
        gap: 0.5rem;
    }
    
    /* 减少手机页面选择平台的宽度 */
    .platform-selector {
        min-width: 120px;
        flex: 1;
    }
    
    /* 手机页面隐藏"统计"两个字 */
    .stats-label {
        display: none;
    }
    
    /* 确保select元素在手机上宽度合适 */
    .platform-selector select {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
}