* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #FF6B35;
    --primary-dark: #E85A28;
    --secondary: #004E89;
    --bg: #0A0E27;
    --surface: #1A1F3A;
    --text: #E8EDF2;
    --text-secondary: #A0AEC0;
    --accent: #00D9FF;
    --success: #00F5A0;
    --border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Manrope', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

@media (max-width: 767px) {
    body {
        align-items: end;
        flex-direction: column;
    }
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 217, 255, 0.08) 0%, transparent 50%);
    animation: backgroundFloat 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes backgroundFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(1deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(-1deg);
    }
}

.container {
    width: 100%;
    max-width: 720px;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
}

@media screen and (max-width: 767px) {
    .header {
        position: relative;
    }
}

.logo {
    height: auto;
}

.language-switcher {
    display: flex;
    gap: 8px;
    background: var(--surface);
    padding: 6px;
    border-radius: 50px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.lang-btn:hover {
    color: var(--text);
    transform: scale(1.05);
}

.lang-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.form-wrapper {
    background: var(--surface);
    border-radius: 24px;
    padding: 60px 50px 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 40px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.step {
    display: none;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.step.active {
    display: block;
}

.step.exit {
    animation: fadeOutDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

.step-number {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.step-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
    line-height: 1.2;
}

.step-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 36px;
    line-height: 1.6;
}

.input-group {
    margin-bottom: 32px;
}

.input-field {
    width: 100%;
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--border);
    border-radius: 16px;
    color: var(--text);
    font-size: 16px;
    font-family: 'Manrope', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.input-field:focus {
    border-color: var(--primary);
    background: rgba(255, 107, 53, 0.05);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
    transform: translateY(-2px);
}

.input-field:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.input-field::placeholder {
    color: var(--text-secondary);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.checkbox-btn {
    position: relative;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    user-select: none;
}

@media (max-width: 767px) {
    .checkbox-btn {
        padding: 10px;
    }
}

.checkbox-btn:hover {
    border-color: var(--primary);
    background: rgba(255, 107, 53, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.15);
}

.checkbox-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    color: white;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
}

.checkbox-btn .checkmark {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.checkbox-btn .checkmark::after {
    content: '✓';
    position: absolute;
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    transform: scale(0) rotate(-45deg);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.checkbox-btn.active .checkmark::after {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.other-input {
    margin-top: 16px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.other-input.show {
    opacity: 1;
    max-height: 100px;
}

.region-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

.region-btn {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.region-btn:hover {
    border-color: var(--accent);
    background: rgba(0, 217, 255, 0.05);
    transform: translateY(-3px);
}

.region-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    border-color: var(--accent);
    color: white;
    box-shadow: 0 8px 24px rgba(0, 217, 255, 0.3);
}

.country-search-wrapper {
    position: relative;
    margin-top: 24px;
    opacity: 0;
    max-height: 0;
    overflow: visible;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.country-search-wrapper.show {
    opacity: 1;
    max-height: 500px;
}

.country-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    min-height: 40px;
}

.country-tag {
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: tagAppear 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes tagAppear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.country-tag button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.country-tag button:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
}

.autocomplete-wrapper {
    position: relative;
}

.country-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 16px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.country-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.country-dropdown::-webkit-scrollbar {
    width: 8px;
}

.country-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.country-dropdown::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.country-option {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.country-option:hover {
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary);
}

.country-code {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: var(--text-secondary);
}

.buttons {
    display: flex;
    gap: 16px;
    margin-top: 40px;
}

.btn {
    flex: 1;
    padding: 18px 32px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Manrope', sans-serif;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-back {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(-5px);
}

.btn-next {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
}

.btn-next:hover {
    box-shadow: 0 12px 32px rgba(255, 107, 53, 0.5);
    transform: translateY(-2px);
}

.btn-next:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.success-message {
    text-align: center;
    padding: 60px 20px;
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, var(--success), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 12px 40px rgba(0, 245, 160, 0.3);
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.success-text {
    font-size: 18px;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    .form-wrapper {
        padding: 20px 15px;
        border-radius: 20px;
    }

    .step-title {
        font-size: 26px;
    }

    .checkbox-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .region-selector {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .language-switcher {
        top: 20px;
        right: 20px;
    }

    .buttons {
        flex-direction: column;
    }
}

.vertical-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.form-wrapper {
    min-height: 800px;
    display: flex;
    flex-direction: column;
}

#multiStepForm {
    /*flex: 1;*/
    margin: auto 0;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 40px;
}

.step {
    position: absolute;
    width: 100%;
    min-height: 450px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.step.active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

.step.exit {
    position: absolute;
    opacity: 0;
}

.buttons {
    margin-top: auto;
    padding-top: 2rem;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s;
}

.error-message {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(255, 77, 77, 0.1);
}

.region-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.region-btn {
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    background: rgba(74, 222, 128, 0.1);
    border: 2px solid transparent;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.region-btn:hover {
    background: rgba(74, 222, 128, 0.2);
    border-color: rgba(74, 222, 128, 0.3);
}

.region-btn.active {
    background: rgba(74, 222, 128, 0.3);
    border-color: #4ade80;
}

.error-message-step {
    text-align: center;
    padding: 60px 20px;
}

.error-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #ff4d4d, #ff6b6b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: white;
    animation: errorPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 12px 40px rgba(255, 77, 77, 0.3);
}

@keyframes errorPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.error-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #ff4d4d;
}

.error-text {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.preloader.show {
    opacity: 1;
    visibility: visible;
}

.preloader-content {
    text-align: center;
    animation: fadeInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.preloader-spinner {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid transparent;
    animation: spinRotate 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: var(--primary);
    border-right-color: var(--primary);
    animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
    border-top-color: var(--accent);
    border-right-color: var(--accent);
    animation-delay: -0.5s;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
}

.spinner-ring:nth-child(3) {
    border-top-color: var(--success);
    border-right-color: var(--success);
    animation-delay: -1s;
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
}

@keyframes spinRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.preloader-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    animation: textPulse 1.5s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}