/* =============================================
   AUTH PAGE ANIMATIONS & STYLING
   ============================================= */

/* Background Elements */
.auth-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.floating-shape {
    animation: floating-slow 8s ease-in-out infinite;
}

.floating-shape.shape-1 {
    width: 120px;
    height: 120px;
    top: 20%;
    left: 5%;
    animation-delay: 0s;
}

.floating-shape.shape-2 {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.floating-shape.shape-3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 15%;
    border-radius: 20px;
    animation-delay: 4s;
}

.floating-dots {
    top: 30%;
    right: 20%;
    display: flex;
    gap: 10px;
}

.floating-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: floating-dots 3s ease-in-out infinite;
}

.floating-dots .dot:nth-child(2) {
    animation-delay: 0.5s;
}

.floating-dots .dot:nth-child(3) {
    animation-delay: 1s;
}

/* Welcome Section Animations */
.welcome-section {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.brain-container {
    position: relative;
    display: inline-block;
}

.brain-pulse {
    animation: brain-pulse 2s ease-in-out infinite;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 2px solid #ffc107;
    border-radius: 50%;
    opacity: 0;
    animation: pulse-ring 2s ease-out infinite;
}

.welcome-emoji {
    animation: bounce 2s ease-in-out infinite;
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInLeft 0.6s ease-out 0.2s forwards;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(30px);
    animation: slideInRight 0.6s ease-out 0.4s forwards;
}

/* Form Animations */
.login-form-container {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.form-group-animated {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.6s ease-out forwards;
}

.input-animated {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.input-animated:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.15);
}

.input-focus-glow {
    transition: all 0.3s ease;
    background: #f8f9fa !important;
}

.input-focus-glow:focus {
    background: #fff !important;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.3);
    transform: scale(1.02);
}

.icon-bounce {
    transition: all 0.3s ease;
}

.input-group:hover .icon-bounce {
    animation: iconBounce 0.6s ease;
}

/* Custom Checkbox */
.custom-checkbox {
    position: relative;
}

.custom-checkbox .form-check-input {
    opacity: 0;
    position: absolute;
}

.custom-checkbox .form-check-label {
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-checkbox .form-check-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    border: 2px solid #ffc107;
    border-radius: 4px;
    background: #fff;
    transition: all 0.3s ease;
}

.custom-checkbox .form-check-input:checked + .form-check-label::before {
    background: #ffc107;
    border-color: #ffc107;
    transform: scale(1.1);
}

.custom-checkbox .check-icon {
    position: absolute;
    left: 3px;
    top: 5px;
    font-size: 12px;
    color: #fff;
    opacity: 0;
    transition: all 0.3s ease;
}

.custom-checkbox .form-check-input:checked + .form-check-label .check-icon {
    opacity: 1;
    animation: checkBounce 0.4s ease;
}

/* Button Animations */
.btn-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
}

.btn-animated:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4);
}

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

.btn-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.btn-animated:hover .btn-shimmer {
    left: 100%;
}

.btn-hover-fill {
    position: relative;
    overflow: hidden;
    background: transparent !important;
    border: 2px solid #ffc107;
    color: #ffc107 !important;
    transition: all 0.3s ease;
}

.btn-hover-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #ffc107;
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-hover-fill:hover::before {
    left: 0;
}

.btn-hover-fill:hover {
    color: #000 !important;
    border-color: #ffc107;
}

.btn-hover-glow {
    transition: all 0.3s ease;
}

.btn-hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* Divider Styling */
.divider-section {
    position: relative;
    margin: 2rem 0;
}

.divider-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, #ffc107, transparent);
    position: relative;
}

.divider-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Right Section Animations */
.illustration-container {
    z-index: 2;
}

.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.float-icon {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.7;
    animation: floating-slow 6s ease-in-out infinite;
}

.float-icon-1 {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.float-icon-2 {
    top: 25%;
    right: 15%;
    animation-delay: 1.5s;
}

.float-icon-3 {
    bottom: 30%;
    left: 20%;
    animation-delay: 3s;
}

.float-icon-4 {
    bottom: 20%;
    right: 10%;
    animation-delay: 4.5s;
}

.brand-section {
    opacity: 0;
    animation: scaleIn 0.8s ease-out 0.5s forwards;
}

.brand-container {
    position: relative;
    display: inline-block;
}

.brand-text {
    position: relative;
    z-index: 2;
}

.brand-icon-rotate {
    animation: rotate-slow 10s linear infinite;
}

.brand-underline {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    height: 3px;
    width: 0;
    border-radius: 2px;
    animation: expandUnderline 1s ease-out 1s forwards;
}

.main-illustration {
    position: relative;
}

.illustration-circle {
    transition: all 0.3s ease;
    animation: float 4s ease-in-out infinite;
}

.illustration-image {
    transition: all 0.3s ease;
    animation: gentle-bounce 3s ease-in-out infinite;
}

.illustration-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    animation: glow-pulse 3s ease-in-out infinite;
}

.features-info {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.feature-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.hover-lift-sm:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 193, 7, 0.2);
}

/* Hover Effects */
.hover-underline {
    position: relative;
    transition: all 0.3s ease;
}

.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffc107;
    transition: width 0.3s ease;
}

.hover-underline:hover::after {
    width: 100%;
}

/* Keyframe Animations */
@keyframes floating-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes floating-dots {
    0%, 100% { transform: translateY(0px); opacity: 0.3; }
    50% { transform: translateY(-10px); opacity: 0.8; }
}

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

@keyframes slideInLeft {
    from { 
        opacity: 0; 
        transform: translateX(-30px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

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

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

@keyframes brain-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes pulse-ring {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    50% { opacity: 0.8; }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes checkBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes scaleIn {
    from { 
        opacity: 0; 
        transform: scale(0.8); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes expandUnderline {
    from { width: 0; }
    to { width: 100%; }
}

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

@keyframes gentle-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.8; }
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .floating-shape {
        display: none;
    }
    
    .floating-dots {
        display: none;
    }
    
    .float-icon {
        font-size: 1.2rem;
    }
    
    .illustration-circle {
        width: 250px !important;
        height: 250px !important;
    }
    
    .welcome-section {
        margin-bottom: 3rem;
    }
}

@media (max-width: 767.98px) {
    .main-illustration .illustration-circle {
        width: 200px !important;
        height: 200px !important;
    }
    
    .brand-section h2 {
        font-size: 1.5rem;
    }
    
    .welcome-section .welcome-emoji {
        font-size: 2rem;
    }
    
    .form-group-animated {
        margin-bottom: 1.5rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .input-focus-glow {
        background: #2d3748 !important;
    }
    
    .input-focus-glow:focus {
        background: #4a5568 !important;
    }
    
    .feature-card {
        background: rgba(255, 255, 255, 0.1) !important;
        border-color: rgba(255, 193, 7, 0.3);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .floating-shape,
    .floating-dots .dot,
    .brain-pulse,
    .pulse-ring,
    .welcome-emoji,
    .brand-icon-rotate,
    .illustration-circle,
    .illustration-image,
    .illustration-glow,
    .float-icon {
        animation: none;
    }
    
    .slide-in-left,
    .slide-in-right,
    .login-form-container,
    .form-group-animated,
    .brand-section,
    .features-info {
        opacity: 1;
        transform: none;
        animation: none;
    }
}
