/**
 * Login/Register Animation Styles
 * Diagonal split background with slide animations
 */

/* Base container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #1f1235;
}

/* Diagonal background animation */
.auth-background {
    position: absolute;
    width: 200%;
    height: 100%;
    top: 0;
    left: -50%;
    background: linear-gradient(135deg,
            #1f1235 0%,
            #1f1235 45%,
            #d2691e 45%,
            #d2691e 55%,
            #ff7f50 55%,
            #ff7f50 100%);
    transform: translateX(0);
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Form boxes */
.auth-box {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 500px;
    display: flex;
    background: transparent;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Left panel (Welcome message) */
.auth-panel-left,
.auth-panel-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    position: relative;
    transition: all 0.7s ease;
}

.auth-panel-left {
    background: rgba(210, 105, 30, 0.9);
    color: #FFFFFF;
}

.auth-panel-right {
    background: rgba(31, 18, 53, 0.95);
    color: #FFFFFF;
}

/* Welcome text */
.auth-welcome h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.auth-welcome p {
    font-size: var(--text-lg);
    opacity: 0.9;
    text-align: center;
    max-width: 300px;
}

/* Form container */
.auth-form-container {
    widthml: 100%;
    max-width: 400px;
    transform: translateX(0);
    opacity: 1;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-form-container.hidden {
    transform: translateX(120px);
    opacity: 0;
    pointer-events: none;
}

/* Form animation */
@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.auth-form-container.animate-in {
    animation: slideInRight 0.7s ease;
}

/* Form elements */
.auth-form h3 {
    color: #FFFFFF;
    font-size: var(--text-2xl);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.auth-input-group {
    margin-bottom: var(--spacing-md);
}

.auth-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: #FFFFFF;
    font-size: var(--text-base);
    transition: all 0.3s ease;
}

.auth-input:focus {
    outline: none;
    border-color: var(--aurora-primary);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.3);
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Submit button with gradient */
.auth-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #d2691e 0%, #ff7f50 100%);
    border: none;
    border-radius: var(--radius-md);
    color: #FFFFFF;
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: var(--spacing-md);
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(210, 105, 30, 0.4);
}

.auth-submit:active {
    transform: translateY(0);
}

/* Toggle link */
.auth-toggle {
    text-align: center;
    margin-top: var(--spacing-md);
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
}

.auth-toggle a {
    color: var(--aurora-primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-toggle a:hover {
    color: var(--aurora-primary);
    text-decoration: underline;
}

/* Register mode - flip panels */
.auth-box.register-mode .auth-panel-left {
    order: 2;
}

.auth-box.register-mode .auth-panel-right {
    order: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-box {
        flex-direction: column;
        height: auto;
        max-width: 400px;
    }

    .auth-panel-left,
    .auth-panel-right {
        min-height: 200px;
    }

    .auth-welcome h2 {
        font-size: 2rem;
    }
}

/* Flash and shake for submit button */
@keyframes submitFlash {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

@keyframes submitShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.auth-submit.loading {
    animation: submitFlash 1s ease infinite;
    pointer-events: none;
}

.auth-submit.error {
    animation: submitShake 0.4s ease;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}