/* Modern Auth Modal Styles */

/* Glass morphism effect */
.modal-content {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

/* Scrollable content areas */
.tab-content {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(147, 51, 234, 0.3) transparent;
}

.tab-content::-webkit-scrollbar {
    width: 6px;
}

.tab-content::-webkit-scrollbar-track {
    background: transparent;
}

.tab-content::-webkit-scrollbar-thumb {
    background: rgba(147, 51, 234, 0.3);
    border-radius: 3px;
}

.tab-content::-webkit-scrollbar-thumb:hover {
    background: rgba(147, 51, 234, 0.5);
}

/* Ensure submit button is always visible */
.tab-content form {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.tab-content form .space-y-5 {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tab-content button[type="submit"] {
    margin-top: auto;
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: linear-gradient(135deg, #9333ea, #ec4899);
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 1rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.3);
}

.tab-content button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.4);
}

/* Ensure proper spacing around submit button */
.tab-content form .space-y-5 > *:last-child {
    margin-bottom: 1rem;
}

/* Visual indicator for scrollable content */
.tab-content:has(.space-y-5) {
    position: relative;
}

.tab-content:has(.space-y-5)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.8));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-content:has(.space-y-5):hover::after {
    opacity: 1;
}

/* Animated background elements */
.modal-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.1) 0%, rgba(236, 72, 153, 0.1) 50%, rgba(59, 130, 246, 0.1) 100%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
    z-index: -1;
}

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

/* Floating animation for background circles */
.animate-pulse {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.3;
    }
    50% { 
        transform: translateY(-20px) rotate(180deg); 
        opacity: 0.6;
    }
}

/* Tab animations */
#activeTabBg {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.3);
}

/* Input field enhancements */
.modal-content input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content input:focus {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 25px -5px rgba(147, 51, 234, 0.2),
        0 0 0 1px rgba(147, 51, 234, 0.1);
    border-color: rgba(147, 51, 234, 0.3);
}

.modal-content input:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Button enhancements */
.modal-content button[type="submit"] {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.modal-content button[type="submit"]:hover::before {
    left: 100%;
}

.modal-content button[type="submit"]:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 20px 40px -10px rgba(147, 51, 234, 0.4),
        0 0 0 1px rgba(147, 51, 234, 0.1);
}

/* Error message animations */
.bg-red-50 {
    animation: slideInError 0.3s ease-out;
}

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

/* Icon animations */
.modal-content svg {
    transition: all 0.3s ease;
}

.modal-content input:focus + svg,
.modal-content input:focus ~ svg {
    color: #9333ea;
    transform: scale(1.1);
}

/* Checkbox styling */
.modal-content input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: white;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-content input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #9333ea, #ec4899);
    border-color: #9333ea;
    transform: scale(1.1);
}

.modal-content input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Link hover effects */
.modal-content a {
    position: relative;
    transition: all 0.3s ease;
}

.modal-content a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #9333ea, #ec4899);
    transition: width 0.3s ease;
}

.modal-content a:hover::after {
    width: 100%;
}

/* Close button enhancement */
#closeModalBtn {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#closeModalBtn:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Logo glow effect */
.modal-content img {
    filter: drop-shadow(0 0 20px rgba(147, 51, 234, 0.3));
    transition: all 0.3s ease;
}

.modal-content img:hover {
    filter: drop-shadow(0 0 30px rgba(147, 51, 234, 0.5));
    transform: scale(1.05);
}

/* Tab content transitions */
.tab-content {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    scroll-behavior: smooth;
}

.tab-content.active {
    animation: fadeInUp 0.4s ease-out;
}

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

/* Responsive design */
@media (max-width: 640px) {
    .modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        max-height: 95vh;
    }
    
    .modal-content input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Ensure submit button is visible on mobile */
    .tab-content button[type="submit"] {
        position: relative;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Reduce padding on mobile for more space */
    .tab-content {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-bottom: 1rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .modal-content {
        background: rgba(17, 24, 39, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .modal-content input {
        background: rgba(31, 41, 55, 0.8);
        color: white;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .modal-content input::placeholder {
        color: rgba(156, 163, 175, 0.7);
    }
}

/* Loading state for buttons */
.modal-content button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Success state animation */
.modal-content button[type="submit"].success {
    background: linear-gradient(135deg, #10b981, #059669);
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Error state animation */
.modal-content input.error {
    animation: errorShake 0.5s ease-in-out;
}

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