/* 成本计算器页面专用样式 */

/* 成本计算器特定样式 */
.cost-form {
    display: grid;
    gap: 2rem;
}

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

.cost-section {
    background-color: var(--background-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.cost-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

/* 价格输入框特殊样式 */
.price-input {
    position: relative;
}

.price-input::before {
    content: '¥';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-weight: 500;
    z-index: 1;
}

.price-input .form-input {
    padding-left: 2rem;
}

/* 计算结果网格 */
.cost-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cost-result-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.cost-result-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cost-result-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.cost-result-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cost-result-value.positive {
    color: var(--success-color);
}

.cost-result-value.negative {
    color: var(--error-color);
}

.cost-result-value.primary {
    color: var(--primary-color);
}

/* 成本分析图表 */
.cost-analysis-chart {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.cost-chart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cost-chart-label {
    min-width: 80px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.cost-chart-bar {
    flex: 1;
    height: 24px;
    background-color: var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.cost-chart-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    transition: width 0.6s ease;
    border-radius: 12px;
}

.cost-chart-fill.profit-fill {
    background: linear-gradient(90deg, var(--success-color), #10b981);
}

.cost-chart-fill.cost-fill {
    background: linear-gradient(90deg, var(--error-color), #ef4444);
}

.cost-chart-value {
    min-width: 60px;
    font-weight: 600;
    text-align: right;
    color: var(--text-primary);
    font-size: 0.875rem;
}

/* 批量计算区域 */
.batch-calculation {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
}

.batch-calculation .section-title {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.batch-calculation .form-input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.batch-calculation .form-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.batch-calculation .form-input:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.batch-calculation .form-label {
    color: rgba(255, 255, 255, 0.9);
}

/* 计算按钮组 */
.calculation-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.calculation-buttons .btn {
    min-width: 120px;
}

/* 利润指示器 */
.profit-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.profit-indicator.positive {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.profit-indicator.negative {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.profit-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
}

/* 费用明细 */
.cost-breakdown {
    background-color: var(--background-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-top: 1rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breakdown-item:last-child {
    border-bottom: none;
    font-weight: 600;
    color: var(--text-primary);
}

.breakdown-label {
    color: var(--text-secondary);
}

.breakdown-value {
    font-weight: 500;
    color: var(--text-primary);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .cost-input-group {
        grid-template-columns: 1fr;
    }
    
    .cost-result-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cost-chart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .cost-chart-bar {
        width: 100%;
    }
    
    .calculation-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .batch-calculation {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .cost-result-grid {
        grid-template-columns: 1fr;
    }

    .cost-result-value {
        font-size: 1.1rem;
    }

    .cost-section {
        padding: 1rem;
    }
}

/* 成本计算器缩略图和Info Card样式 */
.cost-thumbnail-placeholder {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    margin-top: 40px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.cost-thumbnail-placeholder:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.cost-thumbnail-placeholder.info-card {
    text-align: left;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.cost-thumbnail-placeholder.info-card:nth-child(3) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.cost-thumbnail-placeholder.info-card:nth-child(4) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.cost-thumbnail-placeholder.info-card:nth-child(5) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.cost-thumbnail-placeholder.info-card:nth-child(6) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.cost-thumbnail-placeholder.info-card:nth-child(7) {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.cost-thumbnail-placeholder.info-card h3 {
    text-align: center;
    color: white;
    font-size: 1.4em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cost-thumbnail-placeholder.info-card h3::before {
    font-size: 1.2em;
}

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

.cost-thumbnail-placeholder.info-card li {
    background: rgba(255,255,255,0.1);
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    border-left: 4px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.cost-thumbnail-placeholder.info-card li:hover {
    background: rgba(255,255,255,0.15);
    transform: translateX(5px);
}

.cost-thumbnail-placeholder.info-card li strong {
    color: rgba(255,255,255,0.9);
    font-weight: 600;
}

.cost-thumbnail-placeholder.info-card p {
    background: rgba(255,255,255,0.1);
    padding: 16px;
    border-radius: 8px;
    line-height: 1.6;
    margin: 0;
    backdrop-filter: blur(10px);
}

.cost-thumbnail-placeholder h3 {
    margin-top: 0;
    color: #555;
}

.cost-thumbnail-placeholder.info-card ol {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step-counter;
}

.cost-thumbnail-placeholder.info-card ol li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 40px;
}

.cost-thumbnail-placeholder.info-card ol li::before {
    content: counter(step-counter);
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

@media (max-width: 768px) {
    .cost-thumbnail-placeholder {
        margin-top: 20px;
        padding: 20px;
    }
}