/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1d29 0%, #2d3748 100%);
    color: #e2e8f0;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Progress Indicator */
.progress-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 3rem;
    padding: 0 2rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #4a5568;
    border: 2px solid #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.progress-step.active .step-circle {
    background: #6c8357;
    border-color: #6c8357;
    box-shadow: 0 0 0 4px rgba(108, 131, 87, 0.2);
}

.progress-step.completed .step-circle {
    background: #5a6e47;
    border-color: #5a6e47;
}

.step-number {
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.step-label {
    font-size: 0.875rem;
    color: #a0aec0;
    font-weight: 500;
    margin-top: 0.5rem;
}

.progress-step.active .step-label {
    color: #6c8357;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: #4a5568;
    margin: 0 0.75rem;
    position: relative;
    overflow: hidden;
    align-self: flex-start;
    margin-top: 22px; /* Align with center of 44px circles (22px from top) */
}

.progress-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #6c8357;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-line.completed::after {
    width: 100%;
}

/* Form Container */
.form-container {
    background: rgba(45, 55, 72, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    flex: 1;
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* Form Steps */
.form-step {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.form-step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Step Headers */
.step-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #6c8357;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(108, 131, 87, 0.2);
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #6c8357, #8ba76b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step-header h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #f7fafc;
}

.step-description {
    font-size: 1.125rem;
    color: #cbd5e0;
    margin-bottom: 0.5rem;
}

.step-subdescription {
    font-size: 1rem;
    color: #a0aec0;
    margin-bottom: 1rem;
}

.privacy-note {
    font-size: 0.875rem;
    color: #718096;
    font-style: italic;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
    font-size: 1.1rem;
}

.field-subheading {
    font-size: 0.9rem;
    color: #a0aec0;
    margin-bottom: 0.75rem;
    font-style: italic;
    line-height: 1.4;
}

input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(26, 32, 44, 0.8);
    border: 1px solid #4a5568;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    outline: none !important;
    border-color: #6c8357 !important;
    box-shadow: 0 0 0 3px rgba(108, 131, 87, 0.1) !important;
    background: rgba(26, 32, 44, 0.95) !important;
}

/* Success state for completed fields */
.field-success {
    border-color: #6c8357 !important;
    background: rgba(108, 131, 87, 0.05) !important;
    padding-right: 2.5rem !important; /* Make room for checkmark */
}

.form-group {
    position: relative;
}



/* Select dropdown styling */
select {
    cursor: pointer;
}

select option {
    background: #2d3748;
    color: #e2e8f0;
    padding: 0.5rem;
}

select option:checked,
select option:hover {
    background: #6c8357;
    color: white;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.field-help {
    display: block;
    font-size: 0.8rem;
    color: #a0aec0;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.checkbox-grid-vertical {
    grid-template-columns: 1fr;
    max-width: 300px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem;
    background: rgba(26, 32, 44, 0.4);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    font-weight: 400;
}

.checkbox-item:hover {
    background: rgba(26, 32, 44, 0.6);
    border-color: #4a5568;
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #4a5568;
    border-radius: 4px;
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark {
    background: #6c8357;
    border-color: #6c8357;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Radio button styles */
.radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.radio-grid-vertical {
    grid-template-columns: 1fr;
    max-width: 300px;
}

.radio-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem;
    background: rgba(26, 32, 44, 0.4);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    font-weight: 400;
}

.radio-item:hover {
    background: rgba(26, 32, 44, 0.6);
    border-color: #4a5568;
}

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

.radiomark {
    width: 20px;
    height: 20px;
    border: 2px solid #4a5568;
    border-radius: 50%;
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.radio-item input[type="radio"]:checked + .radiomark {
    background: #6c8357;
    border-color: #6c8357;
}

.radio-item input[type="radio"]:checked + .radiomark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* Scale Slider */
.scale-container {
    margin-top: 1rem;
    padding: 1.5rem;
    background: rgba(26, 32, 44, 0.6);
    border-radius: 12px;
    border: 1px solid #4a5568;
}

.scale-wrapper {
    position: relative;
    margin: 2rem 0;
}

.scale-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #4a5568 0%, #6c8357 100%);
    outline: none;
    -webkit-appearance: none;
    margin: 1rem 0;
    position: relative;
    cursor: pointer;
}

.scale-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #6c8357;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(108, 131, 87, 0.4);
    transition: all 0.3s ease;
    border: 3px solid #ffffff;
}

.scale-slider::-webkit-slider-thumb:hover {
    background: #5a6e47;
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(108, 131, 87, 0.6);
}

/* Firefox slider styles */
.scale-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #6c8357;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(108, 131, 87, 0.4);
    border: 3px solid #ffffff;
    transition: all 0.3s ease;
}

.scale-slider::-moz-range-thumb:hover {
    background: #5a6e47;
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(108, 131, 87, 0.6);
}

.scale-slider::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #4a5568 0%, #6c8357 100%);
    border: none;
}

.scale-ticks {
    display: flex;
    justify-content: space-between;
    position: absolute;
    width: 100%;
    top: -8px;
    pointer-events: none;
}

.scale-tick {
    width: 2px;
    height: 16px;
    background: #4a5568;
    border-radius: 1px;
}

.scale-tick.major {
    height: 20px;
    background: #6c8357;
    width: 3px;
}

.scale-numbers {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #a0aec0;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #a0aec0;
    margin-top: 1rem;
}

.scale-value-display {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 0 1rem; /* Add padding for better centering */
}

#scaleValue {
    font-weight: 700;
    color: #6c8357;
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(108, 131, 87, 0.3);
    display: block;
    margin: 0 auto;
}

.scale-description {
    font-size: 1rem;
    color: #cbd5e0;
    margin-top: 0.75rem;
    font-style: italic;
    text-align: center;
}

/* Final Note */
.final-note {
    background: rgba(49, 130, 206, 0.1);
    border: 1px solid rgba(49, 130, 206, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: center;
}

.final-note p {
    margin-bottom: 0.5rem;
}

.final-note p:last-child {
    margin-bottom: 0;
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #6c8357, #5a6e47);
    color: white;
    box-shadow: 0 4px 14px rgba(108, 131, 87, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 131, 87, 0.4);
}

.btn-secondary {
    background: rgba(74, 85, 104, 0.8);
    color: #e2e8f0;
    border: 1px solid #4a5568;
}

.btn-secondary:hover {
    background: rgba(74, 85, 104, 1);
    transform: translateY(-1px);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem 0.5rem;
    }

    .form-container {
        padding: 1.5rem;
    }

    .progress-container {
        padding: 0 1rem;
        margin-bottom: 1.5rem;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .progress-container::-webkit-scrollbar {
        display: none;
    }

    .progress-line {
        flex: 0 0 15px;
        height: 2px;
        margin: 0 0.25rem;
        margin-top: 0;
        align-self: center;
    }

    .progress-step {
        flex-shrink: 0;
        min-width: auto;
    }

    .step-circle {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .step-label {
        font-size: 0.7rem;
        text-align: center;
        line-height: 1.2;
        margin-top: 0.25rem;
        max-width: 50px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .welcome-title {
        font-size: 2rem;
    }

    .step-header h2 {
        font-size: 1.5rem;
    }

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

    .form-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
    }

    .field-subheading {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    label {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.1rem;
        margin: 1.5rem 0 0.75rem 0;
    }

    /* Mobile form improvements */
    input[type="text"],
    input[type="email"],
    select,
    textarea {
        padding: 1rem; /* Larger padding for mobile */
        font-size: 1.1rem; /* Larger text for mobile */
    }

    select {
        min-height: 3rem; /* Ensure dropdown is large enough */
    }

    /* Show section titles on mobile */
    .section-title {
        display: block !important;
        font-size: 1.1rem;
        margin: 1.5rem 0 0.75rem 0;
    }

    /* Mobile slider adjustments */
    .scale-numbers {
        font-size: 0.7rem;
    }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }

    .form-container {
        padding: 1rem;
    }

    .progress-container {
        padding: 0 0.5rem;
        margin-bottom: 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Simple step counter for very small screens */
    .progress-container::before {
        content: "Step " attr(data-current-step) " of " attr(data-total-steps);
        font-size: 0.9rem;
        color: #6c8357;
        font-weight: 600;
        order: -1;
    }

    .progress-step {
        display: none;
    }

    .progress-line {
        display: none;
    }

    .welcome-title {
        font-size: 1.75rem;
    }

    .step-header h2 {
        font-size: 1.25rem;
    }

    .step-description {
        font-size: 0.9rem;
    }

    /* Extra small mobile improvements */
    input[type="text"],
    input[type="email"],
    select,
    textarea {
        padding: 1.1rem; /* Even larger padding for very small screens */
        font-size: 1.2rem; /* Larger text for very small screens */
    }

    select {
        min-height: 3.5rem; /* Even larger dropdown for very small screens */
    }

    /* Extra small mobile slider adjustments */
    .scale-numbers {
        font-size: 0.65rem;
    }

    /* Ensure checkboxes and radio buttons are properly sized */
    .checkmark,
    .radiomark {
        width: 18px;
        height: 18px;
        margin-right: 0.5rem;
    }

    .checkbox-item,
    .radio-item {
        padding: 0.75rem;
        font-size: 1rem;
    }
}
