* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #19C8A1 0%, #14b8a6 50%, #0d9488 100%);
    min-height: 100vh;
    margin: 0;

    overflow-x: hidden;
    overflow-y: auto;

    display: flex;
    justify-content: center;
    align-items: flex-start;

    padding: 30px 20px;
}

.background-3d {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 0;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    animation: float3d 20s ease-in-out infinite;
    opacity: 0.15;
}

.shape1 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(25, 200, 161, 0.4), transparent);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    filter: blur(70px);
}

.shape2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.4), transparent);
    bottom: 15%;
    right: 15%;
    animation-delay: 5s;
    filter: blur(60px);
}

.shape3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.3), transparent);
    top: 50%;
    right: 10%;
    animation-delay: 10s;
    filter: blur(50px);
}

.container {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25), 
                0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 10;
    transform-style: preserve-3d;
    animation: containerFloat 6s ease-in-out infinite;
}

.header {
    background: linear-gradient(135deg, #19C8A1 0%, #14b8a6 50%, #0d9488 100%);
    padding: 45px 30px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    animation: shimmerLine 3s ease-in-out infinite;
}

.header-content {
    position: relative;
    z-index: 2;
    transform-style: preserve-3d;
}

.logo {
    font-size: 72px;
    margin-bottom: 12px;
    animation: logo3d 4s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
    display: inline-block;
    transform-style: preserve-3d;
}

.header h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 10px;
    animation: slideDown3d 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    letter-spacing: 1px;
    transform-style: preserve-3d;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header p {
    font-size: 16px;
    opacity: 0.92;
    animation: slideDown3d 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-weight: 400;
    letter-spacing: 0.3px;
}

.form-container {
    padding: 45px 40px;
    animation: fadeIn 0.8s ease;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: pageFlip 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

h2 {
    margin-bottom: 30px;
    color: #19C8A1;
    font-size: 28px;
    font-weight: 800;
    position: relative;
    padding-bottom: 15px;
    animation: titlePop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70px;
    height: 3px;
    background: linear-gradient(90deg, #19C8A1, #14b8a6);
    border-radius: 2px;
    animation: lineExpand 0.8s ease;
    box-shadow: 0 2px 8px rgba(25, 200, 161, 0.3);
}

h3 {
    margin-bottom: 20px;
    color: #19C8A1;
    font-size: 20px;
    font-weight: 700;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
    animation: inputSlide 0.5s ease forwards;
    opacity: 0;
    transform: translateX(-30px);
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }
.form-group:nth-child(6) { animation-delay: 0.6s; }

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #19C8A1;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.input-wrapper {
    position: relative;
    transform-style: preserve-3d;
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e7ff;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    outline: none;
    background: #f8fafc;
    color: #1e293b;
    transform-style: preserve-3d;
    font-weight: 500;
}

.form-group select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e7ff;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    outline: none;
    background: #f8fafc;
    color: #1e293b;
    transform-style: preserve-3d;
    font-weight: 500;
    appearance: none;
}

.form-group input::placeholder {
    color: #94a3b8;
}

.form-group input:focus {
    border-color: #19C8A1;
    background: white;
    box-shadow: 0 8px 24px rgba(25, 200, 161, 0.15),
                0 0 0 4px rgba(25, 200, 161, 0.08);
    transform: translateY(-3px) scale(1.01);
}

.form-group select:focus {
    border-color: #19C8A1;
    background: white;
    box-shadow: 0 8px 24px rgba(25, 200, 161, 0.15),
                0 0 0 4px rgba(25, 200, 161, 0.08);
    transform: translateY(-3px) scale(1.01);
}

.form-group input:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 200, 161, 0.1);
    border-color: #5eead4;
}

.form-group select:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 200, 161, 0.1);
    border-color: #5eead4;
}

.form-group input.error {
    border-color: #ef4444;
    animation: shake3d 0.6s ease;
    background: #fef2f2;
}

.form-group select.error {
    border-color: #ef4444;
    animation: shake3d 0.6s ease;
    background: #fef2f2;
}

.error-message {
    color: #ef4444;
    font-size: 13px;
    margin-top: 6px;
    display: none;
    font-weight: 600;
}

.error-message.show {
    display: block;
    animation: errorPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.btn {
    width: 100%;
    padding: 17px;
    background: linear-gradient(135deg, #19C8A1 0%, #14b8a6 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    margin-top: 15px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(25, 200, 161, 0.3);
    transform-style: preserve-3d;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 16px 40px rgba(25, 200, 161, 0.35);
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.btn:active {
    transform: translateY(-2px) scale(0.98);
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.link-text {
    text-align: center;
    margin-top: 25px;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    animation: fadeInUp 0.8s ease;
}

.link-text a {
    color: #19C8A1;
    text-decoration: none;
    font-weight: 800;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.link-text a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #19C8A1, #14b8a6);
    transition: width 0.3s ease;
}

.link-text a:hover {
    color: #0d9488;
    transform: translateY(-2px);
}

.link-text a:hover::after {
    width: 100%;
}

.support-mail {
    text-align: center;
    margin-top: 12px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.support-mail a {
    color: #19C8A1;
    text-decoration: none;
    font-weight: 800;
    transition: all 0.3s ease;
    position: relative;
}

.support-mail a:hover {
    color: #0d9488;
}

.forgot-link {
    text-align: right;
    margin-top: -12px;
    margin-bottom: 20px;
}

.forgot-link a {
    color: #19C8A1;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-block;
}

.forgot-link a:hover {
    color: #0d9488;
    transform: translateX(3px);
}

.success-message {
    background: linear-gradient(135deg, #19C8A1 0%, #14b8a6 100%);
    color: #fff;
    padding: 18px 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 25px;
    display: none;
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(25, 200, 161, 0.3);
    transform-style: preserve-3d;
    letter-spacing: 0.3px;
}

.success-message.show {
    display: block;
}

.password-strength {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
    display: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.password-strength.show {
    display: block;
    animation: barSlide 0.4s ease;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 3px;
    position: relative;
}

.password-strength-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

.password-strength-bar.weak {
    width: 33%;
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.password-strength-bar.medium {
    width: 66%;
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.password-strength-bar.strong {
    width: 100%;
    background: linear-gradient(90deg, #19C8A1, #14b8a6);
}

.strength-text {
    font-size: 12px;
    margin-top: 6px;
    font-weight: 700;
    display: none;
}

.strength-text.show {
    display: block;
    animation: textPulse 0.5s ease;
}

.strength-text.weak { color: #ef4444; }
.strength-text.medium { color: #f59e0b; }
.strength-text.strong { color: #19C8A1; }

/* 3D Animations */
@keyframes float3d {
    0%, 100% {
        transform: translate(0, 0) rotateX(0deg) rotateY(0deg);
    }
    25% {
        transform: translate(20px, -20px) rotateX(10deg) rotateY(10deg);
    }
    50% {
        transform: translate(-20px, 20px) rotateX(-10deg) rotateY(-10deg);
    }
    75% {
        transform: translate(20px, 20px) rotateX(10deg) rotateY(-10deg);
    }
}

@keyframes containerFloat {
    0%, 100% {
        transform: translateY(0px) rotateX(0deg);
    }
    50% {
        transform: translateY(-10px) rotateX(2deg);
    }
}

@keyframes logo3d {
    0%, 100% {
        transform: rotateY(0deg) rotateX(0deg) scale(1);
    }
    25% {
        transform: rotateY(15deg) rotateX(10deg) scale(1.1);
    }
    50% {
        transform: rotateY(0deg) rotateX(-10deg) scale(1.05);
    }
    75% {
        transform: rotateY(-15deg) rotateX(10deg) scale(1.1);
    }
}

@keyframes slideDown3d {
    from {
        opacity: 0;
        transform: translateY(-50px) translateZ(-100px) rotateX(90deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateZ(0) rotateX(0deg);
    }
}

@keyframes pageFlip {
    0% {
        opacity: 0;
        transform: rotateY(-90deg) scale(0.8);
        transform-origin: center;
    }
    100% {
        opacity: 1;
        transform: rotateY(0deg) scale(1);
    }
}

@keyframes titlePop {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(-20px);
    }
    50% {
        transform: scale(1.1) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes inputSlide {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shake3d {
    0%, 100% { 
        transform: translateX(0) rotateZ(0deg);
    }
    25% { 
        transform: translateX(-10px) rotateZ(-5deg);
    }
    75% { 
        transform: translateX(10px) rotateZ(5deg);
    }
}

@keyframes errorPop {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
    }
    60% {
        transform: scale(1.05) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes successPop {
    0% {
        opacity: 0;
        transform: scale(0.5) translateZ(-100px);
    }
    50% {
        transform: scale(1.1) translateZ(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateZ(0);
    }
}

@keyframes barSlide {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes lineExpand {
    from {
        width: 0;
    }
    to {
        width: 70px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes textPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

@keyframes shimmerLine {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 480px) {
    .form-container {
        padding: 35px 25px;
    }
    
    .header {
        padding: 40px 25px;
    }

    .logo {
        font-size: 56px;
    }

    h2 {
        font-size: 24px;
    }
}
