* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 登录页面样式 */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.login-container input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.login-container button {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s;
}

.login-container button:hover {
    background: #2980b9;
}

/* 用户界面布局 */
.user-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #1e2938;
    color: white;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
}

.user-info {
    padding: 25px;
    text-align: center;
    border-bottom: 1px solid #333333;
    background: rgba(255,255,255,0.05);
}

.user-info h3 {
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
}

.user-info p {
    color: #b0b0b0;
    font-size: 14px;
    font-weight: 500;
}

.side-nav {
    margin-top: 0;
}

.nav-item {
    display: block;
    padding: 15px 25px;
    color: #b0b0b0;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-weight: 500;
    font-size: 15px;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    border-left: 4px solid #4a9eff;
    padding-left: 30px;
}

.nav-item.active {
    background: rgba(74,158,255,0.2);
    color: #ffffff;
    border-left: 4px solid #4a9eff;
    font-weight: 600;
    box-shadow: inset 2px 0 0 0 #4a9eff;
}

.main-content {
    flex: 1;
    background: #ffffff;
    min-height: 100vh;
}

.main-content header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.main-content header h1 {
    color: #1a1a1a;
    font-size: 1.8em;
    font-weight: 600;
}

.content-area {
    padding: 30px;
    background: #ffffff;
}

/* 卡片样式 */
.welcome-card, .result-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.welcome-card:hover, .result-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.welcome-card h2 {
    color: #1a1a1a;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

.points {
    color: #e74c3c;
    font-size: 1.8em;
    font-weight: bold;
}

.points-info h3 {
    color: #1a1a1a;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.usage-stats {
    display: flex;
    gap: 25px;
    margin: 20px 0;
}

.stat {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
    border-left: 4px solid #4a9eff;
    min-width: 120px;
    transition: all 0.3s ease;
}

.stat:hover {
    background: #f0f7ff;
    box-shadow: 0 2px 8px rgba(74,158,255,0.15);
}

.stat-label {
    display: block;
    font-size: 0.95em;
    color: #666666;
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #1a1a1a;
}

.point-rules {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
}

.point-rules ul {
    margin: 15px 0 0 20px;
}

.point-rules li {
    margin-bottom: 8px;
    color: #666666;
    font-size: 15px;
}

.point-rules strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* 表单样式 */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 15px;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #1a1a1a;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: #4a9eff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(74,158,255,0.1);
    background: #ffffff;
}

.form-group textarea {
    resize: vertical;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 120px;
    line-height: 1.6;
}

.form-group small {
    color: #666666;
    font-size: 13px;
    display: block;
    margin-top: 6px;
    font-weight: 500;
}

button {
    padding: 12px 28px;
    background: #4a9eff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(74,158,255,0.2);
}

button:hover {
    background: #3385ff;
    box-shadow: 0 4px 12px rgba(74,158,255,0.3);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin: 20px 0;
    border: 1px solid #f0f0f0;
}

table th, table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 500;
}

table th {
    background: #1e2938;
    color: white;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table td {
    color: #333333;
    font-size: 14px;
    transition: all 0.2s ease;
}

table tr {
    transition: all 0.3s ease;
}

table tr:hover {
    background: #f8f9fa;
    transform: translateX(2px);
}

table tr:last-child td {
    border-bottom: none;
}

table tr:nth-child(even) {
    background: #fafafa;
}

table tr:nth-child(even):hover {
    background: #f0f7ff;
}

table th:first-child {
    border-radius: 12px 0 0 0;
}

table th:last-child {
    border-radius: 0 12px 0 0;
}

/* 管理员样式 */
.admin-container {
    min-height: 100vh;
    background: #ffffff;
}

.admin-container header {
    background: #1e2938;
    color: white;
    padding: 25px 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.admin-container header h1 {
    color: white;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 600;
}

.admin-container nav {
    margin-top: 15px;
}

.admin-container nav a {
    color: #b0b0b0;
    text-decoration: none;
    margin-right: 25px;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 15px;
}

.admin-container nav a:hover {
    color: white;
    background: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

.admin-container nav a.active {
    background: #4a9eff;
    color: white;
    box-shadow: 0 2px 6px rgba(74,158,255,0.3);
}

.dashboard {
    padding: 30px;
    background: #ffffff;
}

.dashboard h2 {
    color: #1a1a1a;
    margin-bottom: 25px;
    font-size: 22px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: #4a9eff;
}

.stat-icon {
    font-size: 2.8em;
    margin-bottom: 15px;
    color: #4a9eff;
}

.stat-card h3 {
    color: #666666;
    margin-bottom: 15px;
    font-size: 0.95em;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 2.5em;
    color: #1a1a1a;
    font-weight: bold;
    margin: 0;
}

.recent-activity {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}

.recent-activity h3 {
    color: #1a1a1a;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.content {
    padding: 30px;
    background: #ffffff;
}

.form-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 35px;
    border: 1px solid #f0f0f0;
}

.form-section h3 {
    color: #1a1a1a;
    margin-bottom: 25px;
    font-size: 19px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.table-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}

.table-section h3 {
    color: #1a1a1a;
    margin-bottom: 25px;
    font-size: 19px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* 查询结果样式 */
.query-result {
    margin-top: 35px;
}

.query-result h3 {
    color: #1a1a1a;
    margin-bottom: 20px;
    font-size: 19px;
    font-weight: 600;
}

.result-card p {
    margin-bottom: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    line-height: 1.6;
}

.result-card p:last-child {
    border-bottom: none;
}

.result-card strong {
    color: #1a1a1a;
    display: inline-block;
    width: 100px;
    font-weight: 600;
}

/* 批量查询样式 */
.batch-query-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 35px;
    border: 1px solid #f0f0f0;
}

.batch-results {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}

.batch-results h3 {
    color: #1a1a1a;
    margin-bottom: 25px;
    font-size: 19px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.results-table {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 消息样式 */
.error {
    background: #e74c3c;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-weight: 500;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(231,76,60,0.2);
    border-left: 4px solid #c0392b;
}

.success {
    background: #27ae60;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-weight: 500;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(39,174,96,0.2);
    border-left: 4px solid #229954;
}

/* 状态样式 */
.status-无标记 {
    color: #27ae60;
    font-weight: 600;
    background: #d4edda;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(39,174,96,0.15);
}

.status-有标记 {
    color: #e74c3c;
    font-weight: 600;
    background: #f8d7da;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(231,76,60,0.15);
}

.status-查询失败, .status-未知状态 {
    color: #f39c12;
    font-weight: 600;
    background: #fff3cd;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(243,156,18,0.15);
}

/* 快速统计 */
.quick-stats {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}

.quick-stats h3 {
    color: #1a1a1a;
    margin-bottom: 25px;
    font-size: 19px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.recent-queries table {
    font-size: 0.95em;
}

/* 代理管理样式 */
.description {
    color: #7f8c8d;
    margin-bottom: 20px;
    font-size: 14px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.instructions {
    line-height: 1.6;
}

.instructions h3 {
    color: #2c3e50;
    margin: 20px 0 10px 0;
    font-size: 1.1em;
}

.instructions ul, .instructions ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.instructions li {
    margin-bottom: 5px;
}

.instructions code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    color: #e74c3c;
}

.status-active {
    color: #27ae60;
    font-weight: bold;
}

.status-inactive {
    color: #e74c3c;
    font-weight: bold;
}

/* 卡片样式 */
.card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.card h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

/* 表单样式 */
.form {
    max-width: 500px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3498db;
    outline: none;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 12px;
}

/* 表格容器 */
.table-container {
    overflow-x: auto;
}

/* 徽章样式 */
.points-badge {
    background: #3498db;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.status-badge.active {
    background: #27ae60;
    color: white;
}

.status-badge.inactive {
    background: #e74c3c;
    color: white;
}

.query-type {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.query-type.single {
    background: #3498db;
    color: white;
}

.query-type.batch {
    background: #9b59b6;
    color: white;
}

.points-added {
    color: #27ae60;
    font-weight: bold;
}

/* 无数据提示 */
.no-data {
    text-align: center;
    color: #7f8c8d;
    padding: 20px;
    font-style: italic;
}

/* 最近活动区域 */
.recent-activity {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.recent-activity h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .user-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .usage-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .admin-container nav a {
        display: block;
        margin: 5px 0;
    }
    
    table {
        font-size: 0.8em;
    }
    
    table th, table td {
        padding: 8px 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
}