:root {
    --primary-color: #6438c2;
    --secondary-color: #8b5cf6;
    --error-color: #ef4444;
    --success-color: #10b981;
    --text-light: #f8f9fa;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cabin', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Canvas de fondo */
#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.container {
    max-width: 500px;
    width: 100%;
    margin: 2rem;
    padding: 2.5rem;
    background: var(--bg-color, rgba(26, 26, 46, 0.95));
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color, rgba(100, 56, 194, 0.3));
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

/* Botón de retroceso */
.back-button {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(100, 56, 194, 0.1);
    border: 2px solid var(--border-color, rgba(100, 56, 194, 0.3));
    border-radius: 12px;
    color: var(--txt-color, #f8f9fa);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.back-button:hover {
    background: rgba(100, 56, 194, 0.2);
    border-color: var(--primary-color, #6438c2);
    transform: translateX(-4px);
}

.back-button svg {
    width: 24px;
    height: 24px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--txt-color, #f8f9fa);
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6438c2, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--txt-color, #f8f9fa);
}

input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--input-bg, rgba(255, 255, 255, 0.05));
    border: 2px solid var(--border-color, rgba(100, 56, 194, 0.3));
    border-radius: 12px;
    font-size: 1rem;
    color: var(--txt-color, #f8f9fa);
    font-family: 'Cabin', sans-serif;
    transition: all 0.3s ease;
}

input::placeholder {
    color: var(--txt-color-secondary, rgba(248, 249, 250, 0.5));
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--input-focus-bg, rgba(255, 255, 255, 0.08));
    box-shadow: 0 0 0 4px rgba(100, 56, 194, 0.2);
}

button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #6438c2, #8b5cf6);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Cabin', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(100, 56, 194, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(100, 56, 194, 0.4);
}

button:active {
    transform: translateY(0);
}

.alert {
    padding: 0.875rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 500;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 2px solid rgba(239, 68, 68, 0.3);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.login-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--txt-color-secondary, rgba(248, 249, 250, 0.7));
}

.login-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-link a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.password-requirements {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--txt-color-secondary, rgba(248, 249, 250, 0.5));
    line-height: 1.4;
}

/* Estilos para OAuth Google */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color, rgba(100, 56, 194, 0.3));
    border-radius: 12px;
    background: var(--input-bg, rgba(255, 255, 255, 0.05));
    color: var(--txt-color, #f8f9fa);
    text-decoration: none;
    font-weight: 500;
    font-family: 'Cabin', sans-serif;
    transition: all 0.3s ease;
    cursor: pointer;
}

.google-btn:hover {
    border-color: #4285f4;
    background: rgba(66, 133, 244, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.google-btn img {
    filter: brightness(1.2);
}

.or-separator {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.or-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color, rgba(100, 56, 194, 0.3));
}

.or-separator span {
    background: var(--bg-color, rgba(26, 26, 46, 0.95));
    padding: 0 1rem;
    color: var(--txt-color-secondary, rgba(248, 249, 250, 0.6));
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
}

@media (max-width: 600px) {
    .container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .google-btn {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
}