:root {
    --bg-left: #f0f6ff;
    --bg-right: #ffffff;
    --primary-blue: #0055ff;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --error-bg: #ffebeb;
    --error-text: #cc0000;
    --input-bg: #f9f9f9;
    --btn-disabled: #cccccc;
    --btn-text-disabled: #888888;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body,
html {
    height: 100%;
    width: 100%;
}

.split-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Left Panel Styling */
.left-panel {
    flex: 1;
    background-color: var(--bg-left);
    display: flex;
    flex-direction: column;
    padding: 40px;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: #0033cc;
    margin-bottom: auto;
}

.visual-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: auto;
}

/* Mockup Card Styling */
.card-mockup {
    background: white;
    border-radius: 24px;
    padding: 24px;
    width: 320px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.mockup-header {
    text-align: center;
    margin-bottom: 20px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-info .greeting {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
}

.user-info .subtext {
    font-size: 0.8rem;
    color: var(--text-gray);
}

.mockup-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.action-btn.primary {
    background-color: var(--primary-blue);
    color: white;
}

.action-btn.secondary {
    background-color: transparent;
    color: var(--primary-blue);
    width: auto;
    padding: 0 10px;
}

.mockup-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Stats Styling */
.stats-container {
    display: flex;
    gap: 20px;
}

.stat-box {
    background: #eef4ff;
    padding: 20px;
    border-radius: 16px;
    width: 150px;
}

.stat-value {
    font-weight: 700;
    margin: 8px 0 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-gray);
}

/* Right Panel Styling */
.right-panel {
    flex: 1;
    background-color: var(--bg-right);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* transition support */
    overflow: hidden;
}

.form-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    text-align: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.hidden {
    display: none !important;
    opacity: 0;
    transform: translateX(20px);
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: var(--text-dark);
}

.input-group {
    text-align: left;
    margin-bottom: 24px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 0;
    /* Reset for label-row */
}

.dynamic-value {
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 1rem;
}

/* Text Input Styling (Email) */
.input-group input[type="email"],
.input-group input[type="text"] {
    width: 100%;
    padding: 16px;
    background-color: var(--error-bg);
    border: 1px solid var(--error-bg);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    margin-top: 8px;
    /* if not inside label-row */
}

.input-group input:focus {
    border-color: var(--primary-blue);
    background-color: white;
}

/* Slider (Range) Styling - Neumorphic/3D White */
input[type=range].slider {
    -webkit-appearance: none;
    width: 100%;
    margin: 15px 0;
    background: transparent;
}

input[type=range].slider:focus {
    outline: none;
}

/* Slider Track - The "Groove" */
input[type=range].slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 16px;
    /* Thicker track as per image */
    cursor: pointer;
    background: #f0f0f3;
    /* Light grey base */
    border-radius: 10px;
    /* Inner shadow for groove effect */
    box-shadow:
        inset 4px 4px 8px rgba(174, 174, 192, 0.4),
        inset -4px -4px 8px rgba(255, 255, 255, 1);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

/* Slider Thumb - The "Knob" */
input[type=range].slider::-webkit-slider-thumb {
    height: 32px;
    width: 32px;
    border-radius: 50%;
    background: #f0f0f3;
    cursor: grab;
    -webkit-appearance: none;
    margin-top: -9px;
    /* (16 - 32) / 2 = -8, but slight adjustment for look */

    /* 3D Outset Shadow (Neumorphism) */
    box-shadow:
        6px 6px 12px rgba(174, 174, 192, 0.5),
        -6px -6px 12px rgba(255, 255, 255, 1);

    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}

input[type=range].slider::-webkit-slider-thumb:hover {
    transform: scale(1.05);
}

input[type=range].slider:active::-webkit-slider-thumb {
    cursor: grabbing;
    background: #e6e6e9;
    box-shadow:
        inset 2px 2px 5px rgba(174, 174, 192, 0.4),
        inset -2px -2px 5px rgba(255, 255, 255, 1);
}

/* Specific styling for labels inside the view */
.label-row {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.input-group label {
    font-size: 0.9rem;
    color: #444;
    font-weight: 600;
}

/* Projection Box */
.projection-box {
    background-color: #f0f8ff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.projection-label {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.projection-total {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
}

.error-message {
    color: var(--error-text);
    font-size: 0.85rem;
    margin-top: 8px;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background-color: #cccccc;
    /* Default Disabled */
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: not-allowed;
    margin-bottom: 16px;
    font-size: 1rem;
    transition: all 0.2s;
}

/* Forces all enabled submit buttons to be Black 3D */
.submit-btn:not(:disabled) {
    background-color: #1a1a1a !important;
    cursor: pointer;
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.2),
        0 4px 0px #000000;
    transform: translateY(0);
}

.submit-btn:not(:disabled):hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.25),
        0 6px 0px #000000;
}

.submit-btn:not(:disabled):active {
    transform: translateY(4px);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 0px 0px #000000;
}

/* Keep primary-action as an alias if needed, but the :not(:disabled) does the heavy lifting */
.submit-btn.primary-action {
    background-color: #1a1a1a;
}

.text-btn {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.login-link {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* Logo Sizing */
.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* Ensure logo container doesn't force weird layout */
.logo {
    display: flex;
    align-items: center;
    gap: 0;
}

.login-link a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

.chat-bubble {
    position: absolute;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}


/* Card Carousel Styles */
.cards-carousel {
    position: relative;
    width: 320px;
    /* Fixed width for mockup */
    height: 240px;
    /* Increased height for stacking */
    perspective: 1000px;
    margin-bottom: 30px;
}

.card-mockup {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 24px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);

    transition: all 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-mockup.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    z-index: 10;
}

/* Stats Grid in Card */
.mockup-stats-grid {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.m-stat {
    display: flex;
    flex-direction: column;
}

.m-stat .label {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 4px;
}

.m-stat .value {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
}

.mockup-footer-badge {
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--primary-blue);
    background: #eef4ff;
    padding: 6px 12px;
    border-radius: 20px;
    align-self: flex-start;
    font-weight: 600;
}

/* Responsiveness */
@media (max-width: 900px) {
    .split-container {
        flex-direction: column;
    }

    .left-panel {
        display: none;
    }
}

/* Results View Styling */
.results-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    overflow-y: auto;
    /* Scrollable */
    z-index: 100;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-header {
    width: 100%;
    max-width: 1000px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.results-summary {
    display: flex;
    gap: 40px;
    width: 100%;
    max-width: 800px;
    margin-bottom: 40px;
}

.summary-card {
    flex: 1;
    background: #f8f9fa;
    padding: 24px;
    border-radius: 16px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 1rem;
    color: #555;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.summary-item span:last-child {
    font-weight: 700;
    color: #333;
}

.summary-visual {
    flex: 1;
    background: #eef4ff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.results-bar {
    width: 100%;
    max-width: 800px;
    background-color: #28a745;
    /* Green */
    color: white;
    padding: 20px 32px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

#final-amount {
    font-size: 1.8rem;
    font-weight: 800;
}

.cta-btn {
    background-color: white;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
    padding: 12px 32px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 60px;
    transition: all 0.2s;
}

.cta-btn:hover {
    background-color: #1a1a1a;
    color: white;
}

/* Breakdown Table */
.breakdown-section {
    width: 100%;
    max-width: 1000px;
}

.breakdown-section h3 {
    text-align: center;
    margin-bottom: 24px;
    color: #666;
    font-weight: 500;
}

.breakdown-table {
    width: 100%;
}

.table-header {
    display: grid;
    grid-template-columns: 0.5fr 1fr 1fr 1fr;
    padding: 16px;
    border-bottom: 2px solid #eee;
    font-weight: 600;
    color: #888;
    font-size: 0.8rem;
    text-transform: uppercase;
    text-align: right;
}

.table-header span:first-child {
    text-align: left;
}

.highlight {
    color: #28a745;
}

.table-body .row {
    display: grid;
    grid-template-columns: 0.5fr 1fr 1fr 1fr;
    padding: 20px 16px;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    transition: background 0.2s;
    text-align: right;
}

.table-body .row:first-child {
    text-align: left;
}

.table-body .row span:first-child {
    text-align: left;
    font-weight: 600;
}

.table-body .row span:last-child {
    font-weight: 700;
    color: #1a1a1a;
}

.table-body .row:hover {
    background-color: #f9fcff;
}