/* Auth Pages CSS - Login, Register, Profile */

/* Full height layout for auth pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="%23ffffff" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.auth-page .container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    position: relative;
    z-index: 1;
}

.auth-page .auth-card {
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 15px;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
    transform: translateY(0);
}

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

.auth-page .auth-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 2rem 1.5rem 1.5rem;
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.auth-page .auth-card .card-header h4 {
    font-weight: 600;
    margin: 0;
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.3s;
    animation-fill-mode: both;
}

.auth-page .auth-card .card-header p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.auth-page .auth-card .card-body {
    padding: 2rem 1.5rem;
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.3s;
    animation-fill-mode: both;
}

.auth-page .auth-card .card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 1.5rem;
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.6s;
    animation-fill-mode: both;
}

/* Form styling */
.auth-page .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.auth-page .form-control:nth-child(1) { animation-delay: 0.1s; }
.auth-page .form-control:nth-child(2) { animation-delay: 0.2s; }
.auth-page .form-control:nth-child(3) { animation-delay: 0.3s; }
.auth-page .form-control:nth-child(4) { animation-delay: 0.4s; }

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

.auth-page .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background-color: #fff;
}

.auth-page .form-control:hover {
    border-color: #667eea;
}

.auth-page .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.auth-page .form-label:nth-child(1) { animation-delay: 0.05s; }
.auth-page .form-label:nth-child(2) { animation-delay: 0.15s; }
.auth-page .form-label:nth-child(3) { animation-delay: 0.25s; }
.auth-page .form-label:nth-child(4) { animation-delay: 0.35s; }

.auth-page .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.5s;
    animation-fill-mode: both;
}

.auth-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.auth-page .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.auth-page .btn-primary:disabled {
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

/* Google login button styling */
.auth-page .btn-outline-danger {
    border: 2px solid #db4437;
    color: #db4437;
    background: transparent;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.7s;
    animation-fill-mode: both;
}

.auth-page .btn-outline-danger:hover {
    background: #db4437;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(219, 68, 55, 0.4);
    border-color: #db4437;
}

.auth-page .btn-outline-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(219, 68, 55, 0.3);
}

.auth-page .btn-outline-danger i {
    font-size: 1.1rem;
}

/* Divider styling */
.auth-page .text-muted {
    position: relative;
    padding: 0 20px;
    background: var(--card-bg, #fff);
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.6s;
    animation-fill-mode: both;
}

.auth-page .text-muted::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
    z-index: -1;
}

.auth-page .form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.auth-page .form-check-label {
    color: #6c757d;
    font-size: 0.9rem;
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.auth-page .form-check {
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

/* Link styling */
.auth-page .card-footer a {
    color: #667eea;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-page .card-footer a:hover {
    color: #764ba2;
}

.auth-page .card-footer p {
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.7s;
    animation-fill-mode: both;
}

/* Error styling */
.auth-page .is-invalid {
    border-color: #dc3545;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.auth-page .invalid-feedback {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    animation: fadeInUp 0.3s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .auth-page .container {
        padding: 1rem;
    }
    
    .auth-page .auth-card {
        max-width: 100%;
        margin: 0 1rem;
    }
    
    .auth-page .auth-card .card-header,
    .auth-page .auth-card .card-body,
    .auth-page .auth-card .card-footer {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 576px) {
    .auth-page .auth-card .card-header,
    .auth-page .auth-card .card-body,
    .auth-page .auth-card .card-footer {
        padding: 1rem;
    }
    
    .auth-page .auth-card {
        margin: 0 0.5rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .auth-page {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }
    
    .auth-page .auth-card {
        background-color: #2d3748;
        color: #e2e8f0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
    
    .auth-page .auth-card .card-footer {
        background-color: #1a202c;
        border-top-color: #4a5568;
    }
    
    .auth-page .form-control {
        background-color: #4a5568;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .auth-page .form-control:focus {
        background-color: #4a5568;
        border-color: #667eea;
        color: #e2e8f0;
    }
    
    .auth-page .form-control:hover {
        border-color: #667eea;
    }
    
    .auth-page .form-label {
        color: #e2e8f0;
    }
    
    .auth-page .form-check-label {
        color: #a0aec0;
    }
}
