@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    /* Accent colors (buttons, navbar, footer) */
    --neon-cyan: #06b6d4;
    --neon-blue: #0066ff;
    --neon-purple: #7c3aed;
    --neon-violet: #6c38ff;

    /* Light theme backgrounds */
    --deep-bg: #18122B;
    --panel-bg: #ffffff;
    --card-gradient: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-glow: 0 4px 20px rgba(124, 58, 237, 0.08);
    --grad-main: #ffffff;
    --grad-accent: linear-gradient(90deg, #7c3aed, #06b6d4, #6c38ff);

    /* NEW light theme variables */
    --body-bg: #ffffff;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --card-shadow-hover: 0 10px 25px rgba(124, 58, 237, 0.1), 0 4px 10px rgba(0, 0, 0, 0.05);
    --surface-secondary: #f8fafc;
    --surface-lavender: #f5f3ff;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --input-bg: #ffffff;
    --input-border: #d1d5db;
    --input-text: #1e293b;
    --input-placeholder: #9ca3af;
}
.text-danger {
    color: red;
    font-size: 0.875rem;
}
.error-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 360px;
    background: #ffffff;
    backdrop-filter: blur(12px);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    color: #1e293b;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    transform: translateY(40px);
    opacity: 0;
    pointer-events: none;
    transition: .4s ease;
    z-index: 9999;
}

    .error-toast.show {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

.error-toast-icon {
    font-size: 24px;
}

.error-toast h4 {
    margin: 6px 0;
    font-size: 16px;
}

#errorList {
    margin: 8px 0 0;
    padding-left: 18px;
}

    #errorList li {
        font-size: 14px;
        margin-bottom: 4px;
        color: #dc2626;
    }

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Poppins', 'Montserrat', sans-serif;
    background: var(--body-bg);
    color: var(--text-primary);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.logo-text {
    font-family: 'Noto Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Background Effects - disabled for light theme */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    pointer-events: none;
    z-index: -1;
}

/* Navbar */
.navbar {
    background: rgba(10, 18, 40, 0.88) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(162, 89, 255, 0.12);
}

.navbar-brand {
    font-weight: 700;
    color: var(--neon-cyan) !important;
    font-size: 1.5rem;
    text-shadow: none;
}

.nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--neon-cyan) !important;
    text-shadow: none;
}

/* Main Container */
.container,
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* Cards & Panels */
.ui-card,
.form-section {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--card-border);
    padding: 2.2rem 2rem;
    margin-bottom: 2.2rem;
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
    transition: box-shadow 0.3s, transform 0.3s;
}

.ui-card:hover,
.form-section:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

/* Remove sharp corner markers */
.ui-card::before,
.ui-card::after {
    display: none;
}

/* Typography Overrides */
h1 {
    font-size: 3.2rem;
    font-weight: 800;
    color: #1e293b;
    text-shadow: none;
    text-align: center;
    margin-bottom: 1.2rem;
}

h2 {
    font-size: 2.1rem;
    color: var(--neon-purple);
    font-family: 'Poppins', 'Inter', sans-serif;
    font-weight: 700;
    margin-bottom: 1.2rem;
}

label.form-label {
    color: var(--text-secondary);
    font-family: 'Montserrat', 'Inter', sans-serif;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.04em;
    font-size: 1rem;
    display: block;
    margin-bottom: 0.6rem;
}

/* Inputs */
.form-input,
.form-control,
.form-select {
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 12px;
    color: var(--input-text);
    font-family: inherit;
    padding: 1rem 1.2rem;
    margin-bottom: 0.5rem;
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.form-input:focus,
.form-control:focus,
.form-select:focus {
    background: #ffffff;
    border-color: var(--neon-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    outline: none;
    color: var(--input-text);
}

input.form-control,
textarea.form-control {
    background: #ffffff !important;
    color: #1e293b !important;
    font-family: 'Inter', 'Poppins', 'Montserrat', Arial, sans-serif !important;
    font-size: 1.08rem !important;
    font-weight: 500 !important;
    border-radius: 12px !important;
    border: 1.5px solid #d1d5db !important;
    box-shadow: none;
    padding: 1rem 1.2rem !important;
    transition: border 0.2s, box-shadow 0.2s;
}

input.form-control:focus,
textarea.form-control:focus {
    border: 1.5px solid #7c3aed !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    outline: none !important;
    color: #1e293b !important;
}

input.form-control::placeholder,
textarea.form-control::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media(max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Buttons */
.form-btn,
.dashboard-btn {
    background: var(--grad-accent);
    border: none;
    color: #fff;
    font-family: 'Poppins', 'Inter', sans-serif;
    font-weight: 700;
    border-radius: 16px;
    padding: 1.1rem 3.2rem;
    font-size: 1.15rem;
    box-shadow: 0 2px 16px 0 rgba(124, 58, 237, 0.18);
    cursor: pointer;
    margin-top: 2.2rem;
    width: 100%;
    transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
    position: relative;
    overflow: hidden;
    display: block;
}

.form-btn:hover,
.dashboard-btn:hover {
    background: linear-gradient(90deg, #6c38ff 0%, #06b6d4 100%);
    box-shadow: 0 0 32px 8px rgba(124, 58, 237, 0.18), 0 0 0 2px var(--neon-purple);
    color: #fff;
    transform: translateY(-1px) scale(1.01);
}

/* Footer - dark theme (slightly lighter) */
footer {
    background: rgba(24, 20, 48, 0.96) !important;
    border-top: 1px solid rgba(162, 89, 255, 0.12) !important;
    color: #b8b8d1 !important;
    font-family: 'Noto Sans', sans-serif;
}

footer a {
    color: var(--neon-cyan);
    text-decoration: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ----------------------------------------------------
   ADAPTED ANIMATIONS & HELPERS (Robot, Popups)
   ---------------------------------------------------- */

/* Instructions Panel */
.creative-instructions {
    background: var(--surface-lavender);
    border-radius: 18px;
    border-left: 4px solid var(--neon-purple);
    padding: 20px;
    margin-bottom: 25px;
    color: var(--text-primary);
    box-shadow: var(--card-shadow);
}

.creative-instructions h3 {
    margin: 0 0 15px 0;
    font-size: 1.3em;
    font-weight: 700;
    color: var(--neon-purple);
}

.creative-instructions .instruction-list {
    list-style: none;
    padding: 0;
}

.creative-instructions .instruction-list li {
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-secondary);
}

.creative-instructions .instruction-list li:before {
    content: "\25B6";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--neon-purple);
    font-size: 0.8em;
}

.pro-tip {
    background: var(--surface-lavender);
    padding: 10px;
    border-radius: 2px;
    margin-top: 10px;
    font-size: 0.9em;
    color: #7c3aed;
}

/* Robot AI Styles */
.robot-flex {
    display: flex;
    align-items: flex-start;
    gap: 1.2em;
    border-left: 4px solid var(--neon-purple);
    padding-left: 1.5rem;
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.06) 0%, transparent 100%);
}

.robot-side {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.robot-magic {
    display: inline-block;
    cursor: pointer;
    transition: transform 0.2s;
}

.robot-magic:hover {
    transform: scale(1.1);
}

.robot-svg {
    display: block;
    filter: drop-shadow(0 2px 10px rgba(124, 58, 237, 0.2));
}

.robot-eye {
    transition: rx 0.3s, ry 0.3s;
}

.robot-pupil {
    transition: cy 0.3s;
    animation: robotLook 2s infinite alternate;
}

@keyframes robotLook {
    0% {
        cy: 44;
    }

    50% {
        cy: 46;
    }

    100% {
        cy: 44;
    }
}

.robot-hint {
    color: var(--neon-purple) !important;
    font-family: 'Noto Sans', sans-serif;
    margin-top: 0.5rem;
}

.alert-primary {
    background: transparent;
    border: none;
    color: var(--text-primary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(124, 58, 237, 0.12);
    color: var(--neon-purple);
    font-family: 'Poppins', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.06) 0%, transparent 100%);
}

.section-toggle {
    font-size: 1.5rem;
    color: var(--neon-purple);
}

.section-content {
    transition: max-height 0.5s ease;
    overflow: hidden;
}

.form-section.collapsed .section-content {
    display: none;
}

/* Popups */
.compact-popup-overlay,
.password-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.compact-popup-overlay.show,
.password-popup-overlay.show {
    display: flex;
}

.compact-popup,
.password-popup {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid var(--card-border);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    padding: 36px 28px;
    max-width: 480px;
    width: 92%;
    text-align: center;
    position: relative;
}

.compact-popup::before,
.password-popup::before {
    content: 'SYSTEM NOTIFICATION';
    position: absolute;
    top: 0;
    left: 0;
    background: var(--neon-purple);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    font-weight: bold;
    border-radius: 0 0 12px 0;
}

.popup-title,
.password-title {
    color: var(--neon-purple);
    font-family: 'Poppins', 'Inter', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.popup-subtitle,
.password-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.popup-features,
.password-info-card {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: left;
}

.popup-feature {
    background: var(--surface-lavender);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 2px solid var(--neon-blue);
}

.popup-close-btn,
.close-btn {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    padding: 10px 30px;
    cursor: pointer;
    font-family: 'Noto Sans', sans-serif;
    text-transform: uppercase;
    transition: all 0.3s;
}

.popup-close-btn:hover,
.close-btn:hover {
    border-color: var(--neon-purple);
    color: var(--neon-purple);
}

/* AI Thinking Panel */
.ai-thinking-panel {
    display: none;
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid #06b6d4;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.ai-thinking-panel.show {
    display: block;
}

.ai-thinking-text {
    color: #0891b2;
    font-family: 'monospace';
    margin: 10px 0;
}

.ai-progress-bar {
    height: 2px;
    background: #e2e8f0;
    margin-top: 10px;
    border-radius: 2px;
}

.ai-progress-fill {
    height: 100%;
    background: #06b6d4;
    width: 0%;
    transition: width 0.1s;
}

@keyframes progressFill {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

/* ----------------------------------------------------
   CHECKBOX / RADIO STYLES
   ---------------------------------------------------- */
.simple-investment-check {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.simple-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: 'Noto Sans', sans-serif;
}

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

.simple-option .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--neon-purple);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
    background: #ffffff;
}

.simple-option:hover .checkmark {
    border-color: #06b6d4;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.simple-option input[type="radio"]:checked+.checkmark {
    border-color: #7c3aed;
    background: #7c3aed;
    box-shadow: 0 0 12px 2px rgba(124, 58, 237, 0.3);
}

.simple-option input[type="radio"]:checked+.checkmark::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
}

.investment-fields {
    margin-top: 1rem;
    animation: fadeIn 0.3s ease-in;
}

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

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

@media(max-width: 768px) {
    .main-container,
    .ui-card,
    .form-section {
        padding: 1.2rem;
    }

    .form-row {
        gap: 1rem;
    }
}

/* Responsive form fields and dropdowns for all mobile devices */
@media (max-width: 1024px) {
    .main-container,
    .ui-card,
    .form-section {
        padding: 1rem !important;
    }
    .form-row {
        gap: 0.8rem !important;
    }
    .form-btn, .dashboard-btn {
        font-size: 1rem !important;
        padding: 0.9rem 1.2rem !important;
    }
    .ql-container {
        font-size: 1rem !important;
    }
}

@media (max-width: 600px) {
    .main-container,
    .ui-card,
    .form-section {
        padding: 0.5rem !important;
    }
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }
    .form-input,
    .form-control,
    .form-select,
    select,
    textarea {
        font-size: 1rem !important;
        padding: 0.8rem 0.9rem !important;
        min-height: 44px !important;
    }
    .form-btn, .dashboard-btn {
        font-size: 0.98rem !important;
        padding: 0.8rem 1rem !important;
    }
    .ql-container {
        font-size: 0.98rem !important;
    }
    label.form-label {
        font-size: 0.95rem !important;
    }
    .section-header {
        font-size: 1rem !important;
        padding-bottom: 0.3rem !important;
    }
    .ql-toolbar {
        font-size: 0.95rem !important;
    }
    /* Dropdown arrow size for mobile */
    .form-select,
    select {
        background-size: 1em !important;
        padding-right: 2em !important;
    }
}

/* Ensure dropdowns and popups are not cut off on small screens */
@media (max-width: 480px) {
    .compact-popup,
    .password-popup {
        max-width: 98vw !important;
        padding: 1rem 0.5rem !important;
    }
    .ql-container {
        border-radius: 8px !important;
    }
    .form-select,
    select {
        font-size: 0.95rem !important;
        min-height: 40px !important;
    }
}

/* Glow effect for important elements */
.glow {
    box-shadow: 0 0 16px 4px rgba(124, 58, 237, 0.15), 0 0 32px 8px rgba(6, 182, 212, 0.1);
}

/* Make Quill editor and form fields more readable */
.ql-editor,
.form-input,
.form-control,
.form-select,
textarea {
    font-family: 'Inter', 'Poppins', 'Montserrat', Arial, sans-serif !important;
    font-size: 1.08rem !important;
    color: #1e293b !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em;
    line-height: 1.7;
    background: transparent;
}

/* Quill placeholder text */
.ql-editor.ql-blank::before {
    color: #9ca3af !important;
    font-size: 1.08rem !important;
    font-family: 'Inter', 'Poppins', 'Montserrat', Arial, sans-serif !important;
    opacity: 1 !important;
    font-style: italic;
}

/* Toolbar icons and controls for contrast */
.ql-toolbar button,
.ql-toolbar .ql-picker-label,
.ql-toolbar .ql-picker-item {
    color: #475569 !important;
    font-family: inherit;
    opacity: 0.95;
}

.ql-toolbar button:hover,
.ql-toolbar .ql-picker-label:hover,
.ql-toolbar .ql-picker-item:hover {
    color: #7c3aed !important;
    background: rgba(124, 58, 237, 0.08) !important;
}

/* Quill editor container */
.ql-container {
    background: #ffffff !important;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
}

/* Modern, readable dropdown styles */
.form-select, select {
    background: #ffffff !important;
    color: #1e293b !important;
    font-family: 'Inter', 'Poppins', 'Montserrat', Arial, sans-serif !important;
    font-size: 1.08rem !important;
    font-weight: 500 !important;
    border-radius: 12px !important;
    border: 1.5px solid #d1d5db !important;
    box-shadow: none;
    padding: 1rem 1.2rem !important;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border 0.2s, box-shadow 0.2s;
}

.form-select:focus, select:focus {
    border: 1.5px solid #7c3aed !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    outline: none !important;
    color: #1e293b !important;
}

/* Style the dropdown arrow for better visibility */
.form-select,
select {
    background-image: url("data:image/svg+xml;utf8,<svg fill='%2364748b' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M5.516 7.548a1 1 0 0 1 1.415 0L10 10.617l3.07-3.07a1 1 0 1 1 1.415 1.415l-3.777 3.778a1 1 0 0 1-1.415 0L5.516 8.963a1 1 0 0 1 0-1.415z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1.2rem center;
    background-size: 1.2em;
    padding-right: 2.5em !important;
}

/* Dropdown options styling */
.form-select option,
select option {
    background: #ffffff !important;
    color: #1e293b !important;
    font-weight: 500;
    font-size: 1.08rem;
}

/* Selected option highlight */
.form-select option:checked,
select option:checked {
    background: #f5f3ff !important;
    color: #7c3aed !important;
}

/* Disabled options */
.form-select option:disabled,
select option:disabled {
    color: #9ca3af !important;
    opacity: 0.7;
}

/* For better accessibility and spacing */
.form-select,
select {
    min-height: 48px;
    cursor: pointer;
}
