/* auth.css - Authentication Pages Styling */

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, 
        var(--color-primary-50) 0%, 
        var(--color-primary-100) 100%
    );
}

/* Auth Box */
.auth-box {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    margin-top: 3rem;
    border: 1px solid var(--color-border);
}

.auth-box h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--color-text-primary);
    font-weight: 700;
}

.auth-box h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--color-text-primary);
    font-weight: 600;
}

.auth-box p {
    text-align: center;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Auth Form Groups */
.auth-box .form-group {
    margin-bottom: 1.5rem;
}

.auth-box .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text-primary);
    font-size: 1rem;
}

.auth-box .form-group input,
.auth-box .form-group textarea,
.auth-box .form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--color-text-primary);
}

.auth-box .form-group input:focus,
.auth-box .form-group textarea:focus,
.auth-box .form-group select:focus {
    outline: none;
    border-color: var(--color-primary-500);
    box-shadow: 0 0 0 3px var(--color-primary-100);
}

.auth-box .form-group input::placeholder {
    color: var(--color-text-tertiary);
}

/* Auth Button */
.auth-button {
    width: 100%;
    padding: 0.75rem;
    background: var(--color-primary-600);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-button:hover {
    background: var(--color-primary-700);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-button:disabled {
    background: var(--color-gray-300);
    cursor: not-allowed;
    transform: none;
}

.auth-button i {
    font-size: 1.1rem;
}

/* Auth Links */
.auth-links {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
}

.auth-links a {
    color: var(--color-primary-600);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: var(--color-primary-700);
}

/* Terms */
.terms {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    text-align: center;
    line-height: 1.5;
}

.terms a {
    color: var(--color-primary-600);
    text-decoration: none;
}



/* Message Boxes */
.message {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    text-align: center;
    display: none;
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

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

.message.error {
    background: var(--color-error-50);
    color: var(--color-error-700);
    border: 1px solid var(--color-error-200);
}

.message.success {
    background: var(--color-success-50);
    color: var(--color-success-700);
    border: 1px solid var(--color-success-200);
}

.message.info {
    background: var(--color-primary-50);
    color: var(--color-primary-700);
    border: 1px solid var(--color-primary-200);
}

/* Google Sign-In Container */
.google-signin-container {
    margin-top: 20px;
    text-align: center;
    border-top: 1px solid var(--color-border);
    padding-top: 20px;
}

.google-signin-container p {
    margin-bottom: 10px;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.g_id_signin {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

/* Divider with "OR" text */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--color-text-tertiary);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--color-border);
}

.auth-divider span {
    padding: 0 1rem;
    font-weight: 500;
}

/* Loading State */
.auth-button.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.auth-button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Verify Email Success State */
.verify-success {
    text-align: center;
    padding: 2rem;
}

.verify-success i {
    font-size: 4rem;
    color: var(--color-success-500);
    margin-bottom: 1rem;
    display: block;
}

.verify-success h2 {
    color: var(--color-success-700);
    margin-bottom: 0.5rem;
}

/* Sign Out Page */
.signout-container {
    text-align: center;
}

.signout-container i {
    font-size: 3rem;
    color: var(--color-primary-600);
    margin-bottom: 1rem;
    display: block;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.password-strength-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--color-gray-200);
    overflow: hidden;
    margin-top: 0.5rem;
}

.password-strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-fill.weak {
    width: 33%;
    background: var(--color-error-500);
}

.password-strength-fill.medium {
    width: 66%;
    background: var(--color-warning-500);
}

.password-strength-fill.strong {
    width: 100%;
    background: var(--color-success-500);
}

.password-strength-text {
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

.password-strength-text.weak {
    color: var(--color-error-600);
}

.password-strength-text.medium {
    color: var(--color-warning-600);
}

.password-strength-text.strong {
    color: var(--color-success-600);
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-box {
        padding: 2rem 1.5rem;
        margin-top: 2rem;
    }

    .auth-box h1 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .auth-box {
        padding: 1.5rem 1rem;
    }

    .auth-box h1 {
        font-size: 1.125rem;
    }

    .auth-button {
        padding: 0.625rem;
        font-size: 0.9rem;
    }
}

/* Focus visible for accessibility */
.auth-box input:focus-visible,
.auth-box button:focus-visible,
.auth-links a:focus-visible {
    outline: 2px solid var(--color-primary-500);
    outline-offset: 2px;
}

/* ==================== ADDITIONAL AUTH PAGE ENHANCEMENTS ==================== */

/* Auth Header Styling */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.auth-icon i {
    font-size: 2rem;
    color: var(--primary-600);
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: var(--font-bold);
    color: var(--neutral-900);
    margin-bottom: 0.5rem;
}

.auth-header p {
    font-size: 1rem;
    color: var(--neutral-600);
    margin-bottom: 0;
}

/* Auth Form Styling */
.auth-form {
    margin-top: 1.5rem;
}

/* Enhanced Input Group for Icons */
.input-group {
    display: flex;
    width: 100%;
    align-items: stretch;
}

.input-group-text {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--neutral-50);
    border: 1px solid var(--neutral-300);
    border-right: none;
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
    color: var(--neutral-500);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.input-group .form-control {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    flex: 1;
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary-500);
    color: var(--primary-600);
    background: var(--primary-50);
}

/* Auth Footer Styling */
.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--neutral-200);
}

/* Security Notice */
.auth-security-notice {
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--neutral-600);
}

.auth-security-notice i {
    color: var(--success-500);
    font-size: 1rem;
}

/* Google Sign-In Wrapper */
.google-signin-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.g_id_signin {
    width: 100% !important;
    max-width: 320px !important;
    margin: 0 auto !important;
}

/* Enhanced Glass Effect for Auth Box */
.auth-box {
    background: var(--glass-bg-dark);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Smooth Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-container {
    animation: fadeInUp 0.6s ease-out;
}

.auth-box {
    animation: fadeInUp 0.8s ease-out;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

/* Enhanced Focus States */
.auth-form .form-control:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.auth-form .form-control:focus + .input-group-text {
    border-color: var(--primary-500);
}

/* Button Hover Effects */
.auth-button {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.auth-button:active {
    transform: translateY(0);
}

/* Responsive Adjustments for Auth Pages */
@media (max-width: 576px) {
    .auth-icon {
        width: 56px;
        height: 56px;
    }
    
    .auth-icon i {
        font-size: 1.75rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .auth-header p {
        font-size: 0.875rem;
    }
    
    .auth-security-notice {
        font-size: 0.7rem;
        padding: 0.5rem 0.75rem;
    }
}

/* ==================== FORGOT PASSWORD PAGE ENHANCEMENTS ==================== */

/* Warning/Key Icon Styling */
.auth-icon-warning {
    background: linear-gradient(135deg, var(--warning-50) 0%, var(--warning-100) 100%);
    border-color: var(--warning-200);
}

.auth-icon-warning i {
    color: var(--warning-600);
}

/* Help Box Styling */
.auth-help-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--info-200);
    border-left: 4px solid var(--info-500);
    border-radius: var(--radius-md);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.auth-help-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--info-100);
    border-radius: 50%;
    color: var(--info-600);
    font-size: 1.125rem;
}

.auth-help-content {
    flex: 1;
}

.auth-help-content h3 {
    font-size: 0.875rem;
    font-weight: var(--font-semibold);
    color: var(--neutral-900);
    margin-bottom: 0.25rem;
}

.auth-help-content p {
    font-size: 0.75rem;
    color: var(--neutral-600);
    line-height: 1.5;
    margin: 0;
}

/* Enhanced Form Text Styling */
.form-text {
    display: block;
    margin-top: var(--space-xs);
    font-size: 0.75rem;
    color: var(--neutral-500);
    line-height: 1.4;
}

/* Success Message with Icon */
.message.success {
    background: var(--success-50);
    color: var(--success-700);
    border: 1px solid var(--success-200);
    border-left: 4px solid var(--success-500);
}

.message.success i {
    color: var(--success-600);
}

/* Back Arrow Styling in Links */
.auth-links p i.bi-arrow-left {
    font-size: 0.875rem;
    margin-right: 0.25rem;
    color: var(--neutral-500);
    transition: transform var(--transition-fast);
}

.auth-links p a:hover ~ i.bi-arrow-left,
.auth-links p:hover i.bi-arrow-left {
    transform: translateX(-2px);
}

/* Enhanced Button States for Forgot Password */
.auth-button:disabled {
    background: var(--neutral-300);
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

.auth-button:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Responsive Adjustments for Help Box */
@media (max-width: 576px) {
    .auth-help-box {
        flex-direction: column;
        padding: 0.875rem;
    }
    
    .auth-help-icon {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
    
    .auth-help-content h3 {
        font-size: 0.8125rem;
    }
    
    .auth-help-content p {
        font-size: 0.6875rem;
    }
}

/* Pulse Animation for Key Icon */
@keyframes pulseKey {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.auth-icon-warning i {
    animation: pulseKey 2s ease-in-out infinite;
}

/* Enhanced Focus State for Email Input on Forgot Password */
.auth-form #email:focus {
    border-color: var(--warning-500);
    box-shadow: 0 0 0 3px var(--warning-100);
}

.auth-form #email:focus ~ .input-group-text {
    border-color: var(--warning-500);
    background: var(--warning-50);
    color: var(--warning-600);
}


/* ==================== SIGN UP PAGE ENHANCEMENTS ==================== */

/* Success Icon Styling */
.auth-icon-success {
    background: linear-gradient(135deg, var(--success-50) 0%, var(--success-100) 100%);
    border-color: var(--success-200);
}

.auth-icon-success i {
    color: var(--success-600);
}

/* Terms and Privacy Styling */
.auth-terms {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    text-align: center;
}

.auth-terms p {
    font-size: 0.75rem;
    color: var(--neutral-600);
    line-height: 1.6;
    margin: 0;
}

.auth-terms a {
    color: var(--primary-600);
    font-weight: var(--font-semibold);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.auth-terms a:hover {
    color: var(--primary-700);
}

/* Password Strength Indicator (if not already in auth.css) */
.password-strength {
    margin-top: 0.5rem;
}

.password-strength-bar {
    height: 4px;
    background: var(--neutral-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.password-strength-fill {
    height: 100%;
    transition: all var(--transition-base);
    border-radius: var(--radius-sm);
}

.password-strength-fill.weak {
    width: 33%;
    background: var(--error-500);
}

.password-strength-fill.medium {
    width: 66%;
    background: var(--warning-500);
}

.password-strength-fill.strong {
    width: 100%;
    background: var(--success-500);
}

.password-strength-text {
    font-size: 0.75rem;
    font-weight: var(--font-medium);
}

.password-strength-text.weak {
    color: var(--error-600);
}

.password-strength-text.medium {
    color: var(--warning-600);
}

.password-strength-text.strong {
    color: var(--success-600);
}

/* Enhanced Success Message Animation */
.message.success {
    animation: slideInSuccess 0.4s ease-out;
}

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

/* Sign Up Button Hover Enhancement */
.auth-form button[type="submit"]:hover {
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.2);
}

/* Responsive Adjustments for Sign Up */
@media (max-width: 576px) {
    .auth-terms {
        padding: 0.75rem;
    }
    
    .auth-terms p {
        font-size: 0.6875rem;
    }
}



/* Add to auth.css after existing styles */

/* ==================== ENHANCED MESSAGE STYLES ==================== */
.message {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: none;
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    border-left: 4px solid transparent;
}

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

.message.error {
    background: var(--error-50);
    color: var(--error-700);
    border-color: var(--error-500);
}

.message.success {
    background: var(--success-50);
    color: var(--success-700);
    border-color: var(--success-500);
}

.message.info {
    background: var(--primary-50);
    color: var(--primary-700);
    border-color: var(--primary-500);
}

.message i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

/* ==================== GOOGLE SIGN-IN ENHANCED ==================== */
.google-signin-container {
    margin-top: 20px;
    text-align: center;
    border-top: 1px solid var(--neutral-200);
    padding-top: 20px;
}

.google-signin-container p {
    margin-bottom: 15px;
    color: var(--neutral-600);
    font-size: 0.875rem;
    font-weight: 500;
}

.g_id_signin {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

/* Google button hover effect */
.g_id_signin iframe {
    transition: transform var(--transition-fast);
}

.g_id_signin:hover iframe {
    transform: translateY(-1px);
}

/* ==================== AUTH DIVIDER ENHANCED ==================== */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--neutral-500);
    font-size: 0.875rem;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--neutral-300);
}

.auth-divider span {
    padding: 0 1rem;
    background: white;
}

/* ==================== FORM ENHANCEMENTS ==================== */
.auth-box .form-control:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.auth-box .form-control::placeholder {
    color: var(--neutral-400);
    font-size: 0.875rem;
}

/* ==================== AUTH BUTTON ENHANCEMENTS ==================== */
.auth-button {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary-600);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.auth-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.auth-button:hover::before {
    width: 300px;
    height: 300px;
}

.auth-button:hover {
    background: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.auth-button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.auth-button:disabled {
    background: var(--neutral-400);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-button i {
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.auth-button span {
    position: relative;
    z-index: 1;
}

/* ==================== AUTH LINKS ENHANCEMENTS ==================== */
.auth-links {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

.auth-links p {
    margin: 0.5rem 0;
    color: var(--neutral-600);
}

.auth-links a {
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
    position: relative;
}

.auth-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-600);
    transition: width var(--transition-fast);
}

.auth-links a:hover::after {
    width: 100%;
}

.auth-links a:hover {
    color: var(--primary-700);
}

/* ==================== RESPONSIVE IMPROVEMENTS ==================== */
@media (max-width: 768px) {
    .auth-container {
        padding: 1.5rem 1rem;
    }

    .auth-box {
        padding: 2rem 1.5rem;
        margin-top: 2rem;
    }

    .auth-box h1 {
        font-size: 1.25rem;
    }

    .auth-button {
        padding: 0.75rem;
        font-size: 0.9375rem;
    }
}

@media (max-width: 480px) {
    .auth-box {
        padding: 1.5rem 1rem;
        margin-top: 1rem;
        border-radius: var(--radius-md);
    }

    .auth-box h1 {
        font-size: 1.125rem;
    }

    .message {
        padding: 0.75rem;
        font-size: 0.8125rem;
    }
}

/* ==================== LOADING STATE IMPROVEMENTS ==================== */
.auth-button.loading {
    pointer-events: none;
    opacity: 0.8;
}

.auth-button.loading .spinner-inline {
    display: inline-block;
}

/* ==================== ACCESSIBILITY IMPROVEMENTS ==================== */
.auth-box input:focus-visible,
.auth-button:focus-visible,
.auth-links a:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .auth-box {
        border: 2px solid var(--neutral-900);
    }
    
    .auth-button {
        border: 2px solid var(--primary-700);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .message,
    .auth-button::before,
    .auth-links a::after {
        animation: none;
        transition: none;
    }
}