/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 登录页面样式 */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 40px;
    text-align: center;
}

.login-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

.login-header p {
    color: #666;
    margin-bottom: 30px;
}

.error-message {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}

.login-btn:hover {
    transform: translateY(-2px);
}

.login-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #666;
}

/* 主应用布局 */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #34495e;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.nav-menu {
    list-style: none;
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item a:hover {
    background: #34495e;
    color: white;
}

.nav-item.active a {
    background: #3498db;
    color: white;
}

.nav-item .icon {
    margin-right: 10px;
    font-size: 16px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #34495e;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.logout-btn {
    color: #e74c3c;
    text-decoration: none;
    font-size: 12px;
}

.logout-btn:hover {
    text-decoration: underline;
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    padding: 30px;
    background: #f8f9fa;
}

.content-header {
    margin-bottom: 30px;
}

.content-header h1 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.content-header p {
    color: #7f8c8d;
}

.header-actions {
    margin-top: 15px;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    font-size: 14px;
}

/* 统计卡片样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card.active {
    border-left: 4px solid #27ae60;
}

.stat-card.completed {
    border-left: 4px solid #3498db;
}

.stat-card.paused {
    border-left: 4px solid #f39c12;
}

.stat-icon {
    font-size: 24px;
    margin-right: 15px;
}

.stat-content h3 {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-content p {
    color: #7f8c8d;
    font-size: 14px;
}

/* 操作按钮 */
.dashboard-actions {
    text-align: center;
}

.action-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.action-btn:hover {
    background: #2980b9;
}

.action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 关键词表格样式 */
.keywords-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.keywords-table-container {
    overflow-x: auto;
}

.keywords-table {
    width: 100%;
    border-collapse: collapse;
}

.keywords-table th,
.keywords-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.keywords-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.keywords-table tbody tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-paused {
    background: #fff3cd;
    color: #856404;
}

.progress-bar {
    width: 60px;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #27ae60;
    transition: width 0.3s;
}

/* 分页样式 */
.pagination {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #eee;
}

.pagination button {
    margin: 0 5px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover {
    background: #f8f9fa;
}

.pagination button.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
