/* ===========================
   GREEN SAVING - AUTH PAGES
   Custom Animations & Styles
   =========================== */

/* Smooth Page Transitions */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
}

/* Input Focus Animation */
input:focus,
textarea:focus,
select:focus {
    animation: pulse-green 1s ease-in-out;
}

/* Button Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    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-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Card Entrance Animation */
.auth-card-enter {
    animation: scaleIn 0.5s ease-out;
}

/* Floating Label Effect */
.floating-label {
    position: relative;
}

.floating-label input:focus ~ label,
.floating-label input:not(:placeholder-shown) ~ label {
    transform: translateY(-1.5rem) scale(0.85);
    color: rgb(34, 197, 94);
}

/* Custom Checkbox Styling */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: white;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.custom-checkbox:checked {
    background-color: rgb(34, 197, 94);
    border-color: rgb(34, 197, 94);
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
}

/* Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin-left: -0.5rem;
    margin-top: -0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Password Strength Indicator */
.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 0.5rem;
    transition: all 0.3s;
}

.password-strength.weak {
    width: 33%;
    background-color: #ef4444;
}

.password-strength.medium {
    width: 66%;
    background-color: #f59e0b;
}

.password-strength.strong {
    width: 100%;
    background-color: #22c55e;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .auth-card {
        padding: 1.5rem !important;
    }
    
    .auth-header h1 {
        font-size: 1.75rem !important;
    }
}

/* Glassmorphism Enhancement */
.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Icon Animation on Hover */
.icon-bounce:hover {
    animation: bounce 0.5s ease-in-out;
}

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