/* ========================================
   Authentication Pages Styles
   Login & Register Pages
   ======================================== */

:root {
    --auth-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --auth-bg-alt: linear-gradient(135deg, #255ce0 0%, #397ff4 100%);
}

body.auth-page {
    font-family: 'Prompt', 'Kanit', sans-serif;
    background: var(--auth-bg-alt);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
    position: relative;
    overflow: hidden;
}

/* Animated Background */
body.auth-page::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px, 100px 100px;
    background-position: 0 0, 25px 25px;
    animation: backgroundMove 20s linear infinite;
    z-index: 0;
}

@keyframes backgroundMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    padding: 3rem 2.5rem;
    animation: slideUp 0.6s ease-out;
}

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

/* Logo Section */
.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

.auth-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #255ce0 0%, #397ff4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 0;
}

/* Form Styles */
.auth-form {
    margin-bottom: 1.5rem;
}

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

.form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #255ce0;
    box-shadow: 0 0 0 4px rgba(37, 92, 224, 0.1);
}

.form-control::placeholder {
    color: #9ca3af;
}

/* Password Input with Toggle */
.password-input-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: #255ce0;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.75rem;
}

.strength-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-progress {
    height: 100%;
    width: 0;
    transition: all 0.3s;
    border-radius: 2px;
}

.strength-progress.strength-weak {
    background: #397ff4;
}

.strength-progress.strength-medium {
    background: #2d74e0;
}

.strength-progress.strength-strong {
    background: #255ce0;
}

.strength-text {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Password Requirements */
.password-requirements {
    padding: 1rem;
    background: #f9fafb;
    border-radius: 10px;
    margin-top: 1rem;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.requirement:last-child {
    margin-bottom: 0;
}

.requirement i {
    font-size: 1rem;
}

.requirement.requirement-met {
    color: #255ce0;
}

.requirement.requirement-met i {
    color: #255ce0;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #255ce0 0%, #397ff4 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-submit::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;
}

.btn-submit:hover::before {
    width: 300px;
    height: 300px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 92, 224, 0.3);
}

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

.btn-submit i {
    margin-right: 0.5rem;
}

/* Alert Messages */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease-out;
}

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

.alert-success {
    background: #dbeafe;
    color: #1e3a8a;
    border-left: 4px solid #255ce0;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #255ce0;
}

.alert i {
    font-size: 1.25rem;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #9ca3af;
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.divider span {
    padding: 0 1rem;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9375rem;
}

.auth-link a {
    color: #255ce0;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.auth-link a:hover {
    color: #397ff4;
    text-decoration: underline;
}

/* Back Link */
.back-link {
    text-align: center;
    margin-top: 1.5rem;
}

.back-link a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.back-link a:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-5px);
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 576px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-logo img {
        max-width: 160px;
    }
}

/* Dark Mode Support */
body.auth-page.dark-mode .auth-card {
    background: rgba(26, 31, 46, 0.95);
}

body.auth-page.dark-mode .auth-subtitle,
body.auth-page.dark-mode .auth-link {
    color: #9ca3af;
}

body.auth-page.dark-mode .form-label {
    color: #e5e7eb;
}

body.auth-page.dark-mode .form-control {
    background: #1e2330;
    border-color: #3a4155;
    color: #e5e7eb;
}

body.auth-page.dark-mode .form-control:focus {
    border-color: #397ff4;
    box-shadow: 0 0 0 4px rgba(57, 127, 244, 0.1);
}

body.auth-page.dark-mode .password-requirements {
    background: #1e2330;
}

body.auth-page.dark-mode .requirement {
    color: #9ca3af;
}

