:root {
    --bg-primary: #141921;
    --bg-secondary: #1f242f;
    --bg-input: #242a38;
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-blue-light: rgba(59, 130, 246, 0.15);
    --accent-blue-glow: rgba(59, 130, 246, 0.4);
    --text-primary: #eaebee;
    --text-secondary: #a1a7b3;
    --text-muted: #747b8a;
    --border-color: #343d4d;
    --border-focus: #424c5e;
    --success: #22c55e;
    --error: #ef4444;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.55);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 50px 24px;
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bg-secondary);
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.progress-bar::after {
    display: none;
}

/* Header */
.header {
    text-align: left;
    margin-bottom: 70px;
    margin-top: 40px;
    padding-left: 20px;
    border-left: 4px solid var(--accent-blue);
}

.header h1 {
    font-size: 38px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.header p {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 60px;
    padding: 0;
    position: relative;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.step {
    text-align: center;
    position: relative;
    flex: 1;
}

.step::before,
.step::after {
    display: none;
}

.step-number {
    width: auto;
    height: 3px;
    background: var(--border-color);
    border: none;
    color: transparent;
    display: block;
    margin: 0 auto 16px;
    font-weight: 700;
    font-size: 0;
    transition: all 0.3s ease;
    max-width: 80px;
}

.step.active .step-number {
    background: var(--accent-blue);
    height: 4px;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
}

.step.completed .step-number {
    background: var(--accent-blue);
    opacity: 0.5;
}

.step-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.step.active .step-label {
    color: var(--text-primary);
    font-weight: 700;
}

.step.completed .step-label {
    color: var(--text-secondary);
}


/* Form Card */
.form-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 48px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeInSlide 0.4s ease;
}

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

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

.step-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.step-description {
    color: var(--text-secondary);
    margin-bottom: 44px;
    font-size: 16px;
}

/* Form Elements */
.form-group {
    margin-bottom: 32px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.form-group label.required::after {
    content: '*';
    color: var(--error);
    margin-left: 4px;
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 0;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: var(--bg-primary);
    box-shadow: inset 0 0 0 1px var(--accent-blue);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="number"]:hover,
select:hover,
textarea:hover {
    border-color: var(--border-focus);
    background: var(--bg-primary);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="number"]::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

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

select {
    cursor: pointer;
    appearance: none;
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}


/* Radio/Checkbox Groups */
.radio-group,
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 12px;
}


.radio-option,
.checkbox-option {
    position: relative;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    padding: 14px 0;
    padding-left: 20px;
    background: transparent;
    border: none;
    border-left: 3px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.radio-label:hover,
.checkbox-label:hover {
    border-left-color: var(--border-focus);
    padding-left: 24px;
    color: var(--text-primary);
    background: var(--bg-input);
}

.radio-option input:checked+.radio-label,
.checkbox-option input:checked+.checkbox-label {
    background: var(--bg-input);
    border-left-color: var(--accent-blue);
    border-left-width: 4px;
    color: var(--text-primary);
    font-weight: 600;
    padding-left: 24px;
}

.radio-label::before,
.checkbox-label::before {
    display: none;
}

.radio-label::after,
.checkbox-label::after {
    content: '';
    position: absolute;
    right: 20px;
    width: 6px;
    height: 6px;
    background: transparent;
    border: 2px solid var(--border-color);
    transition: all 0.2s ease;
}

.radio-label::after {
    border-radius: 50%;
}

.checkbox-label::after {
    border-radius: 1px;
}

.radio-option input:checked+.radio-label::after,
.checkbox-option input:checked+.checkbox-label::after {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}


/* Range Slider */
.range-wrapper {
    display: flex;
    align-items: center;
    gap: 24px;
}

.range-track {
    flex: 1;
    position: relative;
    padding: 30px 0 10px;
}

.range-marks {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 2px;
    pointer-events: none;
}

.range-marks span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    width: 20px;
    text-align: center;
    position: relative;
}

.range-marks span::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 6px;
    background: var(--border-color);
}

input[type="range"] {
    width: 100%;
    height: 1px;
    background: var(--border-color);
    border-radius: 0;
    outline: none;
    -webkit-appearance: none;
    position: relative;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--bg-input);
    border: 2px solid var(--accent-blue);
    border-radius: 0;
    cursor: grab;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--accent-blue);
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

input[type="range"]::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--bg-input);
    border: 2px solid var(--accent-blue);
    border-radius: 0;
    cursor: grab;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
    transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    background: var(--accent-blue);
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

input[type="range"]::-moz-range-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.range-value-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 70px;
}

.range-value {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 0;
    font-weight: 700;
    font-size: 22px;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.range-value.low {
    border-color: #ef4444;
    color: #ef4444;
}

.range-value.medium {
    border-color: #f59e0b;
    color: #f59e0b;
}

.range-value.high {
    border-color: #22c55e;
    color: #22c55e;
}

.range-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .range-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .range-value-display {
        flex-direction: row;
        justify-content: center;
        gap: 12px;
    }

    .range-marks span {
        font-size: 10px;
    }

    .range-value {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}

/* Buttons */
.button-group {
    display: flex;
    gap: 16px;
    margin-top: 50px;
}

button {
    padding: 16px 0;
    border: none;
    border-radius: 0;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
}

.btn-primary {
    flex: 1;
    background: transparent;
    color: var(--text-primary);
    border-left: 4px solid var(--accent-blue);
    padding-left: 24px;
    text-align: left;
}

.btn-primary::after {
    content: '→';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--bg-input);
    border-left-color: var(--accent-blue-hover);
    padding-left: 30px;
}

.btn-primary:hover::after {
    right: 16px;
}

.btn-primary:active {
    transform: none;
    background: var(--bg-secondary);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-left-color: var(--border-color);
}

.btn-primary:disabled:hover {
    padding-left: 24px;
}

.btn-secondary {
    padding: 16px 24px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-left: 2px solid var(--border-color);
    padding-left: 24px;
    text-align: left;
}

.btn-secondary::before {
    content: '←';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--bg-input);
    color: var(--text-primary);
    border-left-color: var(--border-focus);
    padding-left: 30px;
}

.btn-secondary:hover::before {
    left: 12px;
}


/* Alert */
.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: none;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid;
}

.alert.show {
    display: flex;
    animation: slideDown 0.3s ease;
}

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

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

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border-color: var(--success);
    color: #86efac;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--error);
    color: #fca5a5;
}

/* Success Screen */
.success-screen {
    text-align: center;
    padding: 80px 20px;
}

.success-icon {
    width: 72px;
    height: 72px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4), 0 0 40px rgba(34, 197, 94, 0.2);
}

@keyframes scaleIn {
    from {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }

    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.success-icon svg {
    width: 36px;
    height: 36px;
    stroke: white;
    stroke-width: 3;
    fill: none;
}

.success-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.success-message {
    color: var(--text-secondary);
    font-size: 17px;
    margin-bottom: 40px;
}

/* Error Screen (Duplicate) */
.error-icon {
    width: 72px;
    height: 72px;
    background: var(--error);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    animation: shakeError 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4), 0 0 40px rgba(239, 68, 68, 0.2);
}

@keyframes shakeError {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

.error-icon svg {
    width: 36px;
    height: 36px;
    stroke: white;
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
}

.error-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.error-message {
    color: var(--text-secondary);
    font-size: 17px;
    margin-bottom: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 30px 16px;
    }

    .form-card {
        padding: 32px 24px;
        border-radius: 12px;
    }

    .header {
        margin-top: 20px;
        margin-bottom: 50px;
    }

    .header h1 {
        font-size: 36px;
    }

    .step-indicator {
        margin-bottom: 40px;
        max-width: 100%;
    }

    .step-label {
        font-size: 10px;
        letter-spacing: 0.8px;
    }

    .step-number {
        height: 2px;
        max-width: 60px;
    }

    .step.active .step-number {
        height: 3px;
    }


    .radio-group,
    .checkbox-group {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .radio-label,
    .checkbox-label {
        padding: 12px 0;
        padding-left: 16px;
        font-size: 13px;
    }

    .radio-label:hover,
    .checkbox-label:hover {
        padding-left: 20px;
    }

    .radio-option input:checked+.radio-label,
    .checkbox-option input:checked+.checkbox-label {
        padding-left: 20px;
    }

    .radio-label::after,
    .checkbox-label::after {
        right: 16px;
        width: 5px;
        height: 5px;
    }


    .button-group {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 14px 0;
        padding-left: 20px;
        font-size: 12px;
    }

    .btn-primary::after {
        right: 16px;
        font-size: 16px;
    }

    .btn-secondary::before {
        font-size: 14px;
    }


    .step-title {
        font-size: 26px;
    }

    .header {
        margin-top: 30px;
        margin-bottom: 50px;
    }

    .header h1 {
        font-size: 28px;
    }

    .header p {
        font-size: 13px;
        letter-spacing: 1px;
    }

    .header::before {
        font-size: 50px;
    }

    input[type="text"],
    input[type="email"],
    input[type="number"],
    select,
    textarea {
        padding: 11px 14px;
        font-size: 13px;
    }

    textarea {
        min-height: 90px;
    }
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error States */
.error-highlight {
    border-color: var(--error) !important;
    border-width: 2px !important;
    animation: shakeError 0.3s ease;
}

.error-highlight:focus {
    box-shadow: inset 0 0 0 1px var(--error) !important;
}

@keyframes shakeError {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-3px);
    }

    75% {
        transform: translateX(3px);
    }
}

.field-error {
    color: var(--error);
    font-size: 12px;
    margin-top: 8px;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
    padding-left: 2px;
}

.field-error::before {
    content: '⚠';
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
}

.radio-group.error-highlight,
.checkbox-group.error-highlight {
    padding: 12px;
    border: 1px dashed var(--error);
    border-radius: 4px;
    background: rgba(239, 68, 68, 0.05);
}

.radio-group .field-error,
.checkbox-group .field-error {
    margin-top: 12px;
    margin-left: 0;
}


/* Alert improvements */
.alert {
    animation: slideDown 0.3s ease, shake 0.3s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}