/* SHIOL+ Authentication Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-red: #DC2626;
    --primary-red-dark: #B91C1C;
    --primary-blue: #2563EB;
    --success-green: #10B981;
    --error-red: #EF4444;
    --warning-yellow: #F59E0B;
    
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* Background Animation */
.animate-blob {
    animation: blob 7s infinite;
}

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

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

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

/* Login Container Animation */
.bg-white {
    animation: slideInUp 0.6s ease-out;
}

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

/* Form Input Styling */
input[type="text"],
input[type="password"] {
    transition: all 0.3s ease;
    background-color: white;
}

input[type="text"]:focus,
input[type="password"]:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
    border-color: var(--primary-red);
}

input[type="text"]:hover,
input[type="password"]:hover {
    border-color: var(--gray-400);
}

/* Password Toggle Button */
#toggle-password {
    transition: all 0.2s ease;
}

#toggle-password:hover {
    transform: scale(1.1);
}

/* Submit Button Styling */
#login-submit {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#login-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.2);
}

#login-submit:active:not(:disabled) {
    transform: translateY(0);
}

#login-submit:disabled {
    background-color: var(--gray-400);
    cursor: not-allowed;
}

/* Button Ripple Effect */
#login-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;
}

#login-submit:active::before {
    width: 300px;
    height: 300px;
}

/* Checkbox Styling */
input[type="checkbox"] {
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
}

input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Error and Success Messages */
#login-error,
#login-success {
    animation: slideInDown 0.3s ease-out;
}

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

#login-error {
    border-left: 4px solid var(--error-red);
}

#login-success {
    border-left: 4px solid var(--success-green);
}

/* Loading Spinner */
.fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* Link Styling */
a {
    transition: color 0.2s ease;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Icon Styling */
.fas {
    transition: all 0.2s ease;
}

/* Header Icon Animation */
.bg-red-600.rounded-full {
    animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }
}

/* Form Labels */
label {
    transition: color 0.2s ease;
}

/* Focus States for Accessibility */
button:focus,
input:focus,
a:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .max-w-md {
        max-width: calc(100vw - 2rem);
    }
    
    .p-8 {
        padding: 1.5rem;
    }
    
    .text-2xl {
        font-size: 1.5rem;
    }
    
    .w-16.h-16 {
        width: 3rem;
        height: 3rem;
    }
    
    .text-2xl .fas {
        font-size: 1.25rem;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    input[type="text"],
    input[type="password"] {
        border-width: 2px;
    }
    
    #login-submit {
        border: 2px solid var(--primary-red-dark);
    }
    
    #login-error,
    #login-success {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .animate-blob,
    .bg-white,
    #login-error,
    #login-success,
    .bg-red-600.rounded-full {
        animation: none;
    }
    
    input[type="text"],
    input[type="password"],
    #login-submit,
    #toggle-password,
    input[type="checkbox"],
    a,
    .fas,
    label {
        transition: none;
    }
    
    .fa-spinner {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .fixed,
    .animate-blob,
    .animation-delay-2000,
    .animation-delay-4000 {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .bg-gradient-to-br {
        background: white;
    }
}

/* Dark Mode Support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Currently not implemented, but structure ready for dark mode */
}

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

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Selection Styling */
::selection {
    background-color: rgba(220, 38, 38, 0.2);
    color: inherit;
}

::-moz-selection {
    background-color: rgba(220, 38, 38, 0.2);
    color: inherit;
}

/* Form Validation States */
input:invalid {
    border-color: var(--error-red);
}

input:valid {
    border-color: var(--success-green);
}

/* Placeholder Styling */
input::placeholder {
    color: var(--gray-400);
    opacity: 1;
}

input:focus::placeholder {
    opacity: 0.5;
}

/* Additional Utility Classes */
.transition-colors {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.transition-transform {
    transition: transform 0.2s ease;
}

.transition-shadow {
    transition: box-shadow 0.2s ease;
}

/* Loading State Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
}

/* Success Checkmark Animation */
.success-checkmark {
    animation: checkmark 0.6s ease-in-out;
}

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

/* Error Shake Animation */
.error-shake {
    animation: shake 0.5s ease-in-out;
}

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