/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh; /* 确保页面至少占满整个视口 */
    display: flex;
    flex-direction: column;
}

/* 导航栏样式 */
.navbar {
    background-color: #963a3a;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    margin-right: 10px;
}

.tagline {
    color: white;
    font-size: 16px;
    margin-left: 10px;
    font-style: italic; /* 斜体强调 */
    max-width: 600px; /* 限制标语最大宽度 */
}

.nav-links {
    list-style-type: none;
    display: flex;
    flex-wrap: wrap;
}

.nav-links li {
    margin-right: 15px;
    margin-bottom: 5px;
}

/* 普通状态 */
.nav-links a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
}

/* 悬停状态 */
.nav-links a:hover {
    border: 2px solid white;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 激活状态（当前页面） */
.nav-links a.active {
    background-color: white;
    color: #963a3a;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 主页内容 */
.home-content {
    flex: 1; /* 填充剩余空间 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 50px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.home-content h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #333;
}

.home-content p {
    font-size: 18px;
    margin-bottom: 15px;
    color: #555;
}

/* 页脚 */
.footer-copyright {
    background-color: #963a3a;
    color: white;
    text-align: center;
    padding: 15px 0;
    margin-top: auto; /* 固定在底部 */
}

.footer-copyright p {
    margin: 5px 0;
}

/* 小屏幕设备响应式调整 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .logo img {
        height: 40px;
    }
    
    .tagline {
        font-size: 14px;
        margin-left: 5px;
        max-width: 100%;
    }
    
    .nav-links {
        width: 100%;
        justify-content: space-between;
    }
    
    .nav-links li {
        margin-right: 0;
    }
    
    .nav-links a {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    .home-content h1 {
        font-size: 28px;
    }
    
    .home-content p {
        font-size: 16px;
    }
}

/* 搜索页面样式 */
.search-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #963a3a;
    padding-bottom: 10px;
}

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

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #555;
}

.form-group textarea,
.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group textarea:focus,
.form-group input:focus {
    outline: none;
    border-color: #963a3a;
    box-shadow: 0 0 0 2px rgba(150, 58, 58, 0.2);
}

.form-hint {
    font-size: 14px;
    color: #777;
    margin-top: 8px;
    display: flex;
    align-items: center;
}

.form-hint i {
    margin-right: 5px;
}

.btn-primary {
    background-color: #963a3a;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background-color: #7a2e2e;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary:active {
    transform: translateY(0);
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert i {
    margin-right: 10px;
    font-size: 18px;
}

/* 结果展示样式 */
.result-card {
    background-color: #f9f9f9;
}

.result-summary {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

.stat-box {
    flex: 1;
    max-width: 30%;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.result-table {
    margin-top: 20px;
    overflow-x: auto;
}

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

.result-table th, .result-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.result-table th {
    background-color: #f2f2f2;
    font-weight: 600;
}

.result-table tr:hover {
    background-color: #f5f5f5;
}

.result-actions {
    margin-top: 20px;
    text-align: right;
}

.btn-download {
    display: inline-block;
    background-color: #963a3a; /* 修改为指定颜色 */
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-download:hover {
    background-color: #823232; /* 深一点的颜色作为悬停效果 */
}

.btn-download.disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .search-content {
        padding: 15px;
    }
    
    .card {
        padding: 20px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    .result-summary {
        flex-direction: column;
    }
    
    .stat-box {
        max-width: 100%;
        margin-bottom: 15px;
    }
    
    .result-actions {
        text-align: center;
    }
}

/* 下载页面样式 */
.download-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.resource-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.resource-item {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.resource-item:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.resource-item a {
    color: #333;
    text-decoration: none;
    font-size: 18px;
    flex-grow: 1;
}

.resource-item a:hover {
    color: #963a3a;
}

.file-type {
    font-size: 14px;
    color: #777;
    white-space: nowrap;
}

/* 图标样式 */
.resource-item i {
    font-size: 24px;
    color: #963a3a;
}

.fab.fa-github {
    color: #181717;
}

.fas.fa-file-pdf {
    color: #ff4b4b;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .download-content {
        padding: 15px;
    }
    
    .resource-list {
        grid-template-columns: 1fr;
    }
    
    .resource-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 信息页面样式 */
.information-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.info-grid {
    display: grid;
    grid-template-columns:  repeat(2, 1fr);
    gap: 25px;
}

.info-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    padding: 20px;
    display: flex;
    transition: all 0.3s ease;
}

.info-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.info-icon {
    font-size: 36px;
    color: #963a3a;
    margin-right: 15px;
    min-width: 40px;
    text-align: center;
}

.info-details h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.info-details p,
.info-details ul {
    font-size: 16px;
    color: #555;
}

.info-details ul {
    list-style-position: inside;
    padding-left: 0;
}

/* 使用说明样式 */
.usage-steps {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.step {
    display: flex;
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: #963a3a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    margin-right: 20px;
    flex-shrink: 0;
}

.step-content {
    flex-grow: 1;
}

.step-content h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

.step-content p {
    font-size: 16px;
    color: #555;
    margin-bottom: 15px;
}

.example {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    white-space: pre-wrap;
    margin-bottom: 10px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .information-content {
        padding: 15px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
    }
    
    .step-number {
        margin-bottom: 15px;
    }
}

/* 关于页面样式 */
.about-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.about-intro {
    margin-bottom: 30px;
}

.stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    padding: 20px;
    text-align: center;
    min-width: 150px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #963a3a;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 16px;
    color: #555;
}

/* 团队成员样式 */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.team-member {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.team-member:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.member-photo {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.member-info {
    padding: 20px;
}

.member-info h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
}

.member-info p {
    font-size: 16px;
    color: #777;
    margin-bottom: 10px;
}

.member-contact a {
    color: #963a3a;
    margin-right: 10px;
    font-size: 18px;
    transition: color 0.3s ease;
}

.member-contact a:hover {
    color: #7a2e2e;
}

/* 引用样式 */
.citation {
    background-color: #f9f9f9;
    border-left: 4px solid #963a3a;
    padding: 15px;
    margin-top: 15px;
    font-size: 16px;
    line-height: 1.6;
}

/* 合作机构样式 */
.collaborations {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.collab-logo {
    height: 80px;
    max-width: 150px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.collab-logo:hover {
    filter: grayscale(0);
    transform: translateY(-3px);
}

/* 联系信息样式 */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    font-size: 16px;
}

.contact-item i {
    color: #963a3a;
    font-size: 20px;
    margin-right: 10px;
    min-width: 25px;
    text-align: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .about-content {
        padding: 15px;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .collaborations {
        justify-content: center;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .contact-item i {
        margin-bottom: 5px;
    }
}

.prediction-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
}

.option-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.option-radio input {
    margin-right: 10px;
}

.option-radio span {
    font-size: 16px;
    color: #555;
}

.switch-container {
    position: relative;
    width: 80px;
    height: 34px;
    margin: 10px 0;
}

.switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 34px;
    transition: background-color 0.3s;
}

.switch-label:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

input:checked + .switch-label {
    background-color: #963a3a;
}

input:focus + .switch-label {
    box-shadow: 0 0 1px #963a3a;
}

input:checked + .switch-label:before {
    transform: translateX(46px);
}

/* 现代滑动开关样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    margin: 10px 0;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e2e8f0; /* 淡灰色背景 */
    border-radius: 34px;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-label:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.toggle-input:checked + .toggle-label {
    background-color: #963a3a; /* 主题棕色 */
}

.toggle-input:focus + .toggle-label {
    box-shadow: 0 0 0 3px rgba(150, 58, 58, 0.25);
}

.toggle-input:checked + .toggle-label:before {
    transform: translateX(30px);
}

/* 开关开启时的状态指示器 */
.toggle-inner {
    display: block;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
}

.toggle-input:checked + .toggle-label .toggle-inner {
    opacity: 1;
}

/* 标签文本样式 */
.switch-label-text {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

/* 状态标签样式 */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.text-success {
    color: #28a745;
}

.text-info {
    color: #17a2b8;
}

.text-muted {
    color: #6c757d;
}

/* 结果表格样式 */
.result-table th {
    background-color: #963a3a; /* 表头使用主题色 */
    color: white;
}

/* 加载状态 */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 999;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #963a3a; /* 使用主题色 */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* 结果表格和历史记录表格样式 */
.result-table table, .history-table table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* 固定表格布局，确保宽度均匀分配 */
}

.result-table th, .history-table th {
    background-color: #963a3a; /* 使用主题色 */
    color: white;
    padding: 12px 15px;
    text-align: center; /* 表头文字居中 */
    border-bottom: 1px solid #ddd;
    font-weight: 600;
}

.result-table td, .history-table td {
    padding: 12px 15px;
    text-align: center; /* 表格内容文字居中 */
    border-bottom: 1px solid #ddd;
}

/* 确保表格在小屏幕上适应容器宽度 */
@media (max-width: 768px) {
    .result-table, .history-table {
        overflow-x: auto;
    }
    
    .result-table table, .history-table table {
        min-width: 600px; /* 设置最小宽度，防止内容过于拥挤 */
    }
}



/* 转圈圈 */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #ddd;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 动态点点 */
@keyframes dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
  100% { content: ""; }
}

.dots::after {
  content: "";
  animation: dots 1.5s steps(4, end) infinite;
}
