/* static/calculator.css - 电费计算器专用样式 */

/* 计算器容器 */
.calculator-page {
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-out;
}

.calculator-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
    position: relative;
}

.calculator-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 3px;
}

.calculator-title {
    color: #2c3e50;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calculator-title i {
    font-size: 40px;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calculator-subtitle {
    color: #7f8c8d;
    font-size: 16px;
    font-weight: 500;
    margin-top: 5px;
}

/* 计算器部分样式 */
.calculator-section {
    margin-bottom: 30px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 30px;
    background: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.calculator-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, #3498db, #2ecc71);
    opacity: 0.8;
}

.calculator-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

/* 输入区域 */
.input-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    position: relative;
}

.input-group label {
    min-width: 120px;
    font-size: 16px;
    font-weight: 600;
    color: #34495e;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.input-group label i {
    color: #3498db;
    width: 20px;
    text-align: center;
}

.input-group input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    font-family: "Microsoft YaHei", sans-serif;
    transition: all 0.3s ease;
    background: #f8f9fa;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

.input-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.2);
    background: white;
    transform: translateY(-1px);
}

/* 公式选择 */
.radio-group {
    margin: 20px 0;
}

.radio-option {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    padding: 12px 15px;
    transition: all 0.3s ease;
    border-radius: 10px;
    background: #f8f9fa;
    border: 2px solid transparent;
    cursor: pointer;
}

.radio-option:hover {
    background: #e3f2fd;
    border-color: #bbdefb;
    transform: translateX(5px);
}

.radio-option input[type="radio"] {
    margin-right: 15px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #3498db;
}

/* 计算按钮 */
.calculate-btn {
    display: block;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border: 2px solid #2c3e50;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Microsoft YaHei", sans-serif;
    margin: 25px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.calculate-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-color: #34495e;
}

/* 结果区域 */
.result-group {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    gap: 20px;
}

.result-label {
    min-width: 140px;
    font-size: 16px;
    font-weight: 600;
    color: #34495e;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.result-value {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.result-value:after {
    content: "📋 点击复制";
    opacity: 0.7;
    font-size: 12px;
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.05);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.result-value:hover {
    background-color: #e9ecef;
    border-color: #3498db;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.result-value:hover:after {
    opacity: 1;
    transform: scale(1.05);
}

/* 结果颜色区分 */
.result-usage {
    color: #2980b9;
    border-left: 4px solid #2980b9;
}

.result-premultiply {
    color: #8e44ad;
    border-left: 4px solid #8e44ad;
}

.result-amount {
    color: #d35400;
    border-left: 4px solid #d35400;
    font-size: 20px !important;
    font-weight: 700;
}

.result-formula {
    color: #27ae60;
    border-left: 4px solid #27ae60;
    font-style: italic;
}

/* 计算详情 */
.calculation-detail {
    color: #666;
    background-color: #f8f9fa;
    padding: 18px 20px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    margin-top: 25px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.6;
    position: relative;
}

.calculation-detail:after {
    content: "📋 点击复制";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 11px;
    opacity: 0.7;
    background: rgba(0,0,0,0.05);
    padding: 2px 8px;
    border-radius: 4px;
}

.calculation-detail:hover {
    background-color: #e9ecef;
    border-color: #3498db;
    transform: translateX(5px);
    color: #333;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

/* 操作按钮 */
.calculator-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.action-copy {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border: 2px solid #2c3e50;
    font-size: 15px;
    padding: 14px;
}

.action-reset {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    border: 2px solid #95a5a6;
    font-size: 15px;
    padding: 14px;
}

.action-example {
    background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
    color: #333;
    border: 2px solid #ddd;
    font-size: 15px;
    padding: 16px;
    margin-top: 10px;
    margin-bottom: 30px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .calculator-title {
        font-size: 28px;
        flex-direction: column;
        gap: 10px;
    }

    .calculator-title i {
        font-size: 32px;
    }

    .calculator-section {
        padding: 20px;
    }

    .input-group, .result-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .input-group label, .result-label {
        width: 100%;
        margin-bottom: 5px;
    }

    .input-group input, .result-value {
        width: 100%;
    }

    .calculator-actions {
        flex-direction: column;
    }
}