/*
 * Stylesheet for Authentication Pages (Login, Register, etc.)
 * AlphaAITrading
 * Version: 1.1
 */

/* ==== 1. IMPORTS & VARIABLES ==== */
/* Inherit variables from the main stylesheet for consistency */
:root {
    --primary-color: #4A90E2;
    --primary-hover: #357ABD;
    --secondary-color: #F5F7FA;
    --text-primary: #333;
    --text-secondary: #667;
    --border-color: #EAECEF;
    --white-color: #FFFFFF;
    --success-color: #28A745;
    --danger-color: #DC3545;
    --shadow-md: 0 4px 10px rgba(0,0,0,0.08);
    --border-radius: 8px;
    --font-family: 'Inter', sans-serif;
    --transition-speed: 0.3s;
}

/* ==== 2. AUTH PAGE WRAPPER & CONTAINER ==== */
.auth-page-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--secondary-color);
    padding: 20px;
    font-family: var(--font-family);
}

.auth-container {
    display: flex;
    width: 100%;
    max-width: 960px;
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* ==== 3. BRAND & FORM PANELS ==== */
.auth-brand-panel, .auth-form-panel {
    width: 50%;
    padding: 50px;
}

/* ---- 3.1 Brand Panel (Left) - UPDATED ---- */
.auth-brand-panel {
    background: linear-gradient(135deg, #1a237e, #283593, #3949ab, #3f51b5);
    background-size: 400% 400%;
    color: var(--white-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    animation: moveGradient 15s ease infinite;
}

.auth-brand-content {
    position: relative;
    z-index: 2;
}

.brand-logo, .brand-title, .brand-subtitle {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.brand-title {
    animation-delay: 0.2s;
}

.brand-subtitle {
    animation-delay: 0.4s;
}

.auth-brand-panel::before,
.auth-brand-panel::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
    animation: float 20s infinite linear;
}

.auth-brand-panel::before {
    width: 400px;
    height: 400px;
    bottom: -200px;
    left: -150px;
}

.auth-brand-panel::after {
    width: 250px;
    height: 250px;
    top: -100px;
    right: -120px;
    animation-delay: -10s;
}


.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--white-color);
    margin-bottom: 40px;
}
.brand-logo img {
    height: 40px;
    margin-right: 15px;
}
.brand-logo span {
    font-size: 1.5rem;
    font-weight: 700;
}

.brand-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
}

.brand-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ---- 3.2 Form Panel (Right) ---- */
.auth-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form-panel h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.auth-form-panel .text-muted {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* ==== 4. FORM ELEMENTS & ALERTS ==== */
.auth-form .form-group {
    margin-bottom: 20px;
}
.auth-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.input-group {
    position: relative;
}
.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}
.form-control {
    width: 100%;
    padding: 12px 15px 12px 45px; /* Left padding for icon */
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color var(--transition-speed) ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.form-options {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 25px;
}
.forgot-link {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.form-actions .btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.or-divider {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    position: relative;
}
.or-divider span {
    background-color: var(--white-color);
    padding: 0 10px;
    position: relative;
    z-index: 1;
}
.or-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
    z-index: 0;
}

.auth-footer-link {
    text-align: center;
    margin-top: 30px;
    color: var(--text-secondary);
}
.auth-footer-link a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
}
.alert i {
    margin-right: 10px;
    font-size: 1.2rem;
}
.alert-danger {
    background-color: #F8D7DA;
    border-color: #F5C6CB;
    color: #721C24;
}
.alert-success {
    background-color: #D4EDDA;
    border-color: #C3E6CB;
    color: #155724;
}

/* ==== 5. RESPONSIVE DESIGN ==== */
@media (max-width: 992px) {
    .auth-brand-panel {
        display: none; /* Hide the brand panel on tablets and mobile */
    }
    .auth-form-panel {
        width: 100%;
    }
    .auth-container {
        max-width: 480px;
    }
}

@media (max-width: 576px) {
    .auth-page-wrapper {
        padding: 0;
        background-color: var(--white-color);
    }
    .auth-container {
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
    }
    .auth-form-panel {
        padding: 30px;
    }
}

/* ==== 6. KEYFRAME ANIMATIONS - NEW ==== */
@keyframes moveGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
    100% { transform: translateY(0px) rotate(360deg); }
}
