* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #2c3e50 0%, #4a6491 100%);
    color: white;
    padding: 30px 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 40px;
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.input-section, .results-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tab-container {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.tab-button {
    flex: 1;
    padding: 15px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-button.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.tab-button:hover:not(.active) {
    border-color: #667eea;
    color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: 500;
    color: #2c3e50;
}

.info-icon {
    color: #6c757d;
    cursor: help;
}

textarea, input[type="text"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

textarea:focus, input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    resize: vertical;
    min-height: 150px;
}

.sequence-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.file-upload-area {
    border: 3px dashed #dee2e6;
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.file-upload-area i {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 15px;
}

.file-types {
    font-size: 12px;
    color: #6c757d;
    margin: 10px 0;
}

.file-info {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

.btn-primary, .btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.results-section h2 {
    margin-bottom: 25px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-container {
    width: 100%;
    height: 6px;
    background: #dee2e6;
    border-radius: 3px;
    margin-top: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

.error-message {
    background: #fee;
    border: 1px solid #f99;
    border-radius: 10px;
    padding: 20px;
    color: #c00;
    margin-bottom: 20px;
}

.result-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.prediction-badge {
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.prediction-badge.positive {
    background: #d4edda;
    color: #155724;
}

.prediction-badge.negative {
    background: #f8d7da;
    color: #721c24;
}

.result-details {
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item label {
    font-weight: 600;
    color: #495057;
}

.probability-section {
    margin: 30px 0;
}

.probability-bars {
    margin-top: 20px;
}

.probability-bar {
    margin-bottom: 20px;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
}

.bar-container {
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
}

.positive .bar-fill {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.negative .bar-fill {
    background: linear-gradient(90deg, #dc3545, #fd7e14);
}

.result-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.batch-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #6c757d;
}

.results-table-container {
    overflow-x: auto;
    margin-bottom: 25px;
}

#results-table {
    width: 100%;
    border-collapse: collapse;
}

#results-table th {
    background: #2c3e50;
    color: white;
    padding: 15px;
    text-align: left;
}

#results-table td {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
}

#results-table tr:hover {
    background: #f8f9fa;
}

.prediction-cell {
    padding: 5px 15px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 12px;
}

.prediction-cell.positive {
    background: #d4edda;
    color: #155724;
}

.prediction-cell.negative {
    background: #f8d7da;
    color: #721c24;
}

.batch-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-results i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #dee2e6;
}

.info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 0 40px 40px;
}

@media (max-width: 768px) {
    .info-section {
        grid-template-columns: 1fr;
    }
}

.info-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
}

.info-card h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card ul, .info-card ol {
    padding-left: 20px;
    margin: 15px 0;
}

.info-card li {
    margin-bottom: 10px;
    line-height: 1.6;
}

footer {
    background: #2c3e50;
    color: white;
    padding: 25px 40px;
    text-align: center;
    margin-top: 40px;
}

footer p {
    margin-bottom: 10px;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.status-indicator .fa-circle {
    color: #6c757d;
}

.status-indicator.healthy .fa-circle {
    color: #28a745;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
/* 预测徽章样式 */
.prediction-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prediction-badge.positive {
    background-color: #10b981;
    color: white;
}

.prediction-badge.negative {
    background-color: #ef4444;
    color: white;
}

/* 动作按钮样式 */
.action-btn {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 10px;
    margin: 0 2px;
    cursor: pointer;
    color: #4b5563;
    transition: all 0.2s;
}

.action-btn:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.action-btn i {
    font-size: 14px;
}

/* 批量统计样式 */
.batch-stats {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 14px;
    color: #6b7280;
}

/* 表格样式优化 */
.results-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin: 15px 0;
}

#results-table {
    width: 100%;
    border-collapse: collapse;
}

#results-table th,
#results-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

#results-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
    position: sticky;
    top: 0;
    z-index: 10;
}

#results-table tbody tr:hover {
    background-color: #f9fafb;
}

/* 概率条样式 */
.probability-bar {
    margin: 10px 0;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
    color: #4b5563;
}

.bar-container {
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.probability-bar.positive .bar-fill {
    background-color: #10b981;
}

.probability-bar.negative .bar-fill {
    background-color: #ef4444;
}

/* 状态指示器 */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-indicator.healthy {
    color: #10b981;
}

.status-indicator:not(.healthy) {
    color: #ef4444;
}

/* 序列信息显示 */
.sequence-info {
    display: flex;
    gap: 20px;
    margin-top: 8px;
    font-size: 13px;
    color: #6b7280;
}

/* 文件信息 */
.file-info {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
    margin-top: 10px;
}

.file-info p {
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-info i {
    color: #6b7280;
}
/* 添加以下样式 */

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.stat-card.positive {
    border-left: 4px solid #10b981;
}

.stat-card.negative {
    border-left: 4px solid #ef4444;
}

.stat-card.info {
    border-left: 4px solid #3b82f6;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 结果信息提示 */
.results-info {
    background: #e8f4ff;
    border-left: 4px solid #3b82f6;
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
    color: #1e40af;
}

.results-info i {
    margin-right: 8px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-body pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    max-height: 400px;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
}

/* 批量结果容器 */
.batch-stats {
    margin-bottom: 20px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* 复制按钮 */
.copy-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: #2563eb;
}