* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

/* 密码模态框 */
.modal {
    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: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 300px;
}

.modal-content h2 {
    margin-bottom: 1rem;
    color: #333;
}

.modal-content input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.modal-content button {
    width: 100%;
    padding: 0.75rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.modal-content button:hover {
    background: #0056b3;
}

.error {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* 头部 */
header {
    background: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5rem;
    color: #333;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* 按钮 */
.btn-primary {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* 容器 */
.container {
    display: flex;
    height: calc(100vh - 80px);
}

/* 侧边栏 */
.sidebar {
    width: 300px;
    background: white;
    padding: 1.5rem;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.sidebar h2 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #333;
}

.project-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    border: 2px solid transparent;
}

.project-item:hover {
    background: #e9ecef;
}

.project-item.active {
    background: #e7f3ff;
    border-color: #007bff;
}

.project-item h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #333;
}

.project-item p {
    font-size: 0.85rem;
    color: #666;
}

/* 主面板 */
.main-panel {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.project-header h2 {
    font-size: 1.5rem;
    color: #333;
}

/* 标签页 */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e9ecef;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: #007bff;
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: bold;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 卡片 */
.card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.2rem;
}

/* 表单 */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* 文件列表 */
.file-list {
    list-style: none;
    margin-top: 1rem;
}

.file-item {
    padding: 0.75rem;
    background: #f8f9fa;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-item:hover {
    background: #e9ecef;
}

.file-item a {
    color: #007bff;
    text-decoration: none;
}

.file-item a:hover {
    text-decoration: underline;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
}

/* 报告显示 */
#reportImageContainer {
    margin-bottom: 2rem;
}

#reportImage {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#reportTextContainer {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 4px;
    max-height: 600px;
    overflow-y: auto;
}

#reportText {
    white-space: pre-wrap;
    font-family: "Consolas", "Monaco", "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #333;
}

/* 消息提示 */
.message {
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

