/* ===========================================
   实验设计首页样式
   =========================================== */

.exp-index {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 0;
}

/* 英雄区 */
.exp-hero {
    text-align: center;
    margin-bottom: 4rem;
}

.exp-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.exp-subtitle {
    font-size: 1.1rem;
    color: #888;
    margin: 0;
}

/* 区块 */
.exp-section {
    margin-bottom: 3rem;
}

.exp-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.exp-section-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.exp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.exp-dot-green {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.exp-dot-yellow {
    background: #eab308;
    box-shadow: 0 0 8px rgba(234, 179, 8, 0.5);
}

/* 卡片网格 */
.exp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

/* 卡片 */
.exp-card {
    background: #0a0a0a;
    border: 1px solid #1f1f1f;
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.exp-card-active:hover {
    background: #111;
    border-color: #7c3aed;
    box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.3);
}

.exp-card-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 图标 */
.exp-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    border-radius: 12px;
    color: #fff;
    flex-shrink: 0;
}

.exp-card-icon svg {
    width: 24px;
    height: 24px;
}

.exp-card-icon-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.exp-card-icon-green {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.exp-card-icon-purple {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

.exp-card-icon-teal {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.exp-card-icon-amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* 内容 */
.exp-card-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 0.5rem 0;
}

.exp-card-content p {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* 标签 */
.exp-card-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.exp-card-tags span {
    font-size: 0.7rem;
    padding: 0.25rem 0.625rem;
    background: #161616;
    border-radius: 4px;
    color: #666;
}

/* 功能特性 */
.exp-features {
    background: #0a0a0a;
    border: 1px solid #1f1f1f;
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
}

.exp-features h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 1.5rem 0;
}

.exp-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

/* ===========================================
   响应式布局
   =========================================== */

@media (max-width: 1024px) {
    .exp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .exp-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .exp-index {
        padding: 1.5rem 0;
    }
    
    .exp-hero h1 {
        font-size: 1.75rem;
    }
    
    .exp-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    
    .exp-card {
        padding: 1.25rem;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
    
    .exp-card-icon {
        width: 48px;
        height: 48px;
        font-size: 0.875rem;
        flex-shrink: 0;
    }
    
    .exp-card-content {
        flex: 1;
        min-width: 0;
    }
    
    .exp-card-content h3 {
        font-size: 0.95rem;
        margin-bottom: 0.25rem;
    }
    
    .exp-card-content p {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .exp-card-tags {
        display: none;
    }
    
    .exp-features {
        padding: 1.5rem;
    }
    
    .exp-features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .exp-feature {
        flex-direction: row;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .exp-feature-num {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
        flex-shrink: 0;
    }
    
    .exp-section {
        margin-bottom: 2rem;
    }
    
    .exp-section-header {
        margin-bottom: 1rem;
    }
    
    .exp-section-header h2 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .exp-hero {
        margin-bottom: 2rem;
    }
    
    .exp-hero h1 {
        font-size: 1.5rem;
    }
    
    .exp-subtitle {
        font-size: 0.9rem;
    }
    
    .exp-card {
        padding: 1rem;
    }
    
    .exp-card-icon {
        width: 40px;
        height: 40px;
    }
    
    .exp-card-content h3 {
        font-size: 0.9rem;
    }
    
    .exp-card-content p {
        font-size: 0.75rem;
    }
}

/* ===========================================
   设计卡片悬停效果优化
   =========================================== */

.exp-card {
    position: relative;
    overflow: hidden;
}

.exp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.exp-card:hover::before {
    opacity: 1;
}

.exp-card-icon-rsm {
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
}

.exp-card-icon-orth {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.exp-card-icon-uni {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.exp-feature {
    display: flex;
    gap: 0.75rem;
}

.exp-feature-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #161616;
    border-radius: 10px;
    color: #7c3aed;
    flex-shrink: 0;
}

.exp-feature-icon svg {
    width: 20px;
    height: 20px;
}

.exp-feature-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.exp-feature-text strong {
    font-size: 0.875rem;
    color: #fff;
    font-weight: 600;
}

.exp-feature-text span {
    font-size: 0.8rem;
    color: #666;
}

/* ===========================================
   实验设计页面公共样式
   =========================================== */

.experiment-container {
    width: 100%;
    max-width: 900px;
    padding: 2rem 0;
    text-align: left;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}

.form-section {
    margin-bottom: 2rem;
}

.section-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #a78bfa;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #222;
    padding-bottom: 1rem;
}

.nav-tab {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    color: #666;
    background-color: transparent;
    border: 1px solid transparent;
}

.nav-tab:hover {
    color: #fff;
    background-color: #111;
}

.nav-tab.active {
    color: #fff;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    border-color: transparent;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    color: #888;
    font-weight: 500;
}

.form-input {
    background-color: #161616;
    border: 1px solid #2a2a2a;
    color: #fff;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    background-color: #1a1a1a;
    border-color: #7c3aed;
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.form-input::placeholder {
    color: #444;
}

.preview-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #0d0d0d;
    border: 1px solid #222;
    border-radius: 10px;
}

.preview-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.125rem 0.5rem;
    background: #333;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 700;
    color: #888;
}

.preview-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.preview-item {
    background-color: #161616;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.preview-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #7c3aed;
}

.preview-label {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}

.formula-box {
    background-color: #0a0a0a;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #a78bfa;
}

.output-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #222;
}

.output-field {
    max-width: 320px;
}

.filename-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filename-extension {
    color: #666;
    font-size: 0.9rem;
}

.btn-submit {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff;
    border: none;
    padding: 0.875rem 2.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.35);
}

.help-section {
    margin-top: 3rem;
    padding: 1.5rem;
    background-color: #0d0d0d;
    border: 1px solid #222;
    border-radius: 10px;
}

.help-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #888;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.125rem 0.5rem;
    background: #222;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 700;
    color: #666;
}

.help-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-list li {
    color: #666;
    font-size: 0.85rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.help-list li:last-child {
    border-bottom: none;
}

.help-list li::before {
    content: "-";
    color: #4ade80;
    font-weight: bold;
}

.help-list strong {
    color: #aaa;
}

.anova-table {
    margin-top: 1rem;
    background-color: #0a0a0a;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
}

.anova-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.anova-table th,
.anova-table td {
    padding: 0.75rem;
    text-align: center;
    border: 1px solid #222;
}

.anova-table th {
    background-color: #161616;
    color: #a78bfa;
    font-weight: 600;
}

.anova-table td {
    color: #888;
}

.anova-table .interaction-highlight {
    background-color: rgba(124, 58, 237, 0.1);
}

/* ===========================================
   全因子设计样式
   =========================================== */

.factor-entry {
    background-color: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.factor-entry:hover {
    border-color: #4a4a4a;
}

.factor-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.factor-field {
    flex: 1;
}

.factor-field-label {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.375rem;
    display: block;
}

.factor-input {
    background-color: #161616;
    border: 1px solid #2a2a2a;
    color: #fff;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    width: 100%;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.factor-input:focus {
    background-color: #1a1a1a;
    border-color: #7c3aed;
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.factor-input::placeholder {
    color: #444;
}

.btn-remove {
    background: transparent;
    border: 1px solid #333;
    color: #666;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-remove:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.btn-add {
    background: transparent;
    border: 1px dashed #4ade80;
    color: #4ade80;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-add:hover {
    background-color: rgba(74, 222, 128, 0.1);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.setting-label {
    font-size: 0.875rem;
    color: #888;
    font-weight: 500;
}

.setting-input {
    background-color: #161616;
    border: 1px solid #2a2a2a;
    color: #fff;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.setting-input:focus {
    background-color: #1a1a1a;
    border-color: #7c3aed;
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.setting-select {
    background-color: #161616;
    border: 1px solid #2a2a2a;
    color: #fff;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
}

/* ===========================================
   二因子设计样式
   =========================================== */

.factor-card {
    background-color: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.factor-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.factor-badge {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.factor-badge-b {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.settings-section {
    background-color: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.factor-card .form-grid {
    grid-template-columns: 1fr 1fr;
}

.settings-section .form-grid {
    grid-template-columns: 1fr 1fr;
}

/* ===========================================
   响应曲面/正交/均匀设计样式
   =========================================== */

.design-info {
    margin-top: 0;
}

.info-card {
    background-color: #0a0a0a;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 1.25rem;
}

.info-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 0.75rem 0;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card li {
    font-size: 0.85rem;
    color: #888;
    padding: 0.375rem 0;
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.info-card li:last-child {
    border-bottom: none;
}

.info-card li::before {
    content: ">";
    color: #7c3aed;
    font-weight: bold;
}
