@font-face {
    font-family: 'Space';
    src: url('space age.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'ariel', Arial, sans-serif;
    background: rgba(0, 0, 0, 0.95);
    color: rgba(255, 255, 255, 0.9);
    background-image: url('bg.webp');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
}

@keyframes breathe {
    0% { transform: translateY(0px); }
    50% { transform: translateY(0.8px); }
    100% { transform: translateY(0px); }
}

/* ===== SIDEBAR ===== */
.sidebar {
    font-family: space;
    width: 250px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: absolute;
    left: -250px;
    height: 100%;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
}

.sidebar:hover {
    left: 0;
}

.sidebar a {
    width: 170px;
    text-decoration: none;
    color: white;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

.sidebar a:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===== IMAGE MAP ===== */
#image-map-container {
    width: 100%;
    max-width: 1000px;
    display: none;
}

/* ===== MAIN QUESTIONNAIRE PANEL ===== */
/* Universal panel styling - works for both single-question (drywall30) and multi-page (plumbing) */
#question-panel,
.questionnaire-section {
    backdrop-filter: blur(18px);
    background: rgba(14, 18, 28, 0.68);
    border-radius: 22px;
    padding: 30px 40px;
    border: 1px solid rgba(120,160,255,0.35);
    box-shadow:
        0 0 30px rgba(0, 80, 255, 0.25),
        inset 0 0 25px rgba(45, 60, 120, 0.25);
    color: #e6ebff;
    max-width: 90vw;
    width: auto;
    height: auto;
    max-height: 85vh;
    min-height: 400px;
    margin: 20px auto;
    transition: opacity 0.35s ease, 0.4s ease;
    display: none;
    font-family: 'Raleway', 'Arial', sans-serif;
    font-size: 15px;
    overflow-y: auto;
    position: relative;
    animation: breathe 6.5s ease-in-out infinite;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

/* ===== POLISH MODE TOGGLE SYSTEM ===== */
/* Default: Basic mode */
#question-panel {
    transition: opacity 0.1s ease, 0.4s ease;
    animation: none;
}

.question-title {
    margin: 0 0 14px;
}

.question-panel p.question-text,
#question-panel .question-text,
#question-panel h3 {
    letter-spacing: 0.2em;
}

.quick-choice-btn {
    transition: 0.25s;
    transform: none;
}

/* Polish mode: Enhanced effects */
body.polish-mode #question-panel {
    transition: opacity 0.35s ease, 0.4s ease;
    animation: breathe 6.5s ease-in-out infinite;
}

body.polish-mode .question-title {
    margin: 0 0 22px;
}

body.polish-mode .question-panel p.question-text,
body.polish-mode #question-panel .question-text,
body.polish-mode #question-panel h3 {
    letter-spacing: 0.05em;
}

body.polish-mode .quick-choice-btn {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.polish-mode .quick-choice-btn:hover {
    transform: translateY(-2px) !important;
}

/* ===== CONTENT PANELS ===== */
.content-panel {
    backdrop-filter: blur(18px);
    background: rgba(14, 18, 28, 0.68);
    border-radius: 22px;
    padding: 40px 55px;
    border: 1px solid rgba(120,160,255,0.35);
    box-shadow:
        0 0 30px rgba(0, 80, 255, 0.25),
        inset 0 0 25px rgba(45, 60, 120, 0.25);
    color: #e6ebff;
    max-width: 1400px;
    width: 92vw;
    margin: auto;
    transition: 0.4s ease;
    display: none;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: visible;
    box-sizing: border-box;
}

.content-panel.active {
    display: flex;
}

.content {
    display: none;
}

.content.active {
    display: block;
}

/* ===== ESTIMATE OUTPUT ===== */
.estimateoutput {
    font-size: 24px;
    font-weight: bold;
    margin-top: 20px;
    text-align: center;
    color: #007bff;
    cursor: help;
    transition: color 0.3s ease;
    display: none;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 {
    font-family: 'Space', sans-serif;
    letter-spacing: 2px;
    font-size: 24px;
}

/* ===== QUESTION TITLE ===== */
/* The big emoji heading like "🚀 PROJECT TIMELINE" */
/* Used in: Qengine.js (line 824), all trade modules */
.section-title,
.question-title {
    font-family: 'Space', sans-serif;  /* Changed from Futurism/Orbitron/Space to just Space */
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 3px;
    text-align: center;
    text-transform: uppercase;
    margin: 0 0 22px;
    background: linear-gradient(45deg, #7c8cff, #cfe8ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 14px rgba(90,140,255,.25);
}

/* ===== QUESTION TEXT ===== */
/* The actual question like "How soon would you like this project completed?" */
/* Used in: Qengine.js (line 829), base.js */
.question-panel p.question-text,
#question-panel .question-text,
#question-panel h3 {
    font-family: 'Raleway', 'Inter', 'Arial', sans-serif;  /* Changed to Arial */
    font-size: 20px;
    line-height: 1.5;
    margin-bottom: 25px;
    opacity: 0.9;
    color: #e6ebff;
    letter-spacing: 0.05em;
}

/* ===== UNIVERSAL FORMS & INPUTS ===== */
/* Universal question styling */
.question-item,
.plumbing-question {
    margin-bottom: 15px; 
    position: relative;
}

/* Universal form input styling */
.questionnaire-input,
.plumbing-input,
#question-panel input[type="text"],
#question-panel input[type="email"],
#question-panel input[type="number"],
#question-panel select,
#question-panel textarea {
    background: rgba(20, 30, 50, 0.6);
    border: 1px solid rgba(120,160,255,0.3);
    border-radius: 8px;
    padding: 15px;
    color: #e6ebff;
    font-size: 16px;
    backdrop-filter: blur(5px);
    width: 100%;
    box-sizing: border-box;
}

/* Number input arrows styling - tall styled buttons */
#question-panel input[type="number"]::-webkit-inner-spin-button,
#question-panel input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    height: 50px;              /* Adjust height here */
    width: 30px;               /* Adjust width here */
    cursor: pointer;
    background: rgba(60,90,255,0.35);  /* Blue background tint */
    border-left: 1px solid rgba(120,160,255,0.4);  /* Blue border */
    border-radius: 0 9px 9px 0;  /* Rounded on right side to match input */
    margin: -5px -16px -5px 0;  /* Top: -5px, Right: -30px (pulls right), Bottom: -5px, Left: 0 */
    filter: brightness(1.1) saturate(1.3);  /* Enhance blue vibrancy */
}

#question-panel input[type="number"]::-webkit-inner-spin-button:hover,
#question-panel input[type="number"]::-webkit-outer-spin-button:hover {
    background: rgba(90,140,255,0.65);  /* Brighter blue on hover */
    box-shadow: 0 0 12px rgba(50,90,255,0.4);  /* Blue glow */
    filter: brightness(1.3) saturate(1.5);  /* Extra blue vibrancy on hover */
}

#question-panel input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

#question-panel input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: inner-spin-button;
}



/* Prevent all inputs from turning white/foggy when filled - universal fix */
#question-panel input:-webkit-autofill,
#question-panel input:-webkit-autofill:hover,
#question-panel input:-webkit-autofill:focus,
#question-panel input:-webkit-autofill:active,
#question-panel input:autofill,
.questionnaire-input:-webkit-autofill,
.questionnaire-input:-webkit-autofill:hover,
.questionnaire-input:-webkit-autofill:focus,
.questionnaire-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgba(20, 30, 50, 0.6) inset !important;
    -webkit-text-fill-color: #e6ebff !important;
    background-color: rgba(20, 30, 50, 0.6) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Enhanced select dropdown styling */
#question-panel select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23e6ebff" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

#question-panel select:hover {
    border-color: rgba(120,160,255,0.9);
    background-color: rgba(30, 45, 70, 0.7);
    box-shadow: 0 0 16px rgba(90,140,255,0.4);
}

#question-panel select:focus {
    border-color: rgba(120,160,255,0.9);
    background-color: rgba(30, 45, 70, 0.7);
}

/* Multiple-text specific styling for grouped inputs */
.questionnaire-input[data-field-name] {
    min-width: 150px;
    flex: 1 1 auto;
}

.questionnaire-input:focus,
.plumbing-input:focus,
#question-panel input[type="text"]:focus,
#question-panel input[type="email"]:focus,
#question-panel input[type="number"]:focus,
#question-panel select:focus,
#question-panel textarea:focus {
    border-color: rgba(120,160,255,0.7);
    box-shadow: 0 0 12px rgba(50,90,255,0.3);
    outline: none;
}

/* Input size variations */
.questionnaire-input.text-input,
.plumbing-input.text-input {
    width: 96%;
}

.questionnaire-input.small-input,
.plumbing-input.small-input {
    width: 125px;
    margin-right: 10px;
}

.questionnaire-input.textarea-input,
.plumbing-input.textarea-input {
    width: 450px;
    height: 45px;
    resize: vertical;
}

.questionnaire-input.slider-input,
.plumbing-input.slider-input {
    width: 96%;
}

/* ===== UNIVERSAL BUTTONS ===== */
/* Universal button container */
.button-container,
.plumbing-button-container {
    display: flex; 
    justify-content: space-between; 
    margin-top: 20px;
    position: absolute;
    bottom: 20px;
    width: calc(100% - 40px);
}

/* Universal button styling */
.quick-choice-btn,
.questionnaire-btn,
#question-panel button {
    background: rgba(60,90,255,0.35) !important;
    color: #e6ebff !important;
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid rgba(120,160,255,0.4) !important;
    backdrop-filter: blur(10px);
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    margin: 8px 8px 8px 0;
}

.quick-choice-btn:hover,
.questionnaire-btn:hover,
#question-panel button:hover {
    background: rgba(90,140,255,0.65) !important;
    box-shadow: 0 0 18px rgba(50,90,255,0.5);
    transform: translateY(-2px) !important;
}

/* Consolidated file input wrapper styles */
.file-input-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid rgba(60, 90, 160, 0.8); /* Tooltip-like tab */
    background: rgba(15, 20, 35, 0.85); /* Tooltip background */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); /* Tooltip shadow */
    font-family: 'Raleway', 'Inter', 'Arial', sans-serif; /* Tooltip font */
    font-size: 14px;
    font-weight: 500;
    color: #d4deff; /* Tooltip text color */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.file-trigger-btn {
    background: rgba(60, 90, 255, 0.35) !important;
    color: #d4deff !important; /* Tooltip text color */
    padding: 12px 20px;
    border: none !important;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Raleway', 'Inter', 'Arial', sans-serif;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.file-trigger-btn:hover {
    background: rgba(90, 140, 255, 0.6) !important;
    box-shadow: inset 0 0 12px rgba(120, 160, 255, 0.3);
}

.file-name-display {
    font-size: 14px;
    font-family: 'Raleway', 'Inter', 'Arial', sans-serif;
    font-weight: 500;
    letter-spacing: 0.03em;
    line-height: 1.4;
    color: #d4deff; /* Tooltip text color */
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(22, 30, 55, 0.35); /* Slightly different background */
    display: flex;
    align-items: center;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Selected state for quick-choice buttons */
.quick-choice-btn.is-selected {
    background: rgba(100,140,255,0.85) !important;
    border-color: rgba(150,190,255,0.9) !important;
    color: #0b1222 !important;
    box-shadow: 0 0 20px rgba(80,140,255,0.6);
}

/* ===== UNIVERSAL TOOLTIPS ===== */
.questionnaire-tooltip,
.plumbing-tooltip {
    position: relative;
    display: block;
    background: rgba(15, 20, 35, 0.85);
    color: #d4deff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 25px;
    font-family: 'Raleway', 'Inter', 'Arial', sans-serif;
    font-weight: 500;
    line-height: 1.4;
    border-left: 4px solid rgba(60, 90, 160, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== UNIVERSAL CHECKBOXES ===== */
/* Traditional checkbox styling */
.questionnaire-section input[type="checkbox"],
.plumbing-question input[type="checkbox"],
.checkbox-group input[type="checkbox"],
#question-panel input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: rgba(25, 35, 60, 0.4);
    border: 1px solid rgba(120, 160, 255, 0.5);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.25s ease;
}

#question-panel input[type="checkbox"]:checked {
    background: rgba(90, 140, 255, 0.85);
    border-color: rgba(150, 190, 255, 0.9);
    box-shadow: 0 0 12px rgba(80, 140, 255, 0.5);
}

#question-panel input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-group label,
#question-panel .checkbox-group label,
#question-panel label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s;
    color: #e6ebff;
}

/* ===== MODERN TOGGLE BUTTONS (CHECKBOX REPLACEMENT) ===== */
.toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 15px 0;
}

.toggle-btn {
    background: rgba(25, 35, 60, 0.4) !important;
    color: #8b9dc3 !important;
    padding: 14px 20px;
    border: 1px solid rgba(60, 80, 140, 0.3) !important;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
    user-select: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.toggle-btn.active {
    background: rgba(90, 140, 255, 0.85) !important;
    color: #ffffff !important;
    border-color: rgba(150, 190, 255, 0.9) !important;
    box-shadow: 
        0 0 20px rgba(80, 140, 255, 0.6),
        inset 0 0 15px rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.toggle-btn:hover:not(.active) {
    background: rgba(40, 55, 85, 0.5) !important;
    border-color: rgba(80, 100, 160, 0.5) !important;
    color: #a8b8d8 !important;
}

.toggle-btn:active {
    transform: translateY(0px) scale(0.98);
    transition: all 0.1s ease;
}

.toggle-btn.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(120, 160, 255, 0.3), rgba(80, 140, 255, 0.3));
    border-radius: 14px;
    z-index: -1;
    opacity: 0.7;
}

/* ===== QUESTION CARDS ===== */
.question-card {
    background: rgba(12,16,28,0.45);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(120,160,255,0.25);
    border-radius: 20px;
    padding: 28px 30px;
    margin: 18px;
    box-shadow:
        0 0 24px rgba(0,80,255,0.18),
        inset 0 0 20px rgba(45,60,120,0.20);
    max-height: 72vh;
    overflow: auto;
    position: relative;
    color: #e6ebff;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    height: 8px;
    border-radius: 10px;
    background: linear-gradient(90deg, #4f46e5, #60a5fa);
    box-shadow: 0 0 12px rgba(80,140,255,.55);
    transition: width .3s ease;
}

/* ===== SLIDER INPUT ===== */
.dynamic-slider {
    --slider-fill: 0%;
    --slider-progress: 0%;
    --glow-intensity: 0.35;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background-color: rgba(12,16,28,0.65);
    background-image: linear-gradient(90deg, #4f46e5, #60a5fa);
    background-size: var(--slider-fill, 0%) 100%;
    background-repeat: no-repeat;
    box-shadow: 0 0 calc(18px * var(--glow-intensity, 0.35)) rgba(80,140,255, var(--glow-intensity, 0.35));
    outline: none;
    cursor: pointer;
    transition: background-size 0.2s ease, box-shadow 0.2s ease;
}

.dynamic-slider::-webkit-slider-runnable-track {
    height: 10px;
    border-radius: inherit;
    background: transparent;
}

.dynamic-slider::-moz-range-track {
    height: 10px;
    border-radius: inherit;
    background: transparent;
}

.dynamic-slider::-moz-range-progress {
    height: 10px;
    border-radius: inherit;
    background: linear-gradient(90deg, #4f46e5, #60a5fa);
}

.dynamic-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #c7d7ff 45%, #4f46e5 95%);
    border: 2px solid rgba(255,255,255,0.35);
    box-shadow: 0 0 calc(20px * var(--glow-intensity, 0.35)) rgba(80,140,255,var(--glow-intensity, 0.35));
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    margin-top: -6px;
}

.dynamic-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #c7d7ff 45%, #4f46e5 95%);
    border: 2px solid rgba(255,255,255,0.35);
    box-shadow: 0 0 calc(20px * var(--glow-intensity, 0.35)) rgba(80,140,255,var(--glow-intensity, 0.35));
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dynamic-slider::-webkit-slider-thumb:hover,
.dynamic-slider::-moz-range-thumb:hover {
    transform: scale(1.08);
    box-shadow: 0 0 24px rgba(80,140,255,0.85);
}

.progress-meta {
    text-align: center;
    margin: 6px 0 0;
    font-size: 13px;
    color: #9bb0ff;
}

.progress-cat {
    text-align: center;
    margin: 0;
    font-size: 12px;
    color: rgba(126, 160, 255, 0.6);
}

/* ===== CUSTOM SCROLLBAR ===== */
/* Webkit browsers (Chrome, Safari, Edge) */
#question-panel::-webkit-scrollbar {
    width: 10px;
}

#question-panel::-webkit-scrollbar-track {
    background: rgba(20, 30, 50, 0.3);
    border-radius: 10px;
}

#question-panel::-webkit-scrollbar-thumb {
    background: rgba(90, 140, 255, 0.4);
    border-radius: 10px;
    border: 2px solid rgba(20, 30, 50, 0.3);
    box-shadow: 0 0 6px rgba(90, 140, 255, 0.3);
}

#question-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(120, 160, 255, 0.6);
    box-shadow: 0 0 10px rgba(120, 160, 255, 0.5);
}

/* Firefox */
#question-panel {
    scrollbar-width: thin;
    scrollbar-color: rgba(90, 140, 255, 0.4) rgba(20, 30, 50, 0.3);
}

/* ===== EFFECTS ===== */
.glow {
    text-shadow:
        0 0 5px #ffffff,
        0 0 10px #1f8fff,
        0 0 15px #1f8fff,
        0 0 20px #1f8fff;
    color: #ffffff;
}

/* ===== UTILITY STYLES ===== */
.subtitle { color: var(--muted); margin: 0 0 12px; }
.card { background: linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,0)); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); margin: 10px 0; }
.muted { color: var(--muted); font-size: 13px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.title { font-weight: 700; font-size: 30px; margin: 0 0 6px; color: #9bb0c1; text-align: center; }
.ghost { background: transparent; border: 1px solid #2c3a55; border-radius: 12px; color: #cfe2ef; padding: 10px 14px; }
.note { background: #0f182b; border: 1px solid #223052; border-radius: 12px; padding: 10px; }
.primary { background: linear-gradient(180deg,#2c4d6a,#1d3347); border: 1px solid #3a5b7a; border-radius: 12px; color: #eaf6ff; padding: 10px 14px; }

/* ===== MODAL SYSTEM ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-content {
    background: rgba(12,16,28,0.65);
    color: #e6ebff;
    padding: 26px; 
    border-radius: 20px;
    border: 1px solid rgba(120,160,255,0.3);
    box-shadow: 0 0 30px rgba(0,80,255,0.25), inset 0 0 20px rgba(45,60,120,0.2);
    max-width: 680px; 
    margin: 0 auto; 
    text-align: left; 
    position: relative; 
    z-index: 1001;
}

.exit-button {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: #e6ebff;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(120, 160, 255, 0.5);
    box-shadow: 0 0 12px rgba(80, 140, 255, 0.5);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.exit-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 18px rgba(120, 160, 255, 0.8);
    background: rgba(255, 255, 255, 0.2);
}

.exit-button:active {
    transform: scale(0.95);
    box-shadow: 0 0 8px rgba(80, 140, 255, 0.5);
}

/* ===== RESPONSIVE PADDING ADJUSTMENTS ===== */
/* Desktop (default): Nice spacious padding */
/* Tablet: Reduce padding moderately */
@media (max-width: 1024px) {
    #question-panel,
    .questionnaire-section {
        padding: 25px 30px;
    }
    
    .content-panel {
        padding: 30px 40px;
    }
}

/* Mobile: Minimal padding for maximum content space */
@media (max-width: 768px) {
    #question-panel,
    .questionnaire-section {
        padding: 20px 20px;
        min-height: 300px;
    }
    
    .content-panel {
        padding: 20px 25px;
        width: 95vw;
    }
    
    .section-title,
    .question-title {
        font-size: 24px;
        letter-spacing: 2px;
    }
}

/* Small mobile: Ultra-compact */
@media (max-width: 480px) {
    #question-panel,
    .questionnaire-section {
        padding: 15px 15px;
    }
    
    .content-panel {
        padding: 15px 20px;
        width: 98vw;
    }
    
    .section-title,
    .question-title {
        font-size: 20px;
        letter-spacing: 1px;
    }
}

/* ===== DYNAMIC SLIDER ===== */
.slider-container {
    padding: 10px 0;
}

.dynamic-slider {
    --slider-fill: 0%;
    --slider-progress: 0%;
    --glow-intensity: 0.35;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background-color: rgba(12,16,28,0.65);
    background-image: linear-gradient(90deg, #4f46e5, #60a5fa);
    background-size: var(--slider-fill, 0%) 100%;
    background-repeat: no-repeat;
    box-shadow: 0 0 calc(18px * var(--glow-intensity, 0.35)) rgba(80,140,255, var(--glow-intensity, 0.35));
    outline: none;
    cursor: pointer;
    transition: background-size 0.2s ease, box-shadow 0.2s ease;
}

.dynamic-slider::-webkit-slider-runnable-track {
    height: 12px;
    border-radius: inherit;
    background: transparent;
}

.dynamic-slider::-moz-range-track {
    height: 12px;
    border-radius: inherit;
    background: transparent;
}

.dynamic-slider::-moz-range-progress {
    height: 12px;
    border-radius: inherit;
    background: linear-gradient(90deg, #4f46e5, #60a5fa);
}

.dynamic-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #c7d7ff 45%, #4f46e5 95%);
    border: 2px solid rgba(255,255,255,0.35);
    box-shadow: 0 0 calc(20px * var(--glow-intensity, 0.35)) rgba(80,140,255, var(--glow-intensity, 0.35));
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    margin-top: -7px;
}

.dynamic-slider::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #c7d7ff 45%, #4f46e5 95%);
    border: 2px solid rgba(255,255,255,0.35);
    box-shadow: 0 0 calc(20px * var(--glow-intensity, 0.35)) rgba(80,140,255, var(--glow-intensity, 0.35));
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dynamic-slider::-webkit-slider-thumb:hover,
.dynamic-slider::-moz-range-thumb:hover {
    transform: scale(1.12);
    box-shadow: 0 0 28px rgba(80,140,255, 0.9);
}

.dynamic-slider:focus {
    box-shadow: 0 0 calc(22px * var(--glow-intensity, 0.35)) rgba(80,140,255, calc(var(--glow-intensity, 0.35) + 0.15));
}

.slider-value {
    color: #e6ebff;
    text-shadow: 0 0 10px rgba(80,140,255, 0.5);
}

.slider-label {
    color: #9bb0ff;
    font-style: italic;
    opacity: 0.9;
}

/* ===== POS (Parent-Option-Select) - File Tree Selector ===== */
.pos-tree {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(80, 140, 255, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-top: 10px;
    backdrop-filter: blur(10px);
}

.pos-item {
    margin-bottom: 8px;
    border-left: 2px solid transparent;
    transition: all 0.3s ease;
}

.pos-item.has-selections {
    border-left-color: rgba(90, 140, 255, 0.6);
}

.pos-parent {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 10px;
    user-select: none;
}

.pos-parent:hover {
    background: rgba(51, 65, 85, 0.8);
    transform: translateX(2px);
}

.pos-chevron {
    font-size: 10px;
    color: rgba(148, 163, 184, 0.8);
    transition: transform 0.3s ease;
    display: inline-block;
}

.pos-chevron.expanded {
    transform: rotate(90deg);
}

.pos-folder-icon {
    font-size: 18px;
    filter: hue-rotate(200deg) brightness(1.3);
}

.pos-label {
    flex: 1;
    color: #e2e8f0;
    font-weight: 500;
    font-size: 15px;
}

.pos-badge {
    background: rgba(90, 140, 255, 0.9);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 0 12px rgba(80, 140, 255, 0.5);
}

.pos-children {
    margin-left: 36px;
    margin-top: 8px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 8px;
    border-left: 2px solid rgba(80, 140, 255, 0.4);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* POS File Item - file list appearance */
.pos-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.pos-file:hover {
    background: rgba(30, 41, 59, 0.4);
}

.pos-file.active {
    background: rgba(90, 140, 255, 0.85) !important;
    box-shadow: 
        0 0 20px rgba(80, 140, 255, 0.6),
        inset 0 0 15px rgba(255, 255, 255, 0.2);
}

.pos-file.active .pos-file-name {
    color: #ffffff;
    font-weight: 600;
}

.pos-file-icon {
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.pos-file.active .pos-file-icon {
    opacity: 1;
    filter: brightness(1.5);
}

.pos-file-name {
    flex: 1;
    color: #cbd5e1;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pos-file:hover .pos-file-name {
    color: #e2e8f0;
}

/* POS Quantity Controls - styled like number input spinners */
.pos-quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pos-file.active .pos-quantity-controls {
    opacity: 1;
}

.pos-quantity-btn {
    width: 26px;
    height: 26px;
    background: rgba(60,90,255,0.35);
    border: 1px solid rgba(120,160,255,0.4);
    border-radius: 6px;
    color: #e6ebff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    user-select: none;
}

.pos-quantity-btn:hover {
    background: rgba(90,140,255,0.65);
    box-shadow: 0 0 12px rgba(50,90,255,0.4);
    filter: brightness(1.3) saturate(1.5);
}

.pos-quantity-btn:active {
    transform: scale(0.95);
}

.pos-quantity-display {
    min-width: 28px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 0 8px rgba(80,140,255, 0.5);
}