.step-view {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    opacity: 0;
}

.step-view.active {
    display: flex;
    animation: stepViewFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.step-view.fading-out {
    display: flex;
    animation: stepViewFadeOut 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes stepViewFadeIn {
    0% { opacity: 0; filter: blur(4px); }
    100% { opacity: 1; filter: blur(0px); }
}

@keyframes stepViewFadeOut {
    0% { opacity: 1; filter: blur(0px); }
    100% { opacity: 0; filter: blur(3px); }
}

#steps-form-wrapper {
    margin-top: 70px;
}

.form-card-outer {
    width: 100%;
    max-width: 1180px;
    background: rgba(255, 255, 255, 0.45);
    border: 1.5px solid #a2d7f8;
    border-radius: 28px;
    padding: 20px 26px 28px;
    box-shadow: 0 8px 18.6px rgba(0, 0, 0, 0.25);
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.btn-submit.btn-burst-loading {
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    color: transparent !important;
    background: rgba(255, 255, 255, 0.4) !important;
    border: 2px solid #3F89A0 !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    animation: frostedGlassSpin 1s infinite linear !important;
    pointer-events: none;
    transform: scale(0.95);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

@keyframes frostedGlassSpin {
    0% {
        transform: rotate(0deg) scale(0.95);
        box-shadow: 0 0 15px rgba(63, 137, 160, 0.4);
    }
    100% {
        transform: rotate(360deg) scale(0.95);
        box-shadow: 0 0 25px rgba(63, 137, 160, 0.7);
    }
}

.btn-submit.fly-up {
    animation: flyUpRocket 0.65s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

@keyframes flyUpRocket {
    0% {
        transform: translateY(0) scale(0.95);
        opacity: 1;
    }
    30% {
        transform: translateY(15px) scale(0.9);
    }
    100% {
        transform: translateY(-500px) scale(0.5);
        opacity: 0;
        filter: blur(6px);
    }
}

#step-4.step-view.active {
    animation: none !important;
    opacity: 1 !important;
}

.reveal-pop {
    animation: gentleSmoothFade 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
}

@keyframes gentleSmoothFade {
    0% {
        opacity: 0;
        filter: blur(8px);
    }
    100% {
        opacity: 1;
        filter: blur(0px);
    }
}

.steps-progress-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    padding: 0 4px 6px;
    margin-bottom: 8px;
    width: 100%;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #557884;
    font-size: 17px;
    font-weight: 700;
    width: 100%;
    cursor: default;
    transition: color 0.45s ease;
}

.step-item.active,
.step-item.completed {
    color: #145b73;
}

.step-item-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background-color: #88b7c7;
    color: #ffffff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
    transition: background-color 0.45s ease;
}

.step-item.active .step-num,
.step-item.completed .step-num {
    background-color: #3F89A0;
}

.step-line {
    width: 100%;
    height: 6px;
    background-color: #E4E4E4;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.step-line-active {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3F89A0 0%, #E4E4E4 100%);
    border-radius: 6px;
    opacity: 0;
    transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
}

.step-line-completed {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #3F89A0;
    border-radius: 6px;
    opacity: 0;
    transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
}

.step-item.active .step-line-active {
    width: 100%;
    opacity: 1;
}

.step-item.active .step-line-completed {
    width: 0%;
    opacity: 0;
}

.step-item.completed .step-line-completed {
    width: 100%;
    opacity: 1;
}

.step-item.completed .step-line-active {
    width: 100%;
    opacity: 0;
}

.step-item:not(.active):not(.completed) .step-line-active {
    width: 0%;
    opacity: 0;
}

.step-item:not(.active):not(.completed) .step-line-completed {
    width: 0%;
    opacity: 0;
}

.form-card-inner-container {
    background: #ffffff;
    border: 1.5px solid #a2d7f8;
    border-radius: 20px;
    padding: 36px 44px 30px;
    margin-top: 14px;
    box-shadow: 0 8px 18.6px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    min-height: 490px;
}

.form-step-content {
    display: none;
    opacity: 0;
    will-change: transform, opacity, filter;
    min-height: 420px;
    flex-direction: column;
    justify-content: space-between;
}

.form-step-content.active {
    display: flex !important;
    opacity: 1;
    transform: translateX(0);
    filter: blur(0px);
}

.form-step-content.slide-in-right {
    display: flex !important;
    animation: slideInFromRight 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.form-step-content.slide-out-left {
    display: flex !important;
    animation: slideOutToLeft 0.35s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.form-step-content.slide-in-left {
    display: flex !important;
    animation: slideInFromLeft 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.form-step-content.slide-out-right {
    display: flex !important;
    animation: slideOutToRight 0.35s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes slideInFromRight {
    0% { opacity: 0; transform: translateX(55px); filter: blur(7px); }
    100% { opacity: 1; transform: translateX(0); filter: blur(0px); }
}

@keyframes slideOutToLeft {
    0% { opacity: 1; transform: translateX(0); filter: blur(0px); }
    100% { opacity: 0; transform: translateX(-55px); filter: blur(7px); }
}

@keyframes slideInFromLeft {
    0% { opacity: 0; transform: translateX(-55px); filter: blur(7px); }
    100% { opacity: 1; transform: translateX(0); filter: blur(0px); }
}

@keyframes slideOutToRight {
    0% { opacity: 1; transform: translateX(0); filter: blur(0px); }
    100% { opacity: 0; transform: translateX(55px); filter: blur(7px); }
}

.step-header {
    display: flex;
    align-items: center;
    gap: 18px;
    text-align: left;
    margin-bottom: 36px;
}

.step-icon-circle {
    width: 54px;
    height: 54px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-icon {
    width: 100%;
    height: 100%;
    display: block;
}

.step-header-text h2 {
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 4px;
}

.step-header-text p {
    font-size: 15.5px;
    color: #333333;
}

/* FORMULAR: statische Zeilen mit Platz für Fehlertext */
.form-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    column-gap: 40px !important;
    row-gap: 32px !important;
    text-align: left !important;
}

.form-group {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.form-group label {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #000000 !important;
}

.form-input {
    width: 100% !important;
    height: 42px !important;
    padding: 8px 14px !important;
    background: #f7fcff !important;
    border: 1.5px solid #7dc7f9 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: #1a1a1a !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.form-input:focus {
    background: #ffffff !important;
    border-color: #008ccf !important;
    box-shadow: 0 0 0 3px rgba(0, 140, 207, 0.18) !important;
}

/* ROTER RAHMEN FÜR FEHLER */
input.form-input.input-error,
.form-input.input-error {
    border: 1.8px solid #d90429 !important;
    background-color: #fff6f6 !important;
    box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.2) !important;
}

/* FEHLERTEXT RECHTS OHNE VERSATZ */
.error-message {
    display: none;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    width: 100% !important;
    margin-top: 4px !important;
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #d90429 !important;
    text-shadow: 0 0 6px rgba(217, 4, 41, 0.25) !important;
    text-align: right !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 6px !important;
    pointer-events: none !important;
    z-index: 10 !important;
}

.error-message span {
    color: #d90429 !important;
}

.error-message.visible {
    display: flex !important;
}

.error-icon {
    width: 14px !important;
    height: 14px !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

.step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding: 24px 40px 0;
}

.btn-nav {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;
    padding: 12px 32px;
    background: linear-gradient(135deg, #dff4ff 0%, #b4e3fa 100%);
    color: #10232c;
    text-decoration: none;
    font-size: 16px;
    font-weight: 650;
    letter-spacing: 2px;
    border-radius: 50px;
    border: 2px solid #ffffff;
    box-shadow: 0 3px 0 #0088cc, 0 6px 16px rgba(0, 140, 207, 0.16);
    overflow: hidden;
    cursor: pointer;
    outline: none;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background 0.3s ease;
}

.btn-nav::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(186, 233, 255, 0.2) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.55s cubic-bezier(0.25, 1, 0.5, 1), height 0.55s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.55s ease;
    opacity: 0;
    z-index: -1;
}

.btn-nav .arrow {
    font-size: 19px;
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-back .arrow { margin-right: 10px; }
.btn-next .arrow { margin-left: 10px; }

.btn-nav:hover {
    transform: translateY(-3px) scale(1.02);
    background: linear-gradient(135deg, #eaf7ff 0%, #bee8fc 100%);
    box-shadow: 0 5px 0 #0077b5, 0 10px 22px rgba(0, 140, 207, 0.25), 0 0 14px rgba(255, 255, 255, 0.8) inset;
}

.btn-nav:hover::before { width: 260px; height: 260px; opacity: 1; }
.btn-back:hover .arrow { transform: translateX(-5px) scale(1.15); }
.btn-next:hover .arrow { transform: translateX(5px) scale(1.15); }

.btn-nav:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 1px 0 #0077b5, 0 3px 8px rgba(0, 140, 207, 0.15);
}

@media (max-width: 768px) {
    .form-card-inner-container { padding: 20px 16px; min-height: auto; }
    .steps-progress-bar { grid-template-columns: 1fr; gap: 12px; }
    .form-grid { grid-template-columns: 1fr; row-gap: 16px; }
    .step-actions { padding: 0; gap: 12px; }
    .btn-nav { min-width: 130px; font-size: 14px; padding: 9px 16px; }
}

#step-4 {
    margin-top: 70px;
}

.success-card {
    min-height: 590px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 26px;
}

.success-title {
    font-size: 32px;
    font-weight: 800;
    color: #000000;
    margin: 0;
}

.success-title::after {
    display: none !important;
}

.success-icon-wrapper {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 6px 0;
}

.success-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.success-text {
    font-size: 20px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0;
    max-width: 600px;
    line-height: 1.4;
}

.btn-home {
    margin-top: 10px;
    min-width: 190px;
    letter-spacing: 0.5px;
    font-size: 16px;
    font-weight: 600;
}

/* Dezente, halbtransparente Hinweise für alle Browser */
.form-input::placeholder {
    color: #a4b4bc !important;
    font-size: 14px;
    font-weight: 400;
    opacity: 0.75;
}

.form-input::-webkit-input-placeholder {
    color: #a4b4bc !important;
    font-size: 14px;
    font-weight: 400;
    opacity: 0.75;
}

.form-input::-moz-placeholder {
    color: #a4b4bc !important;
    font-size: 14px;
    font-weight: 400;
    opacity: 0.75;
}