/* 贷款计算器专用样式 */
.loan-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.loan-table td {
    padding: 8px 15px;
    border-bottom: 1px solid #eee;
}

.loan-table tr:last-child td {
    border-bottom: none;
}

.loan-table td:first-child {
    font-weight: bold;
    color: #555;
    width: 30%;
}

.loan-table td:last-child {
    text-align: right;
    color: #1e3c72;
    font-weight: bold;
}

.loan-summary {
    margin-bottom: 25px;
}

.loan-summary h4 {
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1e3c72;
}

.schedule-container {
    margin-top: 25px;
}

.schedule-container h4 {
    color: #333;
    margin-bottom: 15px;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.9em;
}

.schedule-table th,
.schedule-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.schedule-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.schedule-table tbody tr:hover {
    background-color: #f5f5f5;
}

.more-info {
    margin-top: 15px;
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #17a2b8;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 0;
}

.radio-group input[type="radio"] {
    margin-right: 8px;
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.preset-buttons .btn {
    padding: 6px 12px;
    font-size: 0.85em;
}

.rate-reference {
    padding: 10px 0;
}

.rate-reference p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #666;
}

.rate-hint {
    font-size: 0.8em;
    color: #888;
    font-weight: normal;
}

.rate-clickable {
    color: #1e3c72;
    cursor: pointer;
    font-weight: bold;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.rate-clickable:hover {
    color: #2a5298;
}

/* 总结卡片样式 */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.summary-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.card-value {
    font-size: 1.3em;
    font-weight: bold;
    color: #1e3c72;
    margin-bottom: 5px;
}

.card-label {
    font-size: 0.9em;
    color: #666;
}

/* 对比容器样式 */
.comparison-container {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.comparison-container h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2em;
    text-align: center;
}

.comparison-cards {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 15px;
    margin-bottom: 15px;
}

.vs {
    font-size: 1.2em;
    font-weight: bold;
    color: #666;
    align-self: center;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comparison-card {
    flex: 1;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.comparison-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.comparison-card h5 {
    margin: 0 0 10px 0;
    color: #1e3c72;
    font-size: 1.1em;
    font-weight: bold;
}

.comparison-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #1e3c72;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
}

.comparison-desc {
    font-size: 0.9em;
    color: #666;
    margin: 5px 0;
    font-style: italic;
}

.comparison-total,
.comparison-interest {
    font-size: 0.9em;
    margin: 8px 0;
    color: #555;
    padding: 5px 0;
    border-top: 1px dashed #ddd;
}

.savings-info {
    text-align: center;
    padding: 15px;
    background: #e8f4fd;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.savings-info p {
    margin: 0;
    font-size: 1.1em;
}

.savings-info strong {
    color: #d9534f;
    font-size: 1.2em;
}

/* 提前还款计算器样式 */
.early-repayment-container {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.early-repayment-container h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2em;
    text-align: center;
}

.early-repayment-form {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.early-repayment-form .input-group {
    margin-bottom: 10px;
}

.early-repayment-form .input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.early-repayment-form input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.early-repayment-result {
    margin-top: 15px;
    padding: 15px;
    background: #e8f5e9;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.early-repayment-result h5 {
    margin-top: 0;
    color: #28a745;
}

.early-repayment-result p {
    margin: 8px 0;
}

.early-repayment-result strong {
    color: #28a745;
}

#loan-result {
    margin-top: 25px;
    width: 100%;
}

/* 结果区域优化样式 */
#loan-result .result-content {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #1e3c72;
}

#loan-result .result-content h4 {
    margin-top: 0;
    color: #1e3c72;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

#loan-result .summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 15px 0;
}

#loan-result .summary-item {
    flex: 1;
    min-width: 200px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

#loan-result .summary-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #1e3c72;
    display: block;
}

#loan-result .summary-label {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .schedule-table {
        font-size: 0.8em;
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 5px;
    }
    
    .loan-table td {
        padding: 6px 10px;
    }
    
    .comparison-cards {
        flex-direction: column;
    }
    
    .vs {
        transform: rotate(0deg);
        padding: 10px 0;
        order: 1;
    }
    
    .summary-row {
        flex-direction: column;
        gap: 10px;
    }
}