/* Custom Authentication Styles */
/* Uses CSS variables defined in style.css */

/* Typography - Font Families */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.heading-font {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
}

.gradient-text {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
}

/* Blob Animation for Background */
@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Form Animations */
.auth-form {
    animation: slideUp 0.5s ease-out;
}

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

/* Input Focus Effects */
input:focus {
    transform: translateY(-2px);
}

/* Button Ripple Effect */
button {
    position: relative;
    overflow: hidden;
}

button::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;
}

button:active::after {
    width: 300px;
    height: 300px;
}

/* Custom Checkbox Styling */
input[type="checkbox"]:checked {
    background-color: var(--accent-purple);
    border-color: var(--accent-purple);
}

/* Password Strength Indicator */
.password-weak {
    background: linear-gradient(to right, var(--error) 0%, var(--error) 33%, transparent 33%);
}

.password-medium {
    background: linear-gradient(to right, var(--warning) 0%, var(--warning) 66%, transparent 66%);
}

.password-strong {
    background: linear-gradient(to right, var(--success) 0%, var(--success) 100%);
}

/* Glassmorphism Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Smooth Transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

/* Loading Spinner (for future use) */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--accent-purple), var(--accent-pink));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--accent-purple-dark), #db2777);
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .auth-form {
        padding: 1.5rem;
    }
}

/* Mobile-First Responsive Design */
@media (max-width: 640px) {
    /* Ensure proper spacing on mobile */
    body {
        overflow-x: hidden;
    }
    
    /* Mobile form container adjustments */
    .max-w-md {
        max-width: 100%;
        margin: 0 auto;
    }
    
    /* Mobile input adjustments */
    input[type="email"], 
    input[type="password"] {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
    }
    
    /* Mobile button adjustments */
    button {
        min-height: 44px; /* Touch-friendly minimum size */
        font-size: 16px;
    }
    
    /* Mobile checkbox adjustments */
    input[type="checkbox"] {
        min-width: 18px;
        min-height: 18px;
    }
    
    /* Mobile link adjustments */
    a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* Small mobile devices (320px - 480px) */
@media (max-width: 480px) {
    /* Reduce padding further for very small screens */
    .max-w-md {
        padding: 0.5rem;
    }
    
    /* Adjust background blob sizes for small screens */
    .animate-blob {
        width: 200px !important;
        height: 200px !important;
    }
    
    /* Smaller logo on very small screens */
    img[alt="Pagemora Logo"] {
        height: 2rem !important;
    }
    
    /* Adjust heading sizes */
    h1 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    /* Reduce vertical spacing in landscape */
    .min-h-screen {
        min-height: auto;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    /* Adjust form spacing */
    .space-y-4 > * + * {
        margin-top: 1rem;
    }
    
    /* Smaller margins */
    .mb-6 {
        margin-bottom: 1rem;
    }
    
    .my-4 {
        margin-top: 0.75rem;
        margin-bottom: 0.75rem;
    }
}

/* Register Page Specific Mobile Styles */
@media (max-width: 640px) {
    /* Terms and conditions mobile styling */
    .flex.items-start.space-x-3 {
        gap: 0.75rem;
    }
    
    /* Better spacing for form elements on register page */
    .space-y-4 > * + * {
        margin-top: 1rem;
    }
    
    /* Password requirements text */
    .text-xs.text-gray-500 {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    
    /* Error message styling for mobile */
    .mt-2.text-sm.text-red-400 {
        font-size: 0.875rem;
        line-height: 1.4;
    }
    
    /* Terms checkbox mobile optimization */
    input[type="checkbox"] + label {
        line-height: 1.5;
        word-wrap: break-word;
    }
}

/* Very small screens for register page */
@media (max-width: 480px) {
    /* Compact form spacing */
    .space-y-4 > * + * {
        margin-top: 0.875rem;
    }
    
    /* Tighter spacing for form elements */
    input[type="text"], 
    input[type="email"], 
    input[type="password"] {
        padding-top: 0.625rem !important;
        padding-bottom: 0.625rem !important;
    }
}

/* Forgot Password Page Specific Styles */
@media (max-width: 640px) {
    /* Help text styling for mobile */
    .bg-blue-500\/10 {
        padding: 0.75rem;
        margin-top: 0.75rem;
    }
    
    /* Navigation links mobile spacing */
    .text-center.space-y-3 > * + * {
        margin-top: 0.75rem;
    }
    
    /* Info icon sizing for mobile */
    .fa-info-circle {
        font-size: 0.875rem;
    }
}

/* Very small screens for forgot password */
@media (max-width: 480px) {
    /* Compact help text */
    .bg-blue-500\/10 {
        padding: 0.625rem;
        margin-top: 0.625rem;
    }
    
    /* Tighter navigation spacing */
    .text-center.space-y-3 > * + * {
        margin-top: 0.625rem;
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Slide Down Animation for Alerts */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-down {
    animation: slideDown 0.3s ease-out;
}

/* Shake Animation for Error Alerts */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/* Pulse Animation for Icons */
@keyframes pulse-icon {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

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

