/* 定价计算器样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 表单样式 */
.calculator-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.form-section {
    margin-bottom: 30px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    background: #fafbfc;
}

.form-section h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

/* 输入行布局 */
.input-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: start;
}

.input-item {
    display: flex;
    flex-direction: column;
}

.input-item label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 14px;
}

.input-item input,
.input-item select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

.input-item input:focus,
.input-item select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.input-item input[readonly] {
    background-color: #f7fafc;
    color: #718096;
    cursor: not-allowed;
}

/* 带单位的输入框 */
.input-with-unit {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-unit input {
    flex: 1;
    padding-right: 50px;
}

.input-with-unit .unit {
    position: absolute;
    right: 16px;
    color: #718096;
    font-weight: 600;
    pointer-events: none;
}

/* 平台费用、汇率设置和预估利润三栏布局 */
.platform-section {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.platform-fees,
.exchange-rate-panel,
.profit-estimates {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    background: #fafbfc;
    display: flex;
    flex-direction: column;
}

/* 平台税费特殊样式 */
.platform-fees {
    min-height: 300px;
    padding: 25px;
}

.platform-fees h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
    text-align: left;
}

.platform-fees .input-row {
    margin-bottom: 15px;
}

.platform-fees .input-row:last-child {
    margin-bottom: 0;
}

/* 汇率和利润板块高度与平台税费保持一致 */
.exchange-rate-panel,
.profit-estimates {
    min-height: 300px;
    justify-content: center;
}

.platform-fees h3,
.exchange-rate-panel h3,
.profit-estimates h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
    text-align: center;
}

/* 汇率设置面板样式 */
.exchange-rate-panel {
    flex: 1;
    justify-content: center;
}

.exchange-rate-content {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.rate-display {
    margin-bottom: 20px;
}

.rate-display label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 13px;
}

.rate-value {
    font-size: 24px;
    font-weight: 700;
    color: #2b6cb0;
    background: #ebf8ff;
    padding: 12px 20px;
    border-radius: 8px;
    border: 2px solid #90cdf4;
    display: inline-block;
    min-width: 120px;
    font-family: 'Courier New', monospace;
}

.refresh-rate-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.refresh-rate-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    transform: translateY(-1px);
}

.refresh-rate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.rate-info {
    font-size: 10px;
    color: #718096;
    text-align: center;
}

/* 预估利润样式 */
.profit-estimates {
    flex: 1;
    justify-content: center;
}

.profit-display {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.profit-item label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 14px;
}

.profit-value {
    font-size: 24px;
    font-weight: 700;
    color: #38a169;
    background: #f0fff4;
    padding: 12px 20px;
    border-radius: 8px;
    border: 2px solid #9ae6b4;
    min-width: 120px;
}

/* 利润显示 */
.profit-display {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 150px;
}

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

.profit-item label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 16px;
}

.profit-value {
    font-size: 32px;
    font-weight: 700;
    color: #38a169;
    background: #f0fff4;
    padding: 20px 30px;
    border-radius: 12px;
    border: 2px solid #9ae6b4;
    min-width: 200px;
}

/* 按钮样式 */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-primary {
    background-color: #4299e1;
    color: white;
}

.btn-primary:hover {
    background-color: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(66, 153, 225, 0.3);
}

.btn-success {
    background-color: #38a169;
    color: white;
}

.btn-success:hover {
    background-color: #2f855a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(56, 161, 105, 0.3);
}

.btn-secondary {
    background-color: #718096;
    color: white;
}

.btn-secondary:hover {
    background-color: #4a5568;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(113, 128, 150, 0.3);
}

/* 标题样式 */
h2 {
    text-align: center;
    color: #2d3748;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
}

/* 汇率设置区域样式 */
.exchange-rate-container {
    max-width: 400px;
    margin: 0 auto;
}

.exchange-rate-wrapper {
    text-align: center;
}

.exchange-rate-wrapper label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 12px;
    font-size: 16px;
}

.rate-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.rate-input-group input {
    flex: 1;
    max-width: 200px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    background: #f7fafc;
    color: #2d3748;
}

.refresh-rate-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.refresh-rate-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(66, 153, 225, 0.3);
}

.refresh-rate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.rate-info {
    margin-top: 8px;
    font-size: 12px;
    color: #718096;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .platform-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .platform-fees,
    .exchange-rate-panel,
    .profit-estimates {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .calculator-form {
        padding: 20px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .input-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .platform-fees,
    .exchange-rate-panel,
    .profit-estimates {
        padding: 15px;
        min-height: auto;
    }
    
    .platform-fees h3,
    .exchange-rate-panel h3,
    .profit-estimates h3 {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .rate-value {
        font-size: 20px;
        padding: 10px 15px;
        min-width: 100px;
    }
    
    .profit-value {
        font-size: 20px;
        padding: 10px 15px;
        min-width: 100px;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 24px;
    }
    
    .form-section h3 {
        font-size: 16px;
    }
    
    .input-row {
        gap: 12px;
    }
    
    .input-item input,
    .input-item select {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .profit-value {
        font-size: 20px;
        padding: 12px 16px;
    }
}