* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #e6f7ff 0%, #f0f8ff 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 登录页面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #e6f7ff 0%, #f0f8ff 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h2 {
    color: #0066cc;
    margin-bottom: 30px;
    font-size: 28px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e6f7ff;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafdff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.captcha-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-group input {
    flex: 1;
}

.captcha-group img {
    border: 2px solid #e6f7ff;
    border-radius: 8px;
    cursor: pointer;
    height: 44px;
    transition: transform 0.2s ease;
}

.captcha-group img:hover {
    transform: scale(1.05);
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    /*border-left: 4px solid #4b6cb7;*/
}

.checkbox-group input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group label {
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
}

.radio-option input[type="radio"] {
    margin-right: 8px;
    accent-color: #4b6cb7;
}

.radio-option label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: normal;
}

button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}

.error-message {
    color: #ff4757;
    text-align: center;
    margin: 15px 0;
    padding: 10px;
    background: #ffe6e6;
    border-radius: 6px;
    border-left: 4px solid #ff4757;
}

.login-info {
    margin-top: 20px;
    padding: 15px;
    background: #f0f8ff;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
}

/* 仪表板 */
.dashboard {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.1);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e6f7ff;
}

header h1 {
    color: #0066cc;
    font-size: 28px;
}

.logout-btn {
    background: #ff4757;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #ff3742;
    transform: translateY(-2px);
}


/* 拖放区域样式 */
.drop-zone {
    border: 2px dashed #4a6cf7;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    background-color: #f8faff;
    margin-bottom: 20px;
    cursor: pointer;
    position: relative;
}

.drop-zone:hover, .drop-zone.dragover {
    background-color: #eef2ff;
    border-color: #3a5bd9;
}

.drop-zone-icon {
    font-size: 48px;
    color: #4a6cf7;
    margin-bottom: 15px;
}

.drop-zone-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.file-types {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.browse-btn {
    display: inline-block;
    background: #4a6cf7;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: 500;
}

.browse-btn:hover {
    background: #3a5bd9;
}

.file-input {
    display: none;
}

.file-info {
    margin-top: 20px;
    padding: 15px;
    background: #f0f4ff;
    border-radius: 8px;
    display: none;
}

.file-info.show {
    display: block;
}

.file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.file-size {
    color: #666;
    font-size: 14px;
}

.upload-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f0f8ff;
    border-radius: 12px;
    border-left: 4px solid #0066cc;
}

.upload-section h2 {
    color: #0066cc;
    margin-bottom: 20px;
    font-size: 22px;
}

.progress-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f0f8ff;
    border-radius: 12px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e6f7ff;
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0066cc 0%, #00aaff 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

#progressText {
    text-align: center;
    font-weight: 600;
    color: #0066cc;
    font-size: 16px;
}

.tasks-section h2 {
    color: #0066cc;
    margin-bottom: 20px;
    font-size: 22px;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #fafdff;
    border-radius: 12px;
    border-left: 4px solid #0066cc;
    transition: all 0.3s ease;
}

.task-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.1);
}

.task-info {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filename {
    font-weight: bold;
    color: #0066cc;
    font-size: 16px;
}

.status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status[data-status="completed"] {
    background: #52c41a;
    color: white;
}

.status[data-status="processing"] {
    background: #faad14;
    color: white;
}

.status[data-status="pending"] {
    background: #d9d9d9;
    color: #666;
}

.progress, .time {
    color: #666;
    font-size: 14px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-download {
    background: #28a745;
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* 任务详情页 */
.task-header {
    background: #f0f8ff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 4px solid #0066cc;
}

.task-header h2 {
    color: #0066cc;
    margin-bottom: 15px;
    font-size: 24px;
}

.task-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.task-meta span {
    background: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    border: 1px solid #e6f7ff;
}

.stats-section {
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.1);
    border: 1px solid #e6f7ff;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.15);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #0066cc;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.words-section {
    margin-bottom: 30px;
}

.words-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.search-input {
    padding: 12px 15px;
    border: 2px solid #e6f7ff;
    border-radius: 8px;
    flex: 1;
    font-size: 16px;
}

.page-select {
    padding: 12px;
    border: 2px solid #e6f7ff;
    border-radius: 8px;
    font-size: 16px;
}

.words-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.1);
    margin-bottom: 20px;
}

.words-table {
    width: 100%;
    white-space: nowrap;
    border-collapse: collapse;
}

.page-info{
    /*white-space: nowrap;  */
}

.page-input-container {
    white-space: nowrap;  
}
.words-table th {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    padding: 15px;
    text-align: left;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
}

.words-table th:hover {
    background: linear-gradient(135deg, #0052a3 0%, #003366 100%);
}

.words-table td {
    padding: 15px;
    border-bottom: 1px solid #e6f7ff;
    font-size: 14px;
}

.words-table tr:hover {
    background: #f0f8ff;
}

.word-cell {
    font-weight: bold;
    color: #0066cc;
}

.length-cell, .frequency-cell {
    text-align: center;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.page-btn {
    padding: 10px 20px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.page-btn:hover:not(:disabled) {
    background: #0052a3;
    transform: translateY(-2px);
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 30px;
    background: #f0f8ff;
    border-radius: 12px;
}

.btn-primary {
    text-align: center;
    white-space: nowrap;
    background: #17a2b8;
    color: white;
}

.btn-secondary {
    background: #43515e;
    color: white;
}

.btn-success {
    background: #43515e;
    color: white;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

.preview-content {
    margin-top: 20px;
}

.preview-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results p {
    font-size: 18px;
    margin-bottom: 20px;
}

.task-info span {
    display: inline-block;
    width: 200px;  /*或者其他指定宽度 */
    white-space: normal;
    word-wrap: break-word;
}
/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .dashboard {
        padding: 20px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .task-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .task-actions {
        flex-direction: column;
        width: 100%;
        display: flex;
        gap: 10px;        
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .words-controls {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .words-table {
        font-size: 12px;
    }
    
    .words-table th,
    .words-table td {
        padding: 8px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 25px;
        margin: 10px;
    }
    
    .task-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .task-meta span {
        width: 100%;
        text-align: center;
    }
}


/* 消息容器 - 固定在屏幕中心 */
.error-message,
.success-message,
.warning-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
    z-index: 1000;
    text-align: center;
    min-width: 300px;
    max-width: 90%;
    opacity: 0;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 显示状态 */
.error-message.show,
.success-message.show,
.warning-message.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* 成功消息样式 */
.success-message {
    background: linear-gradient(135deg, #51cf66, #40c057);
    box-shadow: 0 10px 30px rgba(81, 207, 102, 0.3);
}

/* 警告消息样式 */
.warning-message {
    background: linear-gradient(135deg, #ffd43b, #fcc419);
    color: #2b2b2b;
    box-shadow: 0 10px 30px rgba(255, 212, 59, 0.3);
}

/* 关闭按钮 - 在消息框内部的右上角 */
.message-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: inherit;
    font-size: 18px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-weight: bold;
}

.message-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* 警告消息的关闭按钮颜色调整 */
.warning-message .message-close {
    background: rgba(0, 0, 0, 0.1);
    color: #2b2b2b;
}

.warning-message .message-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* 消息内容区域 */
.message-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px 0 10px;
    min-height: 40px;
}

.message-content span {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

/* 蒙层样式 */
.message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.message-overlay.show {
    opacity: 1;
}