/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    margin-bottom: 40px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p {
    text-align: center;
    margin-bottom: 2rem;
    color: #666;
}

.hidden {
    display: none !important;
}

/* 区域样式 */
.section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* 上传区域样式 */
.upload-container {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    align-items: stretch;
}

.upload-column, .standard-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.file-drop-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    min-height: 200px;
    padding: 25px;
    border: 2px dashed #ccc;
    border-radius: 6px;
    background-color: #f8f8f8;
    transition: 0.2s;
    cursor: pointer;
    margin-bottom: 1rem;
}

.file-drop-area:hover,
.file-drop-area.is-active {
    background-color: #eee;
    border-color: #333;
}

.fake-btn {
    background-color: #333;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 14px;
}

.file-msg {
    color: #999;
    font-size: 14px;
    margin-top: 8px;
    text-align: center;
}

.file-input {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-list {
    flex-grow: 1;
    margin-top: 1rem;
    min-height: 50px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 8px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.file-name {
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-remove {
    background: none;
    border: none;
    color: #ff4d4d;
    cursor: pointer;
    font-size: 1.2rem;
}

/* 标准选择区域样式 */
.standard-options {
    margin-bottom: 1rem;
}

select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-size: 0.9rem;
}

/* 按钮样式 */
.primary-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.primary-btn:hover {
    background-color: #555;
}

.primary-btn:disabled {
    background-color: #999;
    cursor: not-allowed;
}

.secondary-btn {
    display: block;
    width: 200px;
    margin: 2rem auto 0;
    padding: 10px 16px;
    background-color: white;
    color: #333;
    border: 1px solid #333;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background-color: #f5f5f5;
}

/* 日志区域样式 */
#log-area {
    margin-bottom: 2rem;
}

#log-content {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
}

.log-item {
    margin-bottom: 0.5rem;
}

/* 结果表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f5f5f5;
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.95rem;
}

/* 优化表格布局，减少拥挤感 */
td {
    font-size: 0.9rem;
    vertical-align: top;
}

td ul {
    margin: 0;
    padding-left: 18px;
}

td li {
    margin-bottom: 3px;
}

tr:hover {
    background-color: #f9f9f9;
}

.view-detail-btn {
    padding: 6px 12px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.view-detail-btn:hover {
    background-color: #555;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

#detail-content {
    margin-top: 1rem;
}

/* 匹配度进度条 */
.match-progress {
    width: 100%;
    background-color: #f1f1f1;
    border-radius: 5px;
    overflow: hidden;
}

.match-progress-bar {
    height: 12px;
    border-radius: 5px;
}

.high-match {
    background-color: #4CAF50;
}

.medium-match {
    background-color: #2196F3;
}

.low-match {
    background-color: #FF9800;
}

/* 报告样式 */
.report-section {
    margin-bottom: 1.5rem;
}

.report-section h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

/* 详细报告中的段落左对齐 */
.report-section p, 
.detailed-report p {
    text-align: left;
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.evidence-block {
    background-color: #f5f5f5;
    border-left: 3px solid #333;
    padding: 0.8rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

/* 引用样式 - 使用双引号和灰色字体 */
.evidence-quote {
    font-style: normal;
    color: #666;
    background-color: #f9f9f9;
    border-left: 3px solid #2196F3;
    padding: 0.8rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    position: relative;
}

.evidence-quote::before {
    content: '"';
    font-size: 1.2rem;
    color: #999;
}

.evidence-quote::after {
    content: '"';
    font-size: 1.2rem;
    color: #999;
}

/* 结论加粗样式 */
.conclusion {
    font-weight: normal;
    color: #333;
    margin-bottom: 5px;
}

.tag {
    display: inline-block;
    background-color: #e0e0e0;
    border-radius: 16px;
    padding: 3px 10px;
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 0.8rem;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* 加载动画样式 */
.loading-dots {
    display: inline-block;
}

.loading-dots span {
    animation-name: loading-dots;
    animation-duration: 1.4s;
    animation-iteration-count: infinite;
    animation-fill-mode: both;
    display: inline-block;
    opacity: 0.7;
}

.loading-dots span:nth-child(2) {
    animation-delay: .2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: .4s;
}

@keyframes loading-dots {
    0% {
        opacity: 0.7;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-5px);
    }
    100% {
        opacity: 0.7;
        transform: translateY(0);
    }
}

/* 等级标签样式 */
.grade {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    font-weight: bold;
    color: white;
}

.grade-s {
    background-color: #5E35B1;
}

.grade-a {
    background-color: #4CAF50;
}

.grade-b {
    background-color: #2196F3;
}

.grade-c {
    background-color: #FF9800;
}

.grade-d {
    background-color: #F44336;
}

/* 引用样式 */
.evidence-quote {
    font-style: normal;
    color: #666;
    background-color: #f9f9f9;
    border-left: 3px solid #2196F3;
    padding: 0.8rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

/* 步骤强调 */
h2 .step-number {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    background-color: #333;
    color: white;
    margin-right: 8px;
    font-size: 0.9rem;
}

/* 评分卡片 */
.score-card {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.score-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.score-summary {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.score-summary .grade {
    margin-right: 1rem;
}

/* 改进表单样式 */
select, textarea {
    transition: border-color 0.3s, box-shadow 0.3s;
}

select:focus, textarea:focus {
    border-color: #333;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
    outline: none;
}

/* 按钮悬停动效 */
.primary-btn, .secondary-btn, .view-detail-btn {
    transition: transform 0.2s, box-shadow 0.2s;
}

.primary-btn:hover, .secondary-btn:hover, .view-detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 标准操作区域 */
.standard-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.text-btn {
    background: none;
    border: none;
    color: #2196F3;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px;
    text-decoration: underline;
    transition: color 0.2s;
}

.text-btn:hover {
    color: #0b7dda;
}

/* 共享标准模态框 */
.share-form {
    margin-top: 20px;
}

.share-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

#standard-editor {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

textarea#standard-text {
    flex-grow: 1;
    min-height: 150px;
}

/* 底部开发者信息 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    padding: 10px;
    text-align: center;
    font-size: 0.8rem;
    color: #777;
    z-index: 10;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* 移动端适配 */
@media (max-width: 768px) {
    /* 容器调整 */
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    /* 上传区域布局改为垂直排列 */
    .upload-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* 文件拖放区域调整 */
    .file-drop-area {
        min-height: 120px;
        padding: 15px;
    }
    
    /* 标准选择区域 */
    #standard-editor {
        min-height: auto;
    }
    
    textarea#standard-text {
        min-height: 120px;
    }
    
    /* 调整按钮大小 */
    .primary-btn, .secondary-btn {
        padding: 10px 15px;
    }
    
    /* 表格调整 */
    table, thead, tbody, th, td, tr {
        display: block;
    }
    
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    tr {
        border: 1px solid #ddd;
        margin-bottom: 15px;
        border-radius: 5px;
        overflow: hidden;
    }
    
    td {
        position: relative;
        padding: 12px 12px 12px 40%;
        border-bottom: 1px solid #eee;
        text-align: left;
        min-height: 30px;
    }
    
    td:before {
        position: absolute;
        top: 12px;
        left: 12px;
        width: 35%;
        white-space: nowrap;
        font-weight: bold;
    }
    
    /* 为表格单元格添加标签 */
    td:nth-of-type(1):before { content: "候选人"; }
    td:nth-of-type(2):before { content: "等级"; }
    td:nth-of-type(3):before { content: "匹配度"; }
    td:nth-of-type(4):before { content: "优势"; }
    td:nth-of-type(5):before { content: "劣势"; }
    td:nth-of-type(6):before { content: "操作"; }
    
    /* 调整模态框 */
    .modal-content {
        width: 95%;
        padding: 1rem;
    }
    
    /* 页脚调整 */
    .footer {
        position: static;
        margin-top: 20px;
        padding: 10px 0;
    }
    
    /* 恢复原来的body边距 */
    body {
        margin-bottom: 0;
    }
    
    /* 详细报告样式调整 */
    .report-section {
        margin-bottom: 1rem;
    }
    
    .evidence-quote {
        padding: 0.5rem;
        margin: 0.3rem 0;
    }
    
    /* 优化匹配进度条在移动端的显示 */
    .match-progress {
        margin-top: 5px;
        height: 10px;
    }
    
    .match-progress-bar {
        height: 10px;
    }
    
    /* 优化评分卡 */
    .score-card {
        padding: 0.8rem;
    }
    
    .score-summary {
        flex-direction: row;
        align-items: center;
    }
    
    .grade {
        margin-right: 10px;
    }
}

/* 新增历史记录相关样式 */
.top-actions {
    display: flex;
    justify-content: flex-end;
    position: absolute;
    top: 20px;
    right: 20px;
    margin-bottom: 0;
}

.icon-btn {
    background: none;
    border: none;
    color: #777;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    background-color: #f0f0f0;
    color: #333;
    transform: translateY(-2px);
}

.history-modal-content {
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
}

.history-list {
    margin-top: 1rem;
    max-height: 60vh;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background-color: #f8f8f8;
    border-radius: 6px;
    border-left: 4px solid #333;
    transition: all 0.2s;
}

.history-item:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.history-info {
    flex: 1;
}

.history-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.history-meta {
    display: flex;
    font-size: 0.85rem;
    color: #666;
}

.history-meta span {
    margin-right: 15px;
}

.history-actions {
    display: flex;
}

.history-view-btn {
    background-color: #333;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.history-view-btn:hover {
    background-color: #555;
}

.loading-message {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.empty-message {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* 设置模态框样式 */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-item label {
    font-weight: 600;
    color: #333;
}

.setting-item input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.setting-description {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.settings-form .primary-btn {
    margin-top: 1rem;
}

/* API使用次数警告 */
.api-limit-warning {
    background-color: #fff3cd;
    color: #856404;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    border-left: 4px solid #ffc107;
}

.api-limit-warning h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #856404;
}

.api-limit-warning p {
    margin: 0;
    text-align: left;
}

.api-limit-warning .primary-btn {
    margin-top: 10px;
}

/* 首页链接样式 */
.home-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.home-link:hover {
    color: #555;
}

/* 历史记录缓存提示 */
.history-cache-notice {
    text-align: center;
    color: #666;
    font-size: 0.8rem;
    margin-top: 1rem;
    margin-bottom: 0;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

/* 从历史记录查看时不显示评估进度 */
.history-view #log-area {
    display: none;
} 