:root {
    --primary-color: #104c82;
    --background-color: #f5f5f5;
    --text-color: #333;
    --warning-color: #ff9900;
    --success-color: #4caf50;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

.header {
    background-color: #9e9e9e29;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 30px;
    margin-right: 10px;
}

.user-actions {
    display: flex;
    align-items: center;
}

.user-actions a {
    color: white;
    margin-left: 15px;
    text-decoration: none;
}

.cart-icon {
    position: relative;
}

.main-content {
    padding: 20px;
    padding-bottom: 100px;
    /* 为固定的 footer 留出空间 */
    width: clamp(786px, 90%, 1800px);
    margin: 0 auto;
}

.page-title {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.page-title img {
    height: 24px;
    margin-right: 10px;
}

.action-buttons {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
    gap: 20px;
}

.action-button {
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cart-table th {
    background-color: #f9f9f9;
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #ddd;
    color: #666;
    font-weight: normal;
}

.cart-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.cart-table input[type="checkbox"] {
    margin: 0;
}

.cart-table input[type="number"],
.gene-table input[type="number"] {
    width: 50px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.gene-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.gene-table th {
    background-color: #f9f9f9;
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #ddd;
    color: var(--primary-color);
    font-weight: bold;
    white-space: nowrap;
    font-size: 0.9em;
}

.gene-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.gene-table input[type="text"],
.gene-table input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    box-sizing: border-box;
}

.gene-table input[type="text"]:focus,
.gene-table input[type="number"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 3px rgba(16, 76, 130, 0.3);
}

.gene-table select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background-color: white;
    box-sizing: border-box;
}

.gene-table select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 3px rgba(16, 76, 130, 0.3);
}

.gene-table input[type="checkbox"] {
    transform: scale(1.2);
    margin: 0;
    cursor: pointer;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
}

.pagination-controls {
    display: flex;
    align-items: center;
}

.pagination-controls span {
    margin: 0 5px;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.add-rows-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-rows-control input[type="number"] {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.add-rows-control input[type="number"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 3px rgba(16, 76, 130, 0.3);
}

.add-rows-control label {
    font-weight: bold;
    color: #333;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    padding: 15px 20px;
    background-color: white;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* 上传区域样式 */
.upload-box {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 20px;
}

.upload-container {
    max-width: 600px;
    margin: 0 auto;
}

.upload-header {
    text-align: center;
    margin-bottom: 20px;
}

.upload-header h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.upload-header p {
    color: #666;
    margin: 0;
}

.upload-area {
    border: 2px dashed var(--primary-color);
    border-radius: 5px;
    padding: 30px;
    text-align: center;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area.highlight {
    background-color: #e8f5e9;
    border-color: #2E7D32;
}

.upload-area p {
    margin-top: 15px;
    color: #666;
}

.file-label {
    color: var(--primary-color);
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
}

.upload-info {
    margin-top: 15px;
    text-align: center;
    color: #999;
    font-size: 0.9em;
}

.file-info {
    margin-top: 15px;
    background-color: #e8f5e9;
    padding: 10px;
    border-radius: 5px;
    text-align: left;
}

.file-info p {
    margin: 5px 0;
    color: #333;
}

/* 表格序列输入框样式 */
.gene-table input.sequence-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: monospace;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gene-table input.sequence-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 3px rgba(16, 76, 130, 0.3);
}

/* 按钮样式美化 */
.action-button {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: bold;
}

.action-button:hover {
    background-color: #e8e8e8;
}

.action-button.active {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.action-button.active:hover {
    background-color: #0d3b64;
}

.table-controls {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
}

.delete-button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.delete-button:hover {
    background-color: #d32f2f;
}

.add-button {
    margin-left: 10px;
    padding: 8px 15px;
    font-size: 0.9em;
    background-color: var(--primary-color);
    color: white;
}

/* 密码子优化区域样式 */
.codon-optimization-box {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 20px;
}

.codon-optimization-box h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
}

.codon-optimization-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.organism-select {
    display: flex;
    align-items: center;
    gap: 10px;
}

.organism-select label {
    font-weight: bold;
    color: #333;
}

.organism-select select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 200px;
}

.optimization-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.optimization-status.success {
    display: block;
    background-color: #e8f5e9;
    color: #2E7D32;
    border: 1px solid #c8e6c9;
}

.optimization-status.error {
    display: block;
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.optimization-status.loading {
    display: block;
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

/* 优化后的序列标记 */
.optimized-sequence {
    position: relative;
}

.optimized-sequence::after {
    content: 'Optimized';
    position: absolute;
    top: -2px;
    right: -8px;
    background-color: var(--success-color);
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 3px;
    z-index: 1;
}

.footer button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    min-width: 100px;
}

.footer button:hover {
    background-color: #0d3b64;
}

/* Continue按钮容器样式 */
.continue-button-container {
    text-align: center;
    margin: 20px 0;
}

.continue-button-container button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    min-width: 100px;
}

.continue-button-container button:hover {
    background-color: #0d3b64;
}

/* 现代化头部样式 */
.header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 100;
}

.header-container {
    width: clamp(786px, 90%, 1800px);
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-wrapper {
    position: relative;
}

.brand-logo {
    width: 180px;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(16, 76, 130, 0.15));
    transition: transform 0.3s ease;
}

.brand-logo:hover {
    transform: scale(1.05);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.help-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.help-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.help-btn svg {
    flex-shrink: 0;
}

/* 现代化导航进度条样式 */
.progress-nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 0;
    position: relative;
    overflow: hidden;
}

.progress-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><pattern id="grain" width="100" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="30" cy="5" r="0.5" fill="rgba(255,255,255,0.03)"/><circle cx="50" cy="15" r="1.5" fill="rgba(255,255,255,0.04)"/><circle cx="70" cy="8" r="0.8" fill="rgba(255,255,255,0.02)"/><circle cx="90" cy="12" r="1.2" fill="rgba(255,255,255,0.06)"/></pattern></defs><rect width="100" height="20" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
    z-index: 1;
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    position: relative;
    min-width: 200px;
}

.step.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.step.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    border-radius: 18px;
    z-index: -1;
}

.step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    transition: all 0.3s ease;
}

.step.active .step-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(5deg);
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: white;
}

.step-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.step-description {
    font-size: 12px;
    opacity: 0.8;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-connector {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    position: relative;
}

.connector-line {
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    border-radius: 1px;
}

.connector-arrow {
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.step.active + .step-connector .connector-arrow {
    transform: translateX(3px);
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-container {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .brand-section {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .brand-logo {
        width: 150px;
    }
    
    .progress-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .step-connector {
        transform: rotate(90deg);
    }
    
    .step {
        min-width: auto;
        width: 100%;
        max-width: 300px;
    }
}

.service-options {
    display: flex;
    justify-content: space-around;
    margin-top: 30px;
}

.service-option {
    text-align: center;
    padding: 15px;
    width: 22%;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.service-option img {
    height: 40px;
    margin-bottom: 10px;
}

/* 载体选择器样式 */
.vector-selector {
    display: none;
    /* 初始状态为隐藏，点击时通过JS设置为block */
    position: absolute;
    z-index: 1000;
    background-color: white;
    border-radius: 5px;
    width: 70%;
    max-width: 800px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /* 添加调试边框 */
    border: 2px solid var(--primary-color);
}

.vector-selector-content {
    background-color: white;
    padding: 10px 20px;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

.vector-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.vector-selector-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 14px;
}

.close-vector-selector {
    font-size: 24px;
    cursor: pointer;
    color: #888;
}

.close-vector-selector:hover {
    color: #333;
}

.vector-selector-body {
    display: flex;
    gap: 20px;
}

.vector-categories,
.vector-names {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
}

.vector-categories h4,
.vector-names h4 {
    margin-top: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
    font-size: 12px;
}

.vector-search {
    margin-bottom: 10px;
}

.vector-search input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

#vector-categories-list,
#vector-names-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 360px;
    overflow-y: auto;
}

#vector-categories-list li,
#vector-names-list li {
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

#vector-categories-list li:hover,
#vector-names-list li:hover {
    background-color: #f5f5f5;
}

#vector-categories-list li.active {
    background-color: var(--primary-color);
    color: white;
}

.vector-name-input {
    cursor: pointer;
    background-color: #f9f9f9;
}

/* 自定义提示样式 */
.custom-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.custom-alert-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 500px;
    animation: alertFadeIn 0.3s ease-out;
}

@keyframes alertFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.custom-alert-header {
    display: flex;
    align-items: center;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.custom-alert-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23007bff"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>') no-repeat center;
    background-size: contain;
}

.custom-alert-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    flex: 1;
}

.custom-alert-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.custom-alert-close:hover {
    background-color: #f8f9fa;
    color: #666;
}

.custom-alert-body {
    padding: 16px 20px;
}

.custom-alert-body p {
    margin: 0;
    line-height: 1.5;
    color: #555;
    font-size: 14px;
}

.custom-alert-footer {
    padding: 12px 20px 16px;
    text-align: right;
    border-top: 1px solid #e9ecef;
}

.custom-alert-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.custom-alert-btn:hover {
    background-color: #0056b3;
}