* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    padding: 30px;
}

/* Input Panel */
.input-panel {
    background: #f8fafc;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.input-panel h2, .results-panel h2 {
    color: #1e293b;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #475569;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.currency {
    position: absolute;
    left: 15px;
    color: #64748b;
    font-weight: bold;
}

.input-with-icon input {
    width: 100%;
    padding: 15px 15px 15px 40px;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.input-with-icon input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Buttons */
.btn-primary, .btn-secondary {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 2px solid #cbd5e1;
    margin-top: 15px;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* What-If Section */
.what-if-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #e2e8f0;
}

.what-if-section h3 {
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-group {
    margin-bottom: 25px;
}

.slider-group label {
    display: block;
    margin-bottom: 10px;
    color: #475569;
    font-weight: 600;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.slider-container span {
    min-width: 60px;
    font-weight: bold;
    color: #4f46e5;
}

.slider {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    background: #cbd5e1;
    border-radius: 4px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #4f46e5;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Results Panel */
.results-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.metric-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.metric-card:hover {
    transform: translateY(-5px);
}

.metric-card h4 {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #1e293b;
}

#dtiRatio, #creditScore {
    font-size: 1.8rem;
}

/* Chart Container */
.chart-container {
    background: white;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    height: 350px;
}

/* AI Suggestions */
.ai-suggestions {
    background: #f0f9ff;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #bae6fd;
}

.ai-suggestions h3 {
    color: #0369a1;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#suggestions {
    min-height: 120px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
}

.placeholder {
    color: #94a3b8;
    font-style: italic;
    text-align: center;
    margin-top: 40px;
}

/* Footer */
footer {
    background: #1e293b;
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .metrics {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
}