:root {
    --primary-green: #10b981;
    --secondary-green: #059669;
    --light-green: #d1fae5;
    --dark-green: #065f46;
    --accent-blue: #3b82f6;
    --warning-orange: #f59e0b;
    --danger-red: #ef4444;
    --light-gray: #f8fafc;
    --medium-gray: #e2e8f0;
    --dark-gray: #334155;
    --very-dark-gray: #1e293b;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
    scroll-behavior: smooth;
}

.navbar-brand {
    font-weight: 700;
    color: var(--dark-green);
    font-size: 1.5rem;
}

.navbar-brand:hover {
    color: var(--secondary-green);
}

.hero-section {
    background: linear-gradient(135deg, var(--light-green) 0%, #a7f3d0 100%);
    border-radius: 0 0 2rem 2rem;
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.calculator-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--medium-gray);
    padding: 1.5rem;
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.btn-primary:hover {
    background-color: var(--secondary-green);
    border-color: var(--secondary-green);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.btn-outline-success {
    color: var(--primary-green);
    border-color: var(--primary-green);
    transition: all 0.3s ease;
}

.btn-outline-success:hover {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    color: white;
}

.input-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--medium-gray);
    outline: none;
    transition: background 0.3s ease;
    margin: 0.5rem 0;
}

.input-slider:hover {
    background: #cbd5e1;
}

.input-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-green);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.input-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: var(--secondary-green);
}

.input-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-green);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.result-card {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    margin: 1rem 0;
}

.result-number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.positive-impact {
    color: var(--light-green);
    font-weight: 700;
}

.negative-impact {
    color: #fecaca; /* Light red */
    font-weight: 700;
}

.solution-card {
    border-left: 4px solid var(--primary-green);
    transition: all 0.3s ease;
    background: white;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.solution-card:hover {
    background-color: var(--light-green);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.tool-tip {
    cursor: help;
    border-bottom: 1px dotted #64748b;
    position: relative;
}

.tool-tip:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-gray);
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1000;
    width: auto;
    min-width: 200px;
    text-align: center;
}

footer {
    background-color: var(--very-dark-gray);
    color: #cbd5e1;
    margin-top: 3rem;
}

.disclaimer {
    font-size: 0.85rem;
    color: #64748b;
    border-top: 1px solid #2d3748;
    padding-top: 1rem;
}

/* Dropdown menu fixes */
.dropdown-menu {
    z-index: 1000;
    display: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--light-green);
    color: var(--dark-green);
}

.hidden {
    display: none !important;
}

.main-section {
    display: block;
}

.nav-link-footer {
    transition: color 0.2s ease;
}

.nav-link-footer:hover {
    color: var(--primary-green) !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.25);
}

.list-group-item-action:hover {
    background-color: var(--light-green);
    border-color: var(--primary-green);
}

.table-hover tbody tr:hover {
    background-color: var(--light-green);
}

.card-img-placeholder {
    background: linear-gradient(45deg, var(--light-green), #a7f3d0);
    color: var(--primary-green);
    border-radius: 0.5rem 0.5rem 0 0;
}

.affiliate-link {
    cursor: pointer;
    transition: all 0.2s ease;
}

.affiliate-link:hover {
    background-color: var(--light-green);
    transform: translateY(-2px);
    text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .result-number {
        font-size: 2.5rem;
    }
    
    .hero-section {
        padding: 2rem 0;
        border-radius: 0 0 1.5rem 1.5rem;
    }
    
    .calculator-card {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .display-5 {
        font-size: 1.8rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .result-card {
        padding: 1.5rem;
    }
    
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

@media (max-width: 576px) {
    .result-number {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.5rem;
    }
    
    .hero-section {
        padding: 1.5rem 0;
    }
    
    .calculator-card {
        padding: 0.75rem;
    }
    
    .result-card {
        padding: 1rem;
    }
}

/* Animation for interactive elements */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-element {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Hover effects for cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-green);
}

/* Dropdown menu styles */
.dropdown-menu {
    border: 1px solid var(--medium-gray);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.dropdown-item:hover {
    background-color: var(--light-green);
}

/* Badge styles */
.badge {
    font-size: 0.75em;
}

/* Table styles */
.table th {
    border-top: none;
    font-weight: 600;
}

.table td {
    vertical-align: middle;
}

/* Alert styles */
.alert {
    border-radius: 0.5rem;
}

/* Input group styles */
.input-group-text {
    background-color: var(--medium-gray);
    border-color: var(--medium-gray);
}

/* Sticky footer */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

footer {
    margin-top: auto;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Progress bar styles */
.progress {
    border-radius: 0.5rem;
    height: 0.75rem;
}

/* Tooltip arrow */
.tool-tip:hover::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 4px;
    border-style: solid;
    border-color: transparent transparent var(--dark-gray) transparent;
}