/* RAID计算器页面样式 */
.raid-calculator-page {
    max-width: 1400px;
    margin: 40px auto 60px;
    padding: 0 20px;
}

/* 页面标题 */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.header-icon {
    width: 56px;
    height: 56px;
    color: #2c3e50;
    margin-bottom: 16px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

.page-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* 计算区域 */
.calculator-area {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

/* 配置卡片 */
.config-container,
.result-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.config-card,
.result-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
}

.config-card h3,
.result-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-card h3 svg,
.result-card h3 svg {
    width: 20px;
    height: 20px;
}

/* RAID类型选择 */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    font-size: 14px;
}

.value-display {
    color: #2c3e50;
    font-size: 18px;
    margin-left: 8px;
}

.raid-types {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.raid-btn {
    background: #f8f8f8;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.raid-btn:hover {
    border-color: #2c3e50;
    background: #fff;
}

.raid-btn.active {
    background: #2c3e50;
    border-color: #2c3e50;
    color: #fff;
}

.raid-name {
    font-weight: 600;
    font-size: 14px;
}

.raid-desc {
    font-size: 11px;
    opacity: 0.8;
}

/* 调整按钮 */
.adjust-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.adjust-btn:hover {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}

.adjust-btn:active {
    transform: scale(0.95);
}

/* 滑块 */
.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e8e8e8;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2c3e50;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2c3e50;
    cursor: pointer;
    border: none;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}

/* 下拉选择 */
.select-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}

.select-input:focus {
    outline: none;
    border-color: #2c3e50;
}

/* RAID说明 */
.raid-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-top: 8px;
}

.raid-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 12px 0;
}

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

.raid-info li {
    font-size: 13px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 8px;
}

.raid-info li:last-child {
    margin-bottom: 0;
}

/* 容量图表 */
.capacity-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

#capacityChart {
    display: block;
}

.capacity-values {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.capacity-item {
    text-align: center;
}

.capacity-item.highlight {
    grid-column: 1 / -1;
    background: #f0f8ff;
    padding: 12px;
    border-radius: 8px;
}

.capacity-item .label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.capacity-item .value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}

.capacity-item.highlight .value {
    font-size: 28px;
    color: #4caf50;
}

/* 性能指标 */
.metrics-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: #f8f8f8;
    border-radius: 8px;
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.metric-icon svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

.metric-icon.fault-tolerance {
    background: #4caf50;
}

.metric-icon.read-speed {
    background: #2196f3;
}

.metric-icon.write-speed {
    background: #9c27b0;
}

.metric-icon.rebuild {
    background: #ff9800;
}

.metric-content {
    flex: 1;
}

.metric-label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.metric-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.metric-value.risk {
    color: #ff9800;
}

/* 性能条 */
.performance-bar {
    width: 100%;
    height: 24px;
    background: #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.performance-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.performance-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* 推荐建议 */
.recommendation {
    display: flex;
    gap: 12px;
    background: #fffbf0;
    border: 1px solid #ffe9a8;
    border-radius: 8px;
    padding: 16px;
}

.rec-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.rec-content {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.rec-content strong {
    color: #2c3e50;
}

/* 信息部分 */
.info-section {
    margin-bottom: 40px;
}

.info-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
}

.info-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 32px 0 16px 0;
}

.info-content {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 32px;
}

/* 对比表格 */
.comparison-table {
    overflow-x: auto;
    margin-bottom: 24px;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

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

.comparison-table th {
    background: #f8f8f8;
    font-weight: 600;
    color: #2c3e50;
}

.comparison-table tbody tr:hover {
    background: #f8f8f8;
}

/* 选择指南 */
.selection-guide {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.guide-item {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 16px;
}

.guide-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.guide-badge.green {
    background: #d1fae5;
    color: #065f46;
}

.guide-badge.blue {
    background: #dbeafe;
    color: #1e40af;
}

.guide-badge.orange {
    background: #fed7aa;
    color: #92400e;
}

.guide-badge.purple {
    background: #e9d5ff;
    color: #6b21a8;
}

.guide-item p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* 警告框 */
.warning-box {
    display: flex;
    gap: 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin-top: 24px;
}

.warning-box svg {
    width: 24px;
    height: 24px;
    color: #ff9800;
    flex-shrink: 0;
}

.warning-box strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 8px;
}

.warning-box p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .calculator-area {
        grid-template-columns: 1fr;
    }

    .raid-types {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 24px;
    }

    .info-section h2 {
        font-size: 22px;
    }

    .raid-types {
        grid-template-columns: repeat(2, 1fr);
    }

    .capacity-values {
        grid-template-columns: 1fr;
    }

    .selection-guide {
        grid-template-columns: 1fr;
    }

    .info-content {
        padding: 20px;
    }

    .comparison-table {
        font-size: 12px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 8px;
    }
}
