/* PayOff Brand Refresh */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap');

:root {
    --brand-primary: #6c7ff2;
    --brand-primary-2: #764ba2;
    --brand-accent: #ffd700;
    --brand-accent-2: #ffed4e;
    --brand-success: #198754;
    --brand-warning: #ffc107;
    --brand-danger: #dc3545;
    --surface-0: #ffffff;
    --surface-1: #fafbfc;
    --surface-2: #f4f6fb;
    --text-0: #111827;
    --text-1: #374151;
    --text-2: #4b5563;
    --muted: #6b7280;
    --ring: rgba(108, 127, 242, 0.25);
    --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-1);
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(108,127,242,0.15), transparent 60%),
        radial-gradient(900px 500px at 110% 10%, rgba(118,75,162,0.10), transparent 60%),
        var(--surface-2);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-2) 100%);
    color: white;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(140%) blur(6px);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.25);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    transition: transform 0.3s ease;
}

.logo-icon:hover {
    transform: scale(1.1);
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.logo-off {
    color: #ffd700;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    opacity: 0.85;
}

.nav-links a:hover {
    opacity: 1;
    background: rgba(255,255,255,0.12);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
}

/* removed theme toggle styles */

/* Hero Section */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-2) 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(900px 500px at 10% 85%, rgba(120, 119, 198, 0.35) 0%, transparent 60%),
        radial-gradient(700px 400px at 85% 20%, rgba(255, 119, 198, 0.25) 0%, transparent 60%),
        radial-gradient(600px 320px at 45% 45%, rgba(120, 219, 226, 0.18) 0%, transparent 60%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    animation: fadeInUp 0.8s ease-out;
}

.badge-icon {
    font-size: 1.2rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-accent {
    display: block;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 0.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent-2) 100%);
    color: #2c3e50;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.4);
}

.cta-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.cta-button.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.8s backwards;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 2rem;
    opacity: 0.9;
}

.stat-content {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffd700;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}


@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Calculator Section */
.calculators-section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #667eea;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tab-btn:hover:not(.active) {
    background: #f0f0f0;
}

/* Calculator Tabs */
.calculator-tab {
    display: none;
}

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

.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* Form Styles */
.form-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.form-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #667eea;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

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

.form-group input[readonly] {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #495057;
    cursor: not-allowed;
}

.input-help {
  display: block;
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.25rem;
  font-style: italic;
}

/* Extra Payment Section */
.extra-payment-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #f1f8e9 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
}

.extra-payment-section h4 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.preset-btn {
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

/* Results Styles */
.results-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.results-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--brand-primary);
}

.comparison-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.scenario {
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.scenario.standard {
    background: #fff8e1;
    border-color: #ffc107;
}

.scenario.accelerated {
    background: #e8f5e8;
    border-color: #198754;
}

.scenario h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.result-item.large {
    font-size: 1.25rem;
    font-weight: 700;
    padding: 1rem 0;
    background: linear-gradient(135deg, #e3f2fd 0%, #f1f8e9 100%);
    margin-bottom: 1rem;
    border-radius: 8px;
    padding: 1rem;
}

.result-item .label {
    font-weight: 600;
    color: #555;
}

.result-item .value {
    font-weight: 700;
    color: #667eea;
}

/* Savings Summary */
.savings-summary {
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.savings-summary h4 {
    margin-bottom: 1rem;
    text-align: center;
}

.savings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.saving-item {
    text-align: center;
}

.saving-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.saving-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Enhanced Chart Container */
.chart-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.chart-container h4 {
    color: #667eea;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.chart-container canvas {
    max-width: 100%;
    height: auto !important;
    border-radius: 8px;
    background: #fafbfc;
    border: 1px solid #e9ecef;
}

.chart-help {
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Tips Section */
.tips-section {
    background: var(--surface-0);
    padding: 4rem 0;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tip-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    text-align: center;
    transition: transform 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-5px);
}

.tip-card:hover .tip-icon svg {
    transform: scale(1.1);
}

.tip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.tip-icon svg {
    transition: transform 0.3s ease;
}

.tip-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #667eea;
}

.tip-card p {
    color: #666;
    line-height: 1.6;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.newsletter-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.newsletter-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto 1rem;
    gap: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

.newsletter-form button {
    background: #198754;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: #157347;
    transform: translateY(-1px);
}

.privacy-text {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* SEO Content Section */
.seo-content {
    background-color: #f8f9fa;
    padding: 3rem 0;
    border-top: 1px solid #e9ecef;
}

.seo-content h2 {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.seo-content h3 {
    color: #667eea;
    font-size: 1.3rem;
    margin: 2rem 0 1rem 0;
    font-weight: 600;
}

.seo-text {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
    color: #555;
}

.seo-text p {
    margin-bottom: 1.2rem;
}

.seo-text ul {
    margin: 1rem 0 1.5rem 2rem;
}

.seo-text li {
    margin-bottom: 0.5rem;
}

.seo-text em {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

.keyword-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.keyword-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.keyword-section h4 {
    color: #667eea;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.keyword-section p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.2) 0%, transparent 50%);
    z-index: 1;
}

.footer .container {
    position: relative;
    z-index: 2;
}

.footer p {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.footer a {
    color: #ffd700;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #ffed4e;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 300px;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-button {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .calculator-container {
        grid-template-columns: 1fr;
    }
    
    .comparison-container {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none;
    }
    
    .tab-nav {
        flex-direction: column;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .preset-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: 0.6rem 1.2rem;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
    
    .form-card,
    .results-card {
        padding: 1.5rem;
    }
    
    .preset-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Enhanced Error & Success States */
.form-group input.error {
    border-color: #dc3545;
    background-color: #fff5f5;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-group input.success {
    border-color: #28a745;
    background-color: #f8fff9;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    animation: slideDown 0.3s ease-out;
}

.success-message {
    color: #28a745;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    animation: slideDown 0.3s ease-out;
}

.error-icon, .success-icon {
    font-size: 0.75rem;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #667eea;
    font-weight: 500;
    margin: 0;
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    z-index: 1000;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

.notification-success {
    border-left: 4px solid #28a745;
}

.notification-error {
    border-left: 4px solid #dc3545;
}

.notification-info {
    border-left: 4px solid #667eea;
}

.notification-message {
    flex: 1;
    color: #333;
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: #f5f5f5;
    color: #333;
}

.notification.fade-out {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Tooltip System */
.tooltip {
    position: relative;
    cursor: help;
    color: #667eea;
    font-size: 0.9rem;
    margin-left: 0.5rem;
    display: inline-block;
    transition: color 0.2s ease;
}

.tooltip:hover {
    color: #764ba2;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: normal;
    white-space: nowrap;
    max-width: 250px;
    white-space: normal;
    width: max-content;
    max-width: 250px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Mobile tooltip adjustments */
@media (max-width: 768px) {
    .tooltip::before {
        bottom: auto;
        top: 130%;
        max-width: 200px;
        left: -100px;
        transform: none;
    }
    
    .tooltip::after {
        bottom: auto;
        top: 120%;
        left: 50%;
        transform: translateX(-50%);
        border-top-color: transparent;
        border-bottom-color: #333;
    }
}

/* Calculator Actions */
.calculator-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn.secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.action-btn.secondary:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-btn:active {
    transform: translateY(0);
}

/* Mobile Improvements */
@media (max-width: 768px) {
    .calculator-container {
        flex-direction: column;
    }
    
    .calculator-form,
    .calculator-results {
        width: 100%;
    }
    
    .calculator-actions {
        justify-content: center;
    }
    
    .action-btn {
        flex: 1;
        min-width: 140px;
        justify-content: center;
    }
    
    .preset-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .preset-btn {
        padding: 1rem;
        font-size: 1rem;
        touch-action: manipulation;
    }
    
    .form-group input,
    .form-group select {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 1rem;
    }
    
    .tab-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .tab-btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .comparison-container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .scenario {
        width: 100%;
    }
    
    .savings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .chart-container {
        padding: 1.5rem 1rem;
        margin-top: 1.5rem;
    }
    
    .chart-container h4 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .chart-help {
        font-size: 0.8rem;
        margin-top: 0.75rem;
    }
}

/* Touch Improvements */
@media (hover: none) and (pointer: coarse) {
    .preset-btn:hover {
        background: #667eea;
        color: white;
        transform: none;
    }
    
    .tab-btn:hover {
        background: #667eea;
        color: white;
    }
    
    .tooltip:hover::before,
    .tooltip:hover::after {
        opacity: 0;
        visibility: hidden;
    }
    
    /* Touch-friendly tooltips */
    .tooltip:focus::before,
    .tooltip:focus::after {
        opacity: 1;
        visibility: visible;
    }
}

/* FAQ Section */
.faq-section {
    background: #f8f9fa;
    padding: 4rem 0;
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.faq-question {
    padding: 1.5rem 2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-question h3 {
    color: #667eea;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

.faq-toggle {
    color: #667eea;
    font-size: 1.5rem;
    font-weight: bold;
    margin-left: 1rem;
    transition: transform 0.3s ease;
    user-select: none;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: #fafbfc;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 2rem 1.5rem 2rem;
}

.faq-answer p {
    color: #555;
    line-height: 1.6;
    margin: 1rem 0 0 0;
}

/* Mobile FAQ adjustments */
@media (max-width: 768px) {
    .faq-question {
        padding: 1.25rem 1.5rem;
    }
    
    .faq-question h3 {
        font-size: 1rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 1.5rem 1.25rem 1.5rem;
    }
    
    .faq-toggle {
        margin-left: 0.75rem;
    }
}

/* Success Message */
.success-message {
    background: #d1edff;
    color: #0c5460;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
}

/* Related Content & Internal Linking */
.related-content {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    padding: 4rem 0;
    border-top: 1px solid #e1e8ed;
}

.related-content h2 {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-clusters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.cluster {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cluster:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.cluster h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #667eea;
}

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

.cluster li {
    margin-bottom: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f2f5;
    transition: color 0.3s ease;
}

.cluster li:last-child {
    border-bottom: none;
}

.internal-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.internal-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.strategy-links li,
.debt-types li {
    color: #4a5568;
    line-height: 1.6;
}

.strategy-links strong,
.debt-types strong {
    color: #2c3e50;
    font-weight: 700;
}

.quick-tips {
    text-align: center;
    margin-top: 3rem;
}

.quick-tips h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

.tip-card h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.75rem;
}

.tip-card p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .related-content {
        padding: 2.5rem 0;
    }
    
    .related-content h2 {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
    
    .content-clusters {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .cluster {
        padding: 1.5rem;
        margin-bottom: 0;
    }
    
    .cluster h3 {
        font-size: 1.2rem;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tip-card {
        padding: 1.25rem;
    }
    
    .quick-tips h3 {
        font-size: 1.5rem;
    }
}

/* Budget Calculator Styles */
.budget-tabs {
    width: 100%;
}

.budget-calculator-intro {
    background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid #bbdefb;
}

.budget-calculator-intro h4 {
    color: #1565c0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.calculator-explanation {
    color: #37474f;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.how-it-works,
.how-to-use,
.results-explanation {
    margin-bottom: 1.5rem;
}

.how-it-works h5,
.how-to-use h5,
.results-explanation h5 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #2196f3;
    padding-bottom: 0.25rem;
    display: inline-block;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.works-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.works-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.works-content h6 {
    color: #1565c0;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.works-content p {
    color: #546e7a;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.step-number {
    background: #4caf50;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h6 {
    color: #2e7d32;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.step-content p {
    color: #546e7a;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

.results-guide {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.result-type {
    padding: 1rem;
    border-radius: 8px;
    background: white;
}

.result-type.positive {
    border-left: 4px solid #4caf50;
    background: linear-gradient(135deg, #ffffff 0%, #f1f8e9 100%);
}

.result-type.negative {
    border-left: 4px solid #f44336;
    background: linear-gradient(135deg, #ffffff 0%, #ffebee 100%);
}

.result-type.neutral {
    border-left: 4px solid #ff9800;
    background: linear-gradient(135deg, #ffffff 0%, #fff3e0 100%);
}

.result-type h6 {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.result-type.positive h6 {
    color: #2e7d32;
}

.result-type.negative h6 {
    color: #c62828;
}

.result-type.neutral h6 {
    color: #ef6c00;
}

.result-type p {
    color: #546e7a;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

/* Compact Layout Styles */
.calculator-container.compact {
    max-height: none;
}

.calculator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calculator-header h3 {
    margin: 0;
    color: #2c3e50;
}

.calculator-header .calculator-actions {
    margin: 0;
}

/* Collapsible Help Section */
.help-section {
    background: #e3f2fd;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #bbdefb;
}

.help-section.collapsed {
    max-height: 0;
    margin-bottom: 0;
    border: none;
}

.help-section:not(.collapsed) {
    max-height: 1000px;
    padding: 1rem;
}

.help-content h4 {
    color: #1565c0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.help-content p {
    color: #37474f;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.quick-features {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.feature-item {
    background: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #1565c0;
    border: 1px solid #2196f3;
}

.quick-steps {
    background: white;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 4px solid #4caf50;
}

.quick-steps p {
    margin: 0;
    color: #2e7d32;
    font-size: 0.9rem;
}

/* Compact Grid Layout */
.budget-sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.budget-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.budget-section.income-section {
    border-left-color: #4caf50;
}

.budget-section.essentials-section {
    border-left-color: #f44336;
}

.budget-section.wants-section {
    border-left-color: #ff9800;
}

.budget-section.savings-section {
    border-left-color: #2196f3;
}

.budget-section h4 {
    color: #2c3e50;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.form-group.compact {
    margin-bottom: 0.75rem;
}

.form-group.compact label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    display: block;
    margin-bottom: 0.25rem;
}

.form-group.compact input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
}

.total-display.compact {
    background: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #dee2e6;
    font-size: 0.9rem;
}

.total-display.compact .label {
    font-weight: 600;
    color: #495057;
}

.total-display.compact .value {
    font-weight: 700;
    color: #667eea;
}

.budget-tab-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.budget-tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: #6c757d;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.budget-tab-btn:hover {
    background: #f8f9fa;
    color: #495057;
}

.budget-tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.budget-calculator-tab {
    display: none;
}

.budget-calculator-tab.active {
    display: block;
}

.budget-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.budget-section h4 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.total-display {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #667eea;
}

.total-display .label {
    font-weight: 600;
    color: #495057;
}

.total-display .value {
    font-weight: 700;
    font-size: 1.2rem;
    color: #667eea;
}

.budget-overview {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.budget-balance .value.positive {
    color: #198754;
}

.budget-balance .value.negative {
    color: #dc3545;
}

.budget-breakdown {
    margin-bottom: 2rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.breakdown-item .category {
    font-weight: 500;
    color: #495057;
}

.breakdown-item .amount {
    font-weight: 600;
    color: #333;
}

.breakdown-item .percentage {
    font-weight: 700;
    color: #667eea;
    min-width: 60px;
    text-align: right;
}

.budget-health {
    margin-top: 2rem;
}

.recommendations {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recommendation {
    padding: 1rem;
    border-radius: 8px;
    margin: 0;
}

.recommendation.success {
    background: #d1e7dd;
    color: #0f5132;
    border-left: 4px solid #198754;
}

.recommendation.warning {
    background: #fff3cd;
    color: #664d03;
    border-left: 4px solid #ffc107;
}

.recommendation.info {
    background: #cff4fc;
    color: #055160;
    border-left: 4px solid #0dcaf0;
}

.recommendation.neutral {
    background: #f8f9fa;
    color: #6c757d;
    border-left: 4px solid #adb5bd;
}

/* 50/30/20 Rule Styles */
.rule-explanation, .fund-explanation {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: #6c757d;
    font-style: italic;
}

.rule-breakdown {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: white;
    border: 2px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rule-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.rule-item.needs {
    border-color: #198754;
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f5e8 100%);
}

.rule-item.wants {
    border-color: #ffc107;
    background: linear-gradient(135deg, #f8f9fa 0%, #fffbf0 100%);
}

.rule-item.savings {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f2ff 100%);
}

.rule-percentage {
    font-size: 2.5rem;
    font-weight: 800;
    color: #667eea;
    min-width: 80px;
}

.rule-item.needs .rule-percentage {
    color: #198754;
}

.rule-item.wants .rule-percentage {
    color: #ffc107;
}

.rule-details h4 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.rule-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.rule-tips {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.rule-tips h4 {
    margin-bottom: 1rem;
    color: #495057;
}

.rule-tips ul {
    list-style-type: none;
    padding-left: 0;
}

.rule-tips li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.rule-tips li:before {
    content: "💡";
    position: absolute;
    left: 0;
}

/* Emergency Fund Styles */
.emergency-fund-intro {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f4fd 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid #d1ecf1;
}

.emergency-fund-intro h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.fund-importance,
.fund-guidelines {
    margin-top: 1.5rem;
}

.fund-importance h5,
.fund-guidelines h5 {
    color: #495057;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.fund-importance ul {
    list-style: none;
    padding-left: 0;
}

.fund-importance li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #495057;
    line-height: 1.5;
}

.fund-importance li:before {
    content: "💰";
    position: absolute;
    left: 0;
}

.guidelines-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.guideline-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.guideline-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: #667eea;
    min-width: 80px;
}

.guideline-desc {
    color: #6c757d;
    font-size: 0.9rem;
}

.field-explanations {
    background: #fff3cd;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #ffc107;
}

.field-explanations h4 {
    color: #856404;
    margin-bottom: 0.5rem;
}

.field-explanations p {
    color: #856404;
    margin: 0;
    font-size: 0.95rem;
}

.field-help {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    border-left: 3px solid #667eea;
    font-size: 0.9rem;
    color: #495057;
}

.field-help strong {
    color: #2c3e50;
}

.field-help ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
}

.field-help li {
    margin-bottom: 0.25rem;
}

.emergency-fund-strategies {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f8ff 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #d1ecf1;
}

.emergency-fund-strategies h4 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.strategy-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.strategy-section h5 {
    color: #495057;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.25rem;
}

.strategy-section ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.strategy-section li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #495057;
    line-height: 1.5;
}

.strategy-section li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #198754;
    font-weight: bold;
}

.emergency-examples {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.emergency-yes,
.emergency-no {
    padding: 1rem;
    border-radius: 8px;
    background: white;
}

.emergency-yes {
    border-left: 4px solid #198754;
    background: linear-gradient(135deg, #ffffff 0%, #f0fff4 100%);
}

.emergency-no {
    border-left: 4px solid #dc3545;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
}

.emergency-yes h6 {
    color: #198754;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.emergency-no h6 {
    color: #dc3545;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.emergency-yes ul,
.emergency-no ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.emergency-yes li {
    padding: 0.25rem 0;
    color: #0f5132;
    font-size: 0.9rem;
}

.emergency-no li {
    padding: 0.25rem 0;
    color: #721c24;
    font-size: 0.9rem;
}

.fund-targets {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.target-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.savings-timeline {
    margin-bottom: 2rem;
}

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

.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    max-width: 300px;
}

.progress-bar {
    flex: 1;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    border-radius: 10px;
}

.progress-text {
    font-weight: 600;
    color: #667eea;
    min-width: 50px;
}

.fund-milestones {
    margin-bottom: 2rem;
}

.milestones {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.milestone {
    padding: 1rem;
    border-radius: 8px;
    background: white;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.milestone.reached {
    border-color: #198754;
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f5e8 100%);
}

.milestone.pending {
    border-color: #ffc107;
    background: linear-gradient(135deg, #f8f9fa 0%, #fffbf0 100%);
}

.milestone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.milestone-label {
    font-weight: 600;
    color: #495057;
}

.milestone-amount {
    font-weight: 700;
    color: #333;
}

.milestone-progress {
    font-size: 0.9rem;
}

.status.reached {
    color: #198754;
    font-weight: 600;
}

.status.pending {
    color: #ffc107;
    font-weight: 600;
}

.emergency-tips {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
}

.emergency-tips h4 {
    margin-bottom: 1rem;
    color: #495057;
}

.emergency-tips ul {
    list-style-type: none;
    padding-left: 0;
}

.emergency-tips li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.emergency-tips li:before {
    content: "💡";
    position: absolute;
    left: 0;
}

/* Budget Mobile Styles */
@media (max-width: 768px) {
    .budget-tab-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .budget-tab-btn {
        text-align: center;
    }
    
    .rule-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .rule-percentage {
        min-width: auto;
    }
    
    .progress-container {
        max-width: none;
        width: 100%;
    }
    
    .milestone-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .budget-section {
        padding: 1rem;
    }
    
    .total-display {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .breakdown-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .breakdown-item .percentage {
        text-align: center;
    }
    
    .emergency-examples {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .guidelines-grid {
        grid-template-columns: 1fr;
    }
    
    .guideline-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .guideline-amount {
        min-width: auto;
    }
    
    .emergency-fund-intro,
    .emergency-fund-strategies {
        padding: 1rem;
    }
    
    .strategy-section {
        padding: 0.75rem;
    }
    
    .field-help {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    .budget-calculator-intro {
        padding: 1rem;
    }
    
    .works-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .works-item {
        padding: 0.75rem;
    }
    
    .step-item {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .step-content h6 {
        font-size: 0.9rem;
    }
    
    .step-content p,
    .works-content p,
    .result-type p {
        font-size: 0.8rem;
    }
    
    .results-guide {
        gap: 0.75rem;
    }
    
    .result-type {
        padding: 0.75rem;
    }
    
    .budget-sections-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .calculator-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .calculator-header .calculator-actions {
        display: flex;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .quick-features {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .feature-item {
        flex: 1;
        text-align: center;
        min-width: 120px;
    }
    
    .budget-section {
        padding: 0.75rem;
    }
    
    .form-group.compact input {
        padding: 0.6rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}