/* Rent vs Buy Calculator Professional CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #f59e0b;
    --primary-hover: #d97706;
    --secondary-color: #3b82f6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --dark: #1f2937;
    --gray: #6b7280;
    --light-gray: #f3f4f6;
    --lighter-gray: #f9fafb;
    --border-color: #e5e7eb;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    padding-top: 60px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    height: 60px;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    text-decoration: none;
}

.brand-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #f59e0b 0%, #dc2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--light-gray);
}

/* Container */
.rvb-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.rvb-header {
    text-align: center;
    margin-bottom: 40px;
    color: var(--dark);
}

.rvb-header h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.rvb-header p {
    font-size: 18px;
    color: var(--gray);
}

/* Calculator Grid */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    background: linear-gradient(135deg, #f6f8fb 0%, #fff 100%);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header .icon {
    font-size: 24px;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.card-content {
    padding: 25px;
}

/* Form Elements */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--gray);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 15px;
    font-size: 18px;
    color: var(--gray);
    font-weight: 500;
}

.input-suffix {
    position: absolute;
    right: 15px;
    font-size: 16px;
    color: var(--gray);
    font-weight: 500;
}

.form-group input[type="number"] {
    width: 100%;
    padding: 12px 45px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.form-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* Input with Slider */
.input-with-slider {
    margin-top: 10px;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--light-gray);
    border-radius: 5px;
    outline: none;
    margin: 15px 0;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--gray);
    margin-top: -10px;
}

/* Decision Card */
.decision-card .card-content {
    padding: 0;
}

.decision-display {
    background: linear-gradient(135deg, #f59e0b 0%, #dc2626 100%);
    padding: 30px;
    text-align: center;
    color: var(--dark);
}

.decision-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.decision-text {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.decision-subtext {
    font-size: 16px;
    opacity: 0.95;
}

.key-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 25px;
    gap: 20px;
}

.metric-item {
    text-align: center;
    padding: 15px;
    background: var(--lighter-gray);
    border-radius: 10px;
}

.metric-label {
    display: block;
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 8px;
}

.metric-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}

.metric-value.green {
    color: var(--success-color);
}

/* Chart Container */
.chart-container {
    height: 350px;
    padding: 10px;
}

/* Analysis Grid */
.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.analysis-section {
    padding: 20px;
    background: var(--lighter-gray);
    border-radius: 10px;
}

.analysis-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.analysis-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
}

.analysis-item span:first-child {
    color: var(--gray);
}

.analysis-item span:last-child {
    font-weight: 600;
    color: var(--dark);
}

.analysis-item.highlight {
    background: var(--white);
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
}

.analysis-item.highlight span:last-child {
    color: var(--primary-color);
    font-size: 16px;
}

.analysis-item.total {
    border-top: 2px solid var(--border-color);
    padding-top: 15px;
    margin-top: 10px;
}

.analysis-item.total span {
    font-size: 16px;
    font-weight: 700;
}

.analysis-item.total span:last-child {
    color: var(--success-color);
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

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

.btn-secondary {
    background: var(--light-gray);
    color: var(--dark);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--dark);
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.btn-success {
    background: var(--success-color);
    color: var(--dark);
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

/* Full Width Card */
.full-width-card {
    grid-column: span 2;
}

/* Breakdown Table */
.breakdown-table {
    overflow-x: auto;
}

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

.breakdown-table th {
    background: var(--light-gray);
    padding: 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid var(--border-color);
}

.breakdown-table td {
    padding: 12px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.breakdown-table tr:hover {
    background: var(--lighter-gray);
}

/* Factors Section */
.factors-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.factors-list {
    list-style: none;
    padding: 0;
}

.factors-list li {
    padding: 12px;
    margin-bottom: 10px;
    background: var(--lighter-gray);
    border-radius: 8px;
    position: relative;
    padding-left: 35px;
    transition: all 0.3s;
}

.factors-list li:before {
    content: '✓';
    position: absolute;
    left: 12px;
    color: var(--success-color);
    font-weight: bold;
    font-size: 18px;
}

.factors-list li:hover {
    background: var(--light-gray);
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
    
    .full-width-card {
        grid-column: span 1;
    }
    
    .factors-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .rvb-header h1 {
        font-size: 32px;
    }
    
    .decision-text {
        font-size: 20px;
    }
    
    .key-metrics {
        grid-template-columns: 1fr;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease;
}