:root {
    --primary-color: #00d2ff;
    --secondary-color: #3a7bd5;
    --accent-color: #ff0076;
    --bg-color: #050810;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --input-bg: rgba(0, 0, 0, 0.3);
    --input-focus: rgba(255, 255, 255, 0.05);
    --font-family: 'Outfit', sans-serif;
    --transition-speed: 0.4s;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Blobs for Glassmorphism Context */
.blob {
    position: absolute;
    filter: blur(120px);
    z-index: -1;
    border-radius: 50%;
    animation: drift 12s infinite alternate ease-in-out;
}

.blob-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--primary-color), var(--secondary-color));
    top: -150px;
    left: -150px;
    opacity: 0.4;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #7928ca, var(--primary-color));
    bottom: -100px;
    right: -100px;
    opacity: 0.3;
    animation-delay: -6s;
    animation-duration: 15s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(6dvw, 6dvh) scale(1.1); }
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    perspective: 1000px;
    z-index: 1;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 48px 40px;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-speed);
}

.form-wrapper {
    width: 100%;
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.form-wrapper.hidden {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 48px;
    left: 40px;
    right: 40px;
    visibility: hidden;
}

.form-header {
    text-align: center;
    margin-bottom: 35px;
}

.form-header h2 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(to right, #ffffff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
}

.input-group {
    position: relative;
    margin-bottom: 24px;
}

.input-group input {
    width: 100%;
    padding: 16px;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 400;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    background: var(--input-focus);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 210, 255, 0.1);
}

.input-group label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 1rem;
    z-index: 10;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: -10px;
    left: 12px;
    font-size: 0.8rem;
    color: var(--primary-color);
    background: rgba(10, 15, 25, 0.85);
    backdrop-filter: blur(4px);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.forgot-password {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-color);
}

.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: 0 10px 25px -10px rgba(0, 210, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -10px rgba(0, 210, 255, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.switch-form {
    text-align: center;
    margin-top: 28px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    padding: 0 0 0 5px;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Animations for form switching */
@keyframes slideInRight {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

.animate-in-right {
    animation: slideInRight 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-in-left {
    animation: slideInLeft 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-out {
    animation: fadeOut 0.4s ease forwards;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .glass-panel {
        padding: 40px 24px;
        border-radius: 20px;
    }
    
    .form-wrapper.hidden {
        top: 40px;
        left: 24px;
        right: 24px;
    }

    .form-header h2 {
        font-size: 1.8rem;
    }
}
