@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap'); 
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@700&display=swap');

/* ===============================
   🎨 Global Variables
================================= */
:root {
    --primary-blue: #0d6efd;
    --primary-purple: #A020F0;
    --primary-purple-hover: #a616ff;
    --primary-blue-hover: #0b5ed7;
    --background-light: #f8f9fa;
    --card-background: #ffffff;
    --text-dark: #212529;
    --text-light: #6c757d;
    --border-color: #dee2e6;
    --error-bg: #f8d7da;
    --error-text: #721c24;
    --error-border: #f5c6cb;
    --wisteria: #8e44ad;
    --belize: #2980b9;
    --green: #16a085;
}

/* ===============================
   🧩 Global Reset
================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--background-light);
}

/* ===============================
   🔐 Auth Container
================================= */
.auth-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    background: var(--card-background);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ===============================
   🌌 Left Branding Pane
================================= */
.left-pane {
    flex: 1;
    background: #090d00;
    color: rgba(255,255,255,.25);
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.branding-content {
    position: relative;
    z-index: 2;
}

.logo {
    font-family: "Oswald", sans-serif;
    font-weight: 700;
    font-size: 4em;
    line-height: 1;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0;
    text-shadow: 0 0 80px rgba(255,255,255,.5);
    margin: 0 auto;
    padding: .25em 0 .325em;
    background: url('purple.png') repeat-y;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: aitf 80s linear infinite;
    -webkit-animation: aitf 80s linear infinite;
    transform: translate3d(0,0,0);
    backface-visibility: hidden;
    -webkit-transform: translate3d(0,0,0);
    -webkit-backface-visibility: hidden;
}

.tagline {
    font-size: 1.2rem;
    font-weight: 400;
    margin-top: 10px;
    color: #e9ecef;
    opacity: 0.9;
}

.feature-list {
    margin-top: 30px;
    position: relative;
    height: 40px;
}

.feature-list .word {
    position: absolute;
    width: 100%;
    left: 0;
    opacity: 0;
    font-size: 1.1rem;
    color: #ced4da;
    display: flex;
    justify-content: center;
    letter-spacing: 0.1em;
}

.feature-list .letter {
    display: inline-block;
    position: relative;
    transform: translateZ(25px);
    transform-origin: 50% 50% 25px;
}

.letter.out {
    transform: rotateX(90deg);
    transition: transform 0.32s cubic-bezier(0.55, 0.055, 0.675, 0.19);
}

.letter.behind {
    transform: rotateX(-90deg);
}

.letter.in {
    transform: rotateX(0deg);
    transition: transform 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.shape { display: none; }

/* ===============================
   🧾 Right Form Pane
================================= */
.right-pane {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.form-wrapper {
    width: 100%;
    max-width: 380px;
    overflow-x: hidden;
}

.form-slider {
    display: flex;
    width: 200%;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.form-content {
    width: 50%;
    flex-shrink: 0;
    text-align: center;
    padding: 0 10px;
}

.form-wrapper.show-register .form-slider {
    transform: translateX(-50%);
}

.form-content > * {
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

#register-form > * {
    opacity: 0;
    transform: translateY(20px);
}

.form-wrapper.show-register #login-form > * {
    opacity: 0;
    transform: translateY(-20px);
    transition-duration: 0.3s;
}

.form-wrapper.show-register #register-form > * {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

/* ===============================
   ✏️ Text & Inputs
================================= */
h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-light);
    margin-bottom: 30px;
}

/* ===============================
   🔹 Input Fields & Alignment Fix
================================= */
.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-group .leading-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    z-index: 2;
}

.inp {
    position: relative;
    width: 100%;
}

.inp input {
    width: 100%;
    padding: 12px 45px 12px 45px; /* left for icon, right for toggle */
    font-size: 16px;
    font-weight: 500;
    border: 2px solid #C8CCD4;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s ease;
}

.inp input:focus {
    border-color: var(--primary-blue);
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #adb5bd;
    z-index: 2;
}

/* Animated SVG border (desktop only) */
.inp .border {
    position: absolute;
    top: 10px;
    left: 0;
    bottom: 0;
    height: 18px;
    width: 100%;
    fill: none;
}

.inp .border path {
    stroke: #C8CCD4;
    stroke-width: 2;
    transition: all 0.2s ease;
}

.inp .check {
    display: none !important;
    position: absolute;
    top: 16px;
    right: 45px;
    fill: none;
    transform: translate(0, 9px) scale(0);
    transition: all 0.3s cubic-bezier(.5, .9, .25, 1.3);
    transition-delay: 0.15s;
}

.inp .check path {
    stroke: var(--primary-blue);
    stroke-width: 2;
}

.inp input:valid + .border + .check {
    transform: translate(0, 0) scale(1);
}

.inp input::placeholder {
    color: #9098A9;
}

/* ===============================
   🔘 Buttons
================================= */
.btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: 10px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-btn {
    background-color: var(--primary-purple);
    color: white;
    margin-top: 10px;
}
.primary-btn:hover {
    background-color: var(--primary-purple-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.2);
}

.divider {
    margin: 25px 0;
    color: #6c757d;
    display: flex;
    align-items: center;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}
.divider:not(:empty)::before { margin-right: .5em; }
.divider:not(:empty)::after { margin-left: .5em; }

/* ===============================
   🌐 Social Buttons
================================= */
.social {
    background: #fff;
    color: #495057;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}
.social img {
    width: 20px;
    height: 20px;
}
.social:hover {
    background-color: #f8f9fa;
}

/* ===============================
   🪶 Misc
================================= */
.toggle-text {
    margin-top: 25px;
    font-size: 15px;
    color: var(--text-light);
}
.toggle-link {
    color: var(--primary-purple);
    font-weight: 600;
    cursor: pointer;
}

.error-message {
    background-color: var(--error-bg);
    color: var(--error-text);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--error-border);
    font-size: 0.9rem;
    font-weight: 500;
}
.error-message .toggle-link {
    text-decoration: underline;
}

/* ===============================
   ✨ Animation
================================= */
@keyframes aitf {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
@-webkit-keyframes aitf {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes elasticInput {
  33% {
    d: path("M0,12 L226,12 C220,12 220.666667,12 228,12 C239,12 245,1 253,1 C261,1 268,12 278,12 C284.666667,12 285.333333,12 280,12");
  }
  66% {
    d: path("M0,12 L226,12 C220,12 220.666667,12 228,12 C239,12 245,17 253,17 C261,17 268,12 278,12 C284.666667,12 285.333333,12 280,12");
  }
}

/* ===============================
   📱 Responsive
================================= */
@media (max-width: 850px) {
    .auth-container {
        flex-direction: column;
        min-height: auto;
        margin: 20px;
        max-width: 450px;
    }
    .left-pane {
        padding: 40px 20px;
    }
    .logo {
        font-size: 2.5rem;
    }
    .tagline {
        font-size: 1rem;
    }
    .feature-list {
        display: none;
    }
    .right-pane {
        padding: 30px 20px;
    }

    /* Mobile input adjustments */
    .inp .border,
    .inp .check {
        display: none;
    }
    .inp input {
        height: auto;
        padding: 12px 45px 12px 40px;
        border-bottom: 2px solid #ccc;
    }
    .inp input:focus,
    .inp input:valid {
        border-bottom-color: var(--primary-purple);
    }
    .input-group .leading-icon,
    .toggle-password {
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
    }
    .toggle-password { right: 10px; }
    .input-group .leading-icon { left: 5px; }
}
