:root {
    /* Heinz Sport SAC Colors */
    --brand-green: #0bd498;
    --brand-light-blue: #a0e8fa;
    --brand-dark-blue: #090947;
    --brand-light: #F4F7F6;
    --brand-white: #F4F4F4;
    --brand-dark-gray: #333333;

    --primary: var(--brand-green);
    --primary-hover: #08a878;
    /* Un tono un poco más oscuro del verde para el hover */
    --secondary: var(--brand-light-blue);
    --bg-color: var(--brand-dark-blue);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: var(--brand-white);
    --text-muted: #b0c4de;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    overflow: hidden;
    position: relative;
    color: var(--text-color);
}

/* Vibrant Animated Background Blobs */
.background-blob {
    position: absolute;
    filter: blur(90px);
    z-index: -1;
    border-radius: 50%;
    animation: float 10s ease-in-out infinite alternate;
}

.shape1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -150px;
    left: -150px;
    opacity: 0.5;
}

.shape2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -150px;
    right: -150px;
    opacity: 0.5;
    animation-delay: -5s;
    animation-duration: 8s;
}

.shape3 {
    width: 300px;
    height: 300px;
    background: var(--brand-light);
    bottom: 20%;
    left: 20%;
    opacity: 0.3;
    animation-delay: -2s;
    animation-duration: 12s;
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1) translateX(0);
    }

    100% {
        transform: translateY(50px) scale(1.1) translateX(30px);
    }
}

/* Container & Glassmorphism */
.container {
    background: var(--glass-bg);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    width: 450px;
    max-width: 95%;
    min-height: 600px;
}

.forms-container {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
}

/* Forms layout */
.login-form {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    width: 100%;
    transition: opacity 0.4s ease-in-out, visibility 0.4s, transform 0.4s ease-in-out;
}

/* ===== Toggling logic: crossfade and slide ===== */

.sign-in-form {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

.sign-up-form {
    opacity: 0;
    z-index: 1;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(50px);
}

/* Active Registration state (.toggle) */
.container.toggle .sign-in-form {
    transform: translateX(-50px);
    opacity: 0;
    z-index: 1;
    visibility: hidden;
    pointer-events: none;
}

.container.toggle .sign-up-form {
    transform: translateX(0);
    opacity: 1;
    z-index: 5;
    visibility: visible;
    pointer-events: auto;
}

/* Typography and Layout within Forms */
.title {
    font-size: 2.2rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
}

.brand-logo {
    width: 140px;
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.social-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 15px 0;
}

/* Social Icons */
.social-networks {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-icon img {
    width: 20px;
    filter: invert(1);
}

.social-icon:hover {
    background: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.5);
    border-color: var(--primary);
}

/* Input Fields */
.input-field {
    width: 100%;
    max-width: 350px;
    background: rgba(0, 0, 0, 0.2);
    margin: 10px 0;
    height: 50px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s;
}

.input-field:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.2);
    background: rgba(0, 0, 0, 0.4);
}

.input-icon {
    width: 20px;
    filter: invert(0.6);
    margin-right: 15px;
    transition: all 0.3s;
}

.input-field:focus-within .input-icon {
    filter: invert(1);
    transform: scale(1.1);
}

.input-field input {
    background: none;
    outline: none;
    border: none;
    line-height: 1;
    font-weight: 400;
    font-size: 1rem;
    color: #fff;
    width: 100%;
}

.input-field input::placeholder {
    color: #aaa;
    font-weight: 300;
}

/* Buttons */
.btn {
    width: 180px;
    background: var(--primary);
    border: none;
    outline: none;
    height: 48px;
    border-radius: 25px;
    color: #fff;
    text-transform: uppercase;
    font-weight: 600;
    margin: 20px 0;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 5px 20px rgba(108, 92, 231, 0.5);
    transform: translateY(-2px);
}

.bottom-text {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 320px;
    margin-top: 5px;
}

.bottom-text a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.bottom-text a:hover {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Text Links at the bottom for Toggling */
.toggle-text {
    margin-top: 15px;
    font-size: 0.95rem;
    text-align: center;
}

.toggle-text a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 5px;
    transition: color 0.3s;
}

.toggle-text a:hover {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Responsive Styles */
@media (max-width: 480px) {
    .container {
        min-height: 550px;
    }

    .login-form {
        padding: 0 25px;
    }
}