/* Authentication Guard Mobile Styles */

.auth-guard-mobile {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-guard-zcontent {
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.auth-guard-mascot {
    margin-bottom: 40px;
}

.auth-guard-mascot img {
    max-width: 400px;
    width: 100%;
    height: auto;
    border-radius: 20px;
    animation: gentleBounce 3s ease-in-out infinite;
    /* Crisp rendering untuk gambar yang sudah optimal size */
    image-rendering: -webkit-optimize-contrast;
    -ms-interpolation-mode: nearest-neighbor;
    /* Prevent blur dari browser scaling */
    image-rendering: crisp-edges;
    /* Smooth untuk WebP yang sudah optimal */
    -webkit-font-smoothing: antialiased;
}

.auth-guard-message h3 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.auth-guard-message p {
    font-size: 16px;
    color: #666;
    margin: 0 0 40px 0;
    line-height: 1.6;
}

.auth-guard-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-guard-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.auth-guard-btn-primary {
    background: #000;
    color: white;
    border: 2px solid #000;
}

.auth-guard-btn-primary:hover {
    background: #fff100;
    border-color: #fff100;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    text-decoration: none;
    color: #000;
}

.auth-guard-btn-secondary {
    background: transparent;
    color: #000;
    border: 2px solid #000;
}

.auth-guard-btn-secondary:hover {
    background: #000;
    color: white;
    transform: translateY(-1px);
    text-decoration: none;
}

/* Gentle bounce animation for mascot */
@keyframes gentleBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .auth-guard-content {
        max-width: 320px;
        padding: 0 10px;
    }
    
    .auth-guard-mascot {
        margin-bottom: 30px;
    }
    
    .auth-guard-mascot img {
        max-width: 280px; /* Larger for better quality on small screens */
    }
    
    .auth-guard-message h3 {
        font-size: 24px;
    }
    
    .auth-guard-message p {
        font-size: 14px;
        margin-bottom: 30px;
    }
    
    .auth-guard-btn {
        padding: 14px 24px;
        font-size: 15px;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) and (min-width: 481px) {
    .auth-guard-mascot img {
        max-width: 350px; /* Optimal size for tablets */
    }
    
    .auth-guard-message h3 {
        font-size: 26px;
    }
}

/* Hide all page content when auth guard is active */
body.auth-guard-active .main-content-lynk,
body.auth-guard-active .content-detail,
body.auth-guard-active .navbar,
body.auth-guard-active .footer,
body.auth-guard-active header {
    display: none !important;
}

/* Hide navigation EXCEPT mobile bottom nav */
body.auth-guard-active nav:not(.mobile-bottom-nav) {
    display: none !important;
}

/* Ensure mobile bottom nav stays visible even when auth guard is active */
body.auth-guard-active .mobile-bottom-nav {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10000 !important;
}

/* Message feedback */
.auth-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.auth-message-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.auth-message-success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}