/* 车贷计算器样式 - 与房贷计算器保持一致 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 920px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    padding: 40px 20px;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: white;
    margin-bottom: 12px;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.brand-link:hover {
    opacity: 1;
}

.brand-logo {
    font-size: 1.4rem;
}

.brand-name {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 工具导航 */
.tool-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: nowrap;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.2);
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.nav-item:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.nav-item.active {
    background: white;
    color: #667eea;
}

.nav-icon {
    font-size: 18px;
}

/* 计算器卡片 */
.calculator-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

/* 广告位 */
.ad-placeholder {
    background: #f0f0f0;
    border: 2px dashed #ccc;
    display: none;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    margin: 20px;
    border-radius: 8px;
}

.bottom-ad {
    height: 90px;
    margin: 20px auto;
    max-width: 728px;
}

/* 标签页 */
.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    overflow-x: auto;
}

.tab {
    flex: 1;
    min-width: 100px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

.tab:hover {
    color: #667eea;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

/* 表单样式 */
.form-section {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group label .required {
    color: #dc3545;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

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

.input-group {
    display: flex;
    align-items: center;
}

.input-group .form-control {
    border-radius: 10px 0 0 10px;
    flex: 1;
}

.input-group .unit {
    padding: 12px 16px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-left: none;
    border-radius: 0 10px 10px 0;
    color: #6c757d;
    font-weight: 500;
}

.help-text {
    display: block;
    margin-top: 6px;
    color: #6c757d;
    font-size: 14px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group.half {
    flex: 1;
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    flex: 1;
    min-width: 140px;
}

.radio-item:hover {
    border-color: #667eea;
}

.radio-item input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.radio-item span {
    font-weight: 500;
    color: #333;
}

.radio-item:has(input:checked) {
    border-color: #667eea;
    background: #e3f2fd;
}

/* 计算按钮 */
.btn-calculate {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* 结果区域 */
.result-section {
    margin-top: 30px;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
}

.result-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.result-item {
    background: white;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.result-item .label {
    display: block;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 8px;
}

.result-item .value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
}

.result-item .value.primary {
    color: #667eea;
}

.result-item .value.success {
    color: #28a745;
}

.result-item .value.warning {
    color: #fd7e14;
}

.result-item.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.result-item.highlight .label,
.result-item.highlight .value {
    color: white;
}

/* AI建议 */
.ai-suggestions {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 12px;
    border-left: 4px solid #2196f3;
}

.ai-suggestions h4 {
    color: #1976d2;
    margin-bottom: 12px;
}

.ai-suggestions ul {
    list-style: none;
    padding: 0;
}

.ai-suggestions li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: #333;
}

.ai-suggestions li::before {
    content: "💡";
    position: absolute;
    left: 0;
}

/* 购车成本概览 */
.cost-overview {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
}

.cost-overview h4 {
    color: #333;
    margin-bottom: 15px;
}

.cost-bar-container {
    margin: 15px 0;
}

.cost-bar {
    height: 36px;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    background: #e9ecef;
}

.cost-bar-down {
    height: 100%;
    background: #667eea;
    transition: width 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    min-width: 0;
}

.cost-bar-loan {
    height: 100%;
    background: #764ba2;
    transition: width 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    min-width: 0;
}

.cost-bar-interest {
    height: 100%;
    background: #fd7e14;
    transition: width 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    min-width: 0;
}

.cost-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6c757d;
}

.legend-color {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

/* 还款计划表 */
.schedule-section {
    margin-top: 20px;
}

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

.schedule-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-toggle {
    padding: 8px 16px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-toggle.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.schedule-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
}

.schedule-table table {
    width: 100%;
    border-collapse: collapse;
}

.schedule-table th,
.schedule-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.schedule-table th {
    background: #f8f9fa;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.schedule-table tr:hover {
    background: #f8f9fa;
}

/* 利率参考表 */
.rate-reference {
    padding: 30px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.rate-reference h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.rate-table-container {
    overflow-x: auto;
}

.rate-table {
    width: 100%;
    border-collapse: collapse;
}

.rate-table th,
.rate-table td {
    padding: 15px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.rate-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.rate-table tr.highlight {
    background: #e3f2fd;
}

.rate-table tr.highlight td {
    font-weight: 600;
    color: #1976d2;
}

.rate-note {
    margin-top: 15px;
    color: #6c757d;
    font-size: 14px;
    text-align: center;
}

/* 对比区域 */
.compare-section {
    margin-top: 20px;
}

.compare-section h4 {
    color: #333;
    margin-bottom: 15px;
}

.compare-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.compare-table table {
    width: 100%;
    border-collapse: collapse;
}

.compare-table th,
.compare-table td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.compare-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.compare-table .highlight-row {
    background: #e3f2fd;
}

/* FAQ */
.faq-section {
    padding: 30px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.faq-section h2 {
    color: #333;
    margin-bottom: 24px;
    text-align: center;
}

.faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h4 {
    color: #667eea;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.faq-item p {
    color: #6c757d;
    line-height: 1.6;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 30px;
    color: white;
}

footer a {
    color: white;
    text-decoration: underline;
}

/* 响应式 */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .tool-nav {
        gap: 8px;
        flex-wrap: wrap;
    }

    .nav-item {
        padding: 8px 12px;
        font-size: 12px;
    }

    .tab {
        padding: 12px;
        font-size: 14px;
    }

    .tab-content {
        padding: 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .radio-group {
        flex-direction: column;
    }

    .radio-item {
        min-width: auto;
    }

    .result-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
