/* Modern & Luxurious Mobile/Tablet Exclusive Auth Stylesheet */

/* Hide mobile layout on desktop */
.auth-mobile-wrapper {
    display: none;
}

@media (max-width: 991px) {
    /* Cegah putih-putih di bagian bawah/atas saat overscroll */
    html, body {
        background-color: #0a0a0a !important;
        height: 100%;
        margin: 0;
        padding: 0;
    }

    /* Hide desktop layout */
    .split-auth-container {
        display: none !important;
    }
    
    .auth-mobile-wrapper {
        display: block;
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        background-color: #0a0a0a; /* Tema Gelap Mewah */
        overflow: hidden;
        overflow-y: auto; /* Allow scrolling if content is too tall */
        font-family: 'Outfit', 'Inter', sans-serif;
        z-index: 9999;
        /* Hide scrollbar */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    .auth-mobile-wrapper::-webkit-scrollbar {
        display: none;
    }
    
    .auth-mobile-container {
        width: 100%;
        min-height: 100%;
        padding: 40px 24px calc(40px + env(safe-area-inset-bottom, 20px)) 24px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: relative;
        z-index: 10;
        box-sizing: border-box;
    }

    /* Fluid Organic Blobs Background */
    .auth-mobile-wrapper .blob {
        position: absolute;
        border-radius: 50%;
        filter: blur(1px);
        z-index: 1;
        pointer-events: none;
        transition: all 1s ease-in-out;
    }

    .auth-mobile-wrapper .blob-1 {
        width: 320px;
        height: 320px;
        background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
        top: -60px;
        left: -80px;
        border-radius: 43% 57% 41% 59% / 57% 45% 55% 43%;
        animation: blob-float-1 20s infinite alternate;
    }

    .auth-mobile-wrapper .blob-2 {
        width: 250px;
        height: 250px;
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
        top: 20px;
        left: 20px;
        border-radius: 50% 50% 30% 70% / 50% 60% 40% 50%;
        animation: blob-float-2 25s infinite alternate;
    }

    .auth-mobile-wrapper .blob-3 {
        width: 160px;
        height: 160px;
        background: linear-gradient(135deg, #a78bfa 0%, #f59e0b 100%);
        right: -40px;
        top: 250px;
        border-radius: 60% 40% 70% 30% / 50% 30% 70% 50%;
        animation: blob-float-3 18s infinite alternate;
    }
    
    .auth-mobile-wrapper .blob-4 {
        width: 350px;
        height: 350px;
        background: linear-gradient(135deg, rgba(10, 88, 255, 0.03) 0%, rgba(10, 88, 255, 0.08) 100%);
        bottom: -100px;
        right: -80px;
        border-radius: 40% 60% 50% 50% / 40% 40% 60% 60%;
        z-index: 0;
    }

    @keyframes blob-float-1 {
        0% { transform: translate(0, 0) scale(1) rotate(0deg); border-radius: 43% 57% 41% 59% / 57% 45% 55% 43%; }
        100% { transform: translate(20px, 30px) scale(1.05) rotate(45deg); border-radius: 50% 50% 30% 70% / 50% 60% 40% 50%; }
    }

    @keyframes blob-float-2 {
        0% { transform: translate(0, 0) scale(1) rotate(0deg); }
        100% { transform: translate(-10px, -20px) scale(0.95) rotate(-30deg); }
    }

    @keyframes blob-float-3 {
        0% { transform: translate(0, 0) scale(1) rotate(0deg); border-radius: 60% 40% 70% 30% / 50% 30% 70% 50%; }
        100% { transform: translate(-30px, 15px) scale(1.1) rotate(90deg); border-radius: 43% 57% 41% 59% / 57% 45% 55% 43%; }
    }

    /* Screen Wrapper & Transitions */
    .mobile-screens-wrapper {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        position: relative;
        margin-top: 60px;
    }

    .mobile-screen {
        width: 100%;
        opacity: 0;
        transform: translateY(20px) scale(0.98);
        pointer-events: none;
        position: absolute;
        top: 0;
        left: 0;
        transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
        display: none;
        flex-direction: column;
        justify-content: center;
    }

    .mobile-screen.active {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
        position: relative;
        display: flex;
        z-index: 5;
    }

    /* Top Logo Header */
    .mobile-logo-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
        z-index: 12;
    }

    .mobile-logo-header img {
        height: 150px; /* Diperbesar sangat besar! */
        filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 10px rgba(245, 158, 11, 0.5));
        margin-top: 15px;
    }

    /* Screen Elements styling */
    .mobile-title {
        font-size: 2.5rem;
        font-weight: 800;
        color: #ffffff;
        margin-bottom: 8px;
        letter-spacing: -1px;
    }

    .mobile-subtitle {
        font-size: 1.05rem;
        color: rgba(255,255,255,0.6);
        margin-bottom: 35px;
        font-weight: 400;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    /* Elegant Modern Inputs */
    .mobile-input-group {
        margin-bottom: 24px;
        position: relative;
    }

    .mobile-input {
        width: 100%;
        padding: 16px 20px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background-color: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 16px;
        font-size: 1.05rem;
        color: #ffffff;
        outline: none;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-sizing: border-box;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .mobile-input::placeholder {
        color: #9ca3af;
    }

    .mobile-input:focus {
        border-color: rgba(167, 139, 250, 0.5);
        background-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 10px 25px -5px rgba(167, 139, 250, 0.1), 0 0 0 4px rgba(167, 139, 250, 0.1);
    }

    /* Buttons */
    .mobile-btn-primary {
        width: 100%;
        padding: 16px;
        border: none;
        border-radius: 16px;
        background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
        color: #ffffff;
        font-weight: 700;
        font-size: 1.1rem;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        box-shadow: 0 10px 25px -5px rgba(10, 88, 255, 0.4);
        margin-top: 10px;
    }

    .mobile-btn-primary:hover, .mobile-btn-primary:focus {
        background: #0045e6;
        box-shadow: 0 12px 28px -4px rgba(10, 88, 255, 0.5);
        transform: translateY(-1px);
    }

    .mobile-btn-primary:active {
        transform: translateY(1px);
        box-shadow: 0 6px 15px -5px rgba(10, 88, 255, 0.4);
    }
    
    .mobile-btn-cancel {
        display: block;
        text-align: center;
        margin-top: 20px;
        color: #4b5563;
        text-decoration: none;
        font-size: 1rem;
        font-weight: 500;
        transition: color 0.2s;
    }
    
    .mobile-btn-cancel:hover {
        color: #ffffff;
    }

    /* Password Avatar Screen styling */
    .mobile-avatar-container {
        display: flex;
        justify-content: center;
        margin-bottom: 24px;
        z-index: 10;
        position: relative;
    }

    .mobile-avatar-frame {
        width: 96px;
        height: 96px;
        border-radius: 50%;
        background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
        padding: 4px;
        box-shadow: 0 10px 25px rgba(236, 72, 153, 0.25);
    }

    .mobile-avatar-frame img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
        border: 4px solid #ffffff;
        background-color: #f3f4f6;
    }

    .mobile-user-greeting {
        font-size: 1.8rem;
        font-weight: 800;
        color: #ffffff;
        text-align: center;
        margin-bottom: 6px;
        letter-spacing: -0.5px;
    }

    .mobile-user-instruction {
        font-size: 1.05rem;
        color: rgba(255,255,255,0.6);
        text-align: center;
        margin-bottom: 20px;
    }

    /* Passcode dots */
    .passcode-dots-container {
        display: flex;
        justify-content: center;
        gap: 16px;
        margin: 30px 0;
    }

    .passcode-dot {
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background-color: transparent;
        border: 2px solid rgba(255, 215, 0, 0.4);
        transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .passcode-dot.filled {
        background-color: #FFD700;
        border-color: #FFD700;
        transform: scale(1.3);
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.6), inset 0 0 5px rgba(255, 255, 255, 0.8);
    }

    .passcode-dot.error {
        background-color: transparent !important;
        border-color: #ef4444 !important;
        transform: scale(1.1);
        box-shadow: 0 0 12px rgba(239, 68, 68, 0.5) !important;
    }

    /* CAPTCHA & Extra fields on password screen */
    .mobile-extra-fields {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 20px;
        padding: 16px;
        margin-top: 15px;
        margin-bottom: 20px;
    }

    .mobile-captcha-wrapper {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
    }

    .mobile-captcha-label {
        font-size: 0.95rem;
        font-weight: 700;
        background: rgba(167, 139, 250, 0.15);
        color: #a78bfa;
        padding: 10px 16px;
        border-radius: 12px;
        white-space: nowrap;
    }

    .luxury-toggle-input:checked ~ .mobile-toggle-text {
        color: #FFD700 !important;
        font-weight: 700 !important;
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    }

    /* Screen 2 bottom navigation */
    .mobile-screen-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .mobile-not-you-btn {
        display: flex;
        align-items: center;
        gap: 12px;
        cursor: pointer;
        background: none;
        border: none;
        padding: 0;
    }

    .mobile-not-you-text {
        font-size: 0.95rem;
        color: rgba(255,255,255,0.7);
        font-weight: 500;
    }

    .mobile-circle-arrow-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background-color: rgba(255,255,255,0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        font-size: 1.1rem;
        border: none;
        transition: all 0.2s;
    }

    .mobile-circle-arrow-btn:active {
        transform: scale(0.92);
        background-color: #0045e6;
    }

    .mobile-forgot-link {
        font-size: 0.95rem;
        color: #a78bfa;
        text-decoration: none;
        font-weight: 600;
        transition: color 0.2s;
    }

    .mobile-forgot-link:hover {
        color: #d8b4fe;
        text-decoration: underline;
    }

    /* Recovery / Forgot password screen list options */
    .recovery-options-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 24px;
    }

    .recovery-option-pill {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-radius: 16px;
        background-color: rgba(167, 139, 250, 0.05);
        border: 1px solid rgba(167, 139, 250, 0.15);
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .recovery-option-pill.active {
        background-color: rgba(167, 139, 250, 0.15);
        border-color: #a78bfa;
    }

    .recovery-option-pill-left {
        display: flex;
        align-items: center;
        gap: 14px;
        color: #a78bfa;
        font-weight: 700;
        font-size: 1rem;
    }

    .recovery-option-pill-left i {
        font-size: 1.25rem;
    }

    .recovery-option-pill-right {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        border: 2px solid #0A58FF;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        background-color: #0A58FF;
        font-size: 0.8rem;
    }
    
    .recovery-option-pill.disabled {
        opacity: 0.55;
        cursor: not-allowed;
        background-color: rgba(243, 244, 246, 0.6);
        border-color: rgba(0, 0, 0, 0.05);
    }
    
    .recovery-option-pill.disabled .recovery-option-pill-left {
        color: #6b7280;
    }
    
    .recovery-option-pill.disabled .recovery-option-pill-right {
        border-color: #d1d5db;
        background-color: #ffffff;
    }

    /* Screen shake for validation errors */
    .shake {
        animation: shake 0.4s ease-in-out;
    }

    @keyframes shake {
        0%, 100% { transform: translateX(0); }
        15%, 45%, 75% { transform: translateX(-8px); }
        30%, 60%, 90% { transform: translateX(8px); }
    }
}

/* Hide floating chat, WhatsApp container, and bottom navigation on login / register / forgot password pages */
.floating-chat-container,
body .mobile-bottom-nav {
    display: none !important;
}

/* Step-by-Step Register transitions */
@media (max-width: 991px) {
    .mobile-reg-step {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
        pointer-events: none;
        display: none;
        transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
        width: 100%;
        flex-direction: column;
    }
    
    .mobile-reg-step.active-step {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
        display: flex;
    }
}
