@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; color: #fff; }
body { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; background: #1a1a2e; padding: 20px; }

/* --- YOUR PROVIDED STYLES (Optimized) --- */
.footer { margin-top: 30px; text-align: center; padding: 15px; font-size: 14px; }
.footer a { color: #00d4ff; text-decoration: none; font-weight: 600; transition: .3s; }
.footer a:hover { text-decoration: underline; color: #00b8d4; }

.auth-wrapper { position: relative; width: 100%; max-width: 800px; height: 500px; border: 2px solid #00d4ff; box-shadow: 0 0 25px #00d4ff; overflow: hidden; border-radius: 10px; }
.background-shape { position: absolute; right: 0; top: -5px; height: 600px; width: 850px; background: linear-gradient(45deg, #1a1a2e, #00d4ff); transform: rotate(10deg) skewY(40deg); transform-origin: bottom right; transition: 1.5s ease; transition-delay: 1.6s; }
.auth-wrapper.toggled .background-shape { transform: rotate(0deg) skewY(0deg); transition-delay: .5s; }
.secondary-shape { position: absolute; left: 250px; top: 100%; height: 700px; width: 850px; background: #1a1a2e; border-top: 3px solid #00d4ff; transform: rotate(0deg) skewY(0deg); transform-origin: bottom left; transition: 1.5s ease; transition-delay: .5s; }
.auth-wrapper.toggled .secondary-shape { transform: rotate(-11deg) skewY(-41deg); transition-delay: 1.2s; }

/* PANELS */
.credentials-panel { position: absolute; top: 0; width: 50%; height: 100%; display: flex; justify-content: center; flex-direction: column; padding: 0 40px; }
.credentials-panel.signin { left: 0; }
.credentials-panel.signup { right: 0; padding: 0 60px; }

/* SLIDE ELEMENTS */
.slide-element { transition: .7s; opacity: 1; }
.credentials-panel.signin .slide-element { transform: translateX(0%); }
.auth-wrapper.toggled .credentials-panel.signin .slide-element { transform: translateX(-120%); opacity: 0; }
.credentials-panel.signup .slide-element { transform: translateX(120%); opacity: 0; filter: blur(10px); }
.auth-wrapper.toggled .credentials-panel.signup .slide-element { transform: translateX(0%); opacity: 1; filter: blur(0px); }

/* DELAYS (Cascading Effect) */
.credentials-panel.signin .slide-element:nth-child(1) { transition-delay: 0.2s; }
.credentials-panel.signin .slide-element:nth-child(2) { transition-delay: 0.3s; }
.credentials-panel.signin .slide-element:nth-child(3) { transition-delay: 0.4s; }
.auth-wrapper.toggled .credentials-panel.signup .slide-element:nth-child(1) { transition-delay: 1.7s; }
.auth-wrapper.toggled .credentials-panel.signup .slide-element:nth-child(2) { transition-delay: 1.8s; }
.auth-wrapper.toggled .credentials-panel.signup .slide-element:nth-child(3) { transition-delay: 1.9s; }

/* FORMS */
h2 { font-size: 32px; text-align: center; margin-bottom: 20px; }
.field-wrapper { position: relative; width: 100%; height: 50px; margin-top: 25px; }
.field-wrapper input { width: 100%; height: 100%; background: transparent; border: none; outline: none; font-size: 16px; border-bottom: 2px solid #fff; padding-right: 23px; transition: .5s; }
.field-wrapper input:focus, .field-wrapper input:valid { border-bottom: 2px solid #00d4ff; }
.field-wrapper label { position: absolute; top: 50%; left: 0; transform: translateY(-50%); transition: .5s; pointer-events: none; }
.field-wrapper input:focus~label, .field-wrapper input:valid~label { top: -5px; color: #00d4ff; font-size: 12px; }
.field-wrapper i { position: absolute; top: 50%; right: 0; transform: translateY(-50%); }

.submit-button { position: relative; width: 100%; height: 45px; margin-top: 30px; background: transparent; border-radius: 40px; cursor: pointer; font-size: 16px; font-weight: 600; border: 2px solid #00d4ff; overflow: hidden; z-index: 1; color: #fff; }
.submit-button::before { content: ""; position: absolute; height: 300%; width: 100%; background: linear-gradient(#1a1a2e, #00d4ff); top: -100%; left: 0; z-index: -1; transition: .5s; }
.submit-button:hover:before { top: 0; }

.switch-link { font-size: 14px; text-align: center; margin: 20px 0 10px; }
.switch-link a { color: #00d4ff; text-decoration: none; font-weight: 600; cursor: pointer; }

/* WELCOME SECTIONS */
.welcome-section { position: absolute; top: 0; height: 100%; width: 50%; display: flex; justify-content: center; flex-direction: column; }
.welcome-section.signin { right: 0; text-align: right; padding: 0 40px 60px 150px; }
.welcome-section.signup { left: 0; text-align: left; padding: 0 150px 60px 38px; pointer-events: none; }
.welcome-section .slide-element { transition: .7s ease; }
.auth-wrapper.toggled .welcome-section.signin .slide-element { transform: translateX(120%); opacity: 0; }
.auth-wrapper.toggled .welcome-section.signup .slide-element { transform: translateX(0%); opacity: 1; }

/* MOBILE */
@media (max-width: 768px) {
    .auth-wrapper { height: auto; min-height: 500px; flex-direction: column; }
    .credentials-panel { width: 100%; position: relative; height: auto; padding: 40px 20px; }
    .credentials-panel.signup { display: none; }
    .auth-wrapper.toggled .credentials-panel.signin { display: none; }
    .auth-wrapper.toggled .credentials-panel.signup { display: block; animation: fadeInUp 0.6s forwards; }
    .background-shape, .secondary-shape, .welcome-section { display: none; }
    @keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
}
