:root {
    --bg-color: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.95);
    --primary: #046A38;
    --primary-hover: #034D28;
    --success: #10b981;
    --danger: #DA291C;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: rgba(0, 0, 0, 0.1);
    --glass-blur: blur(20px);
    --input-bg: rgba(255, 255, 255, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    overflow-x: hidden;
}

.glass-background {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(4, 106, 56, 0.05), transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(15, 23, 42, 0.03), transparent 50%);
    z-index: -1;
    pointer-events: none;
}

.flag-button {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid white;
    background: white;
    box-shadow: 0 10px 25px -5px rgba(4, 106, 56, 0.3);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    z-index: 10;
    padding: 0;
}

.flag-button:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 15px 35px -5px rgba(4, 106, 56, 0.4);
}

.flag-button svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.container {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 900px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.6s ease-out;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Tab Navigation */
.tabs-container {
    display: flex;
    background: rgba(241, 245, 249, 0.8);
    padding: 0.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    gap: 0.5rem;
    border: 1px solid var(--border);
}

.tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab svg {
    width: 20px;
    height: 20px;
}

.tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-main);
}

.tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

input[type="text"],
input[type="number"],
select {
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) inset;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(4, 106, 56, 0.15);
}

.checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: rgba(241, 245, 249, 0.5);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    font-size: 1rem;
    user-select: none;
    font-weight: 500;
}

.checkbox-wrapper input {
    display: none;
}

.checkmark {
    width: 24px;
    height: 24px;
    background: var(--input-bg);
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.checkbox-wrapper input:checked~.checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-wrapper input:checked~.checkmark::after {
    content: '';
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

/* Deal Score Gauge */
.gauge-container {
    position: relative;
    width: 200px;
    height: 120px;
    margin: 1.5rem auto 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gauge-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.gauge-bg {
    stroke: var(--border);
    stroke-width: 8;
    stroke-linecap: round;
}

.gauge-fill {
    stroke: var(--success);
    /* Default to green, dynamically changed in JS */
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease-out, stroke 0.5s ease;
}

.gauge-score {
    position: absolute;
    bottom: 20px;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.gauge-label {
    position: absolute;
    bottom: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Deal Score Legend */
.gauge-legend {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(241, 245, 249, 0.5);
    border-radius: 12px;
    border: 1px solid var(--border);
    text-align: left;
}

.gauge-legend h4 {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.legend-item strong {
    color: var(--text-main);
    margin-right: 0.3rem;
    min-width: 45px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 0.8rem;
    display: flex;
    flex-shrink: 0;
}

/* Premium Upload Styles */
.premium-upload-wrapper {
    position: relative;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 2px dashed var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.premium-upload-wrapper:not(.premium-locked):hover {
    border-color: var(--primary);
    background: rgba(4, 106, 56, 0.02);
    cursor: pointer;
}

.upload-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.upload-icon-container {
    position: relative;
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.lock-indicator {
    position: absolute;
    bottom: -6px;
    right: -6px;
    background: var(--text-main);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--bg-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: help;
}

.upload-text {
    text-align: left;
}

.upload-text strong {
    display: block;
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.upload-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.premium-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Locked State */
.premium-locked {
    opacity: 0.6;
    background: rgba(241, 245, 249, 0.8);
    border-color: rgba(0, 0, 0, 0.05);
}

.premium-locked .upload-icon-container {
    color: var(--text-muted);
    background: #e2e8f0;
    box-shadow: none;
}

.premium-locked input[type="file"] {
    cursor: not-allowed;
    display: none;
}

.btn-analyze {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 20px -10px rgba(4, 106, 56, 0.5);
}

.btn-analyze:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -10px rgba(4, 106, 56, 0.6);
}

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

.results-container {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
    animation: slideUp 0.5s ease;
}

.results-container.hidden {
    display: none;
}

.results-container h2 {
    color: var(--text-main);
    margin-bottom: 2rem;
    font-size: 1.8rem;
    text-align: center;
}

/* Tabs Navigation */
.tabs-container {
    display: flex;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.05);
    padding: 0.5rem;
    border-radius: 999px;
    margin-bottom: 2rem;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
}

.tab:hover {
    color: var(--text-main);
}

.tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

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

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.result-card h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
}

.highlight-card {
    background: linear-gradient(135deg, rgba(4, 106, 56, 0.03), rgba(4, 106, 56, 0.08));
    border: 1px solid rgba(4, 106, 56, 0.2);
}

.highlight-card h3 {
    color: var(--primary);
}

/* Compare Cards Additions */
.comparer-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.compare-card {
    padding: 0;
    overflow: hidden;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.compare-img-box {
    width: 100%;
    height: 120px;
    background: #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.compare-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.compare-card:hover .compare-img-box img {
    transform: scale(1.05);
}

.compare-img-box.empty {
    color: var(--text-muted);
    opacity: 0.5;
}

.compare-img-box.empty svg {
    width: 36px;
    height: 36px;
}

.compare-card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.address-tag {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.metric span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric strong {
    font-size: 1rem;
    color: var(--text-main);
}

.compare-gauge-box {
    text-align: center;
    margin-bottom: 1rem;
}

.compare-gauge-score {
    font-size: 1.2rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

.compare-gauge-bar {
    height: 8px;
    width: 100%;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.compare-gauge-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

.compare-Verdict {
    font-size: 0.85rem;
    font-weight: 600;
}

.remove-btn {
    width: 100%;
    margin-top: auto;
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.6rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: var(--danger);
    color: white;
}

.date-divider {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0 0.5rem 0;
}

.date-divider span {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.date-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.diff-amount {
    margin-top: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.success-text {
    color: var(--success) !important;
}

.danger-text {
    color: var(--danger) !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-main {
    color: var(--text-main) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

@media (max-width: 768px) {
    .container {
        padding: 2rem 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .flag-button {
        top: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
    }
}

/* Auth & Top Bar Styles */
.top-bar {
    position: absolute;
    top: 2rem;
    left: 2rem;
    right: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.auth-btn {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.auth-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(206, 17, 36, 0.2);
}

.flag-button {
    position: static;
}

.usage-banner {
    display: inline-block;
    background: rgba(206, 17, 36, 0.1);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 1rem;
    border: 1px solid rgba(206, 17, 36, 0.2);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    position: relative;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(1);
    transition: transform 0.3s ease;
}

.modal.hidden .modal-content {
    transform: scale(0.95);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: var(--text-main);
}

.modal h2 {
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.auth-toggle {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-toggle span {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
}

.auth-toggle span:hover {
    text-decoration: underline;
}

/* Google Login Button Styles */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.auth-divider span {
    padding: 0 10px;
}

.btn-google {
    width: 100%;
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.btn-google:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

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

/* Head-to-Head Selection & Modal */
.card-selector {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
}

.compare-card.selected {
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 4px rgba(206, 17, 36, 0.1);
}

.compare-card.selected .card-selector {
    background: var(--primary);
    border-color: var(--primary);
}

.card-selector svg {
    width: 14px;
    height: 14px;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
}

.compare-card.selected .card-selector svg {
    opacity: 1;
}

.h2h-metric-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.h2h-metric-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.h2h-metric-value {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
}

/* Mortgage Calculator Specific Styles */
.mortgage-calc {
    font-size: 1rem;
}

.calc-row {
    margin-bottom: 2rem;
}

.calc-row label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
}

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

.input-with-symbol input {
    width: 100%;
    padding-right: 2.5rem;
}

.input-with-symbol.no-symbol input {
    padding-right: 1rem;
}

.input-with-symbol span {
    position: absolute;
    right: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* The sliders */
.custom-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    outline: none;
    margin-top: -5px;
    padding: 0;
    box-shadow: none;
    border: none;
    display: block;
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #A3D14D;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 3px solid white;
    /* Move up slightly to overlap track */
    margin-top: -8px;
}

.custom-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #A3D14D;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 3px solid white;
}

.custom-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: linear-gradient(to right, #A3D14D 0%, #A3D14D 50%, #e2e8f0 50%, #e2e8f0 100%);
    border-radius: 4px;
}

/* Radio buttons */
.radio-group.inline-radio {
    display: flex;
    gap: 1.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    position: relative;
    transition: all 0.2s;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #A3D14D;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #A3D14D;
}

.input-group-row {
    display: flex;
    gap: 1rem;
}

.flex-2 { flex: 2; }
.flex-1 { flex: 1; }

.rate-config {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.number-spin-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    width: 150px;
}

.spin-btn {
    background: white;
    border: none;
    color: #A3D14D;
    font-size: 1.2rem;
    width: 35px;
    height: 40px;
    cursor: pointer;
    transition: background 0.2s;
}

.spin-btn:hover {
    background: rgba(163, 209, 77, 0.1);
}

.number-spin-wrapper input[type="number"] {
    flex: 1;
    border: none;
    box-shadow: none;
    padding: 0.5rem;
    text-align: right;
    width: 60px;
    -moz-appearance: textfield;
}

.number-spin-wrapper input[type="number"]::-webkit-outer-spin-button,
.number-spin-wrapper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.spin-suffix {
    padding-right: 0.8rem;
    color: var(--text-muted);
}

/* Results section */
.calc-results-footer {
    border-top: 1px solid var(--border);
    margin-top: 2.5rem;
    padding-top: 1.5rem;
}

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

.pt-2 { padding-top: 1rem; }
.mt-2 { margin-top: 1rem; }
.border-top { border-top: 1px solid var(--border); }

.text-large { font-size: 1.3rem; }
.text-xl { font-size: 1.8rem; }
.text-main { color: var(--text-main); }
.highlight-result {
    background: rgba(163, 209, 77, 0.1);
    padding: 1rem;
    border-radius: 8px;
}
.right-align-input input {
    text-align: right;
}