/* index.css */
/* 登录表单样式 */
.login-container {
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.login-form {
    display: flex;
    flex-direction: column;
}

.login-form input[type="text"] {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.login-form button {
    padding: 10px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.login-form button:hover {
    background: #45a049;
}

.user-info {
    text-align: right;
    padding: 10px;
    background: #f0f0f0;
    margin-bottom: 20px;
    border-radius: 4px;
}

.logout-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}

.logout-btn:hover {
    background: #d32f2f;
}

.error-message {
    color: #f44336;
    margin-bottom: 15px;
}

.success-message {
    color: #4CAF50;
    margin-bottom: 15px;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --light-bg: #f8fafc;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --error-color: #dc2626;
    --success-color: #16a34a;
}

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

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: var(--text-color);
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto; /* 保留水平居中 */
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    
    /* 新增的垂直居中样式 */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    /* 确保容器不会超出视口 */
    max-height: 90vh;
    overflow-y: auto;
}
        
header {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
}

.error-message {
    background-color: #fee2e2;
    color: var(--error-color);
    padding: 15px;
    margin: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--error-color);
}

.file-list {
    padding: 20px;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
}

.file-table th {
    background-color: var(--light-bg);
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
}

.file-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

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

.file-table tr:hover {
    background-color: #f8fafc;
}

.file-name {
    font-weight: 500;
    color: var(--primary-color);
}

.file-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 10px;
    vertical-align: middle;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.file-size {
    color: var(--text-muted);
    font-family: monospace;
}

.file-date {
    color: var(--text-muted);
    font-size: 14px;
}

.download-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.download-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-1px);
}

.empty-message {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.query-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none; 
}
.query-loading-content {
    background: white;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
}

footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .file-table {
        display: block;
        overflow-x: auto;
    }
    
    .file-table th, .file-table td {
        padding: 8px 10px;
    }
}