/* Apple TV / VisionOS Inspired Premium Auth Modal */

/* Cinematic blurred backdrop overlay */
#authModalOverlay {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Premium Minimal Container */
#authModalContent {
    background: rgba(20, 20, 20, 0.75);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    height: auto;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Sliding forms container structure */
.auth-form-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#authLoginForm, #authRegisterForm {
    width: 100%;
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* Slide classes */
.slide-left {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    position: absolute !important;
}

.slide-right {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    position: absolute !important;
}

.slide-active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    position: relative !important;
}

/* Premium Dark Glass Inputs */
.auth-input-premium {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: #e5e5e5;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.auth-input-premium:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.auth-input-premium::placeholder {
    color: rgba(156, 163, 175, 0.5);
}

/* Clean Matte Action Button */
.btn-auth-premium {
    background: #0066cc;
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.2px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    position: relative;
}

.btn-auth-premium:hover {
    background: #0077ed;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-auth-premium:active {
    transform: translateY(0);
    background: #005bb5;
    box-shadow: none;
    transition: all 0.1s ease;
}

/* Subtitles */
.auth-subtitle {
    color: #888888;
    font-weight: 400;
}

/* Responsive Mobile Bottom-Sheet Layout */
@media (max-width: 640px) {
    #authModalOverlay {
        align-items: flex-end; /* Align to the bottom of page */
        padding: 0;
    }
    
    #authModalContent {
        max-width: 100%;
        border-radius: 28px 28px 0 0; /* Rounded top only */
        border-left: none;
        border-right: none;
        border-bottom: none;
        transform: translateY(100%);
        transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    }
    
    #authModalContent::before {
        display: none; /* Hide glow on mobile to save performance */
    }
    
    /* Elegant bottom sheet handle indicator */
    #authModalContent::after {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.15);
    }

    /* Modal slide-in modifier for mobile active state */
    #authModalOverlay.flex #authModalContent {
        transform: translateY(0);
    }
}
