/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* 主要内容区域 */
.main-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.calculator-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 600px;
}

/* 输入面板 */
.input-panel {
    padding: 40px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
}

.input-panel h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #2d3748;
    font-weight: 600;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
    font-size: 0.9rem;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group small {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #718096;
}

.lpr-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.lpr-container input {
    flex: 1;
}

/* 按钮样式 */
.btn-primary {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    padding: 12px 16px;
    background: #edf2f7;
    color: #4a5568;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e0;
}

/* 结果面板 */
.result-panel {
    padding: 40px;
    background: white;
}

.result-panel h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #2d3748;
    font-weight: 600;
}

.status {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: none;
}

.status.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
    display: block;
}

.status.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
    display: block;
}

.status.info {
    background: #bee3f8;
    color: #2a4365;
    border: 1px solid #90cdf4;
    display: block;
}

/* 结果摘要 */
.result-summary {
    background: #f7fafc;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item .label {
    font-weight: 500;
    color: #4a5568;
}

.result-item .value {
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1rem;
}

/* 还款计划表格 */
.payment-schedule h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #2d3748;
    font-weight: 600;
}

.table-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

#scheduleTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

#scheduleTable th {
    background: #f7fafc;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
}

#scheduleTable td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}

#scheduleTable tr:hover {
    background: #f8fafc;
}

/* 页脚 */
.footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .calculator-section {
        grid-template-columns: 1fr;
    }
    
    .input-panel {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .input-panel,
    .result-panel {
        padding: 25px;
    }
    
    .lpr-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .lpr-container input {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .input-panel,
    .result-panel {
        padding: 20px;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
