/* === LAYOUT UTAMA === */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

canvas.a-canvas {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 1 !important;
}

video, 
#arjs-webcam-generator-video {
    width: 100vw !important;
    height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    object-fit: cover !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: -100 !important;
}

/* === STATUS BAR (BOTTOM OVERLAY) === */
#status-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    border-radius: 50px;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 280px;
    justify-content: center;
}

#status-text {
    color: #f8fafc;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: relative;
    transition: background-color 0.3s ease;
}

/* Status: Searching */
#status-bar.status-searching {
    border-color: rgba(239, 68, 68, 0.2);
}

#status-bar.status-searching .status-indicator {
    background-color: #ef4444;
    box-shadow: 0 0 12px #ef4444;
}

#status-bar.status-searching .status-indicator::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 2px solid #ef4444;
    opacity: 0;
    animation: pulse 1.8s infinite ease-out;
}

/* Status: Found */
#status-bar.status-found {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 15px 35px -10px rgba(16, 185, 129, 0.3);
}

#status-bar.status-found #status-text {
    color: #10b981;
}

#status-bar.status-found .status-indicator {
    background-color: #10b981;
    box-shadow: 0 0 15px #10b981;
}

#status-bar.status-found .status-indicator::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 2px solid #10b981;
    opacity: 0;
    animation: pulse 1.5s infinite ease-out;
}

/* === INSTRUCTION OVERLAY (TOP OVERLAY) === */
#instruction-overlay {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(15, 23, 42, 0.4);
    padding: 8px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
    text-align: center;
    letter-spacing: 0.5px;
}

#instruction-overlay strong {
    color: #00FFA3;
    font-weight: 700;
}

/* === ANIMASI PULSE === */
@keyframes pulse {
    0% {
        transform: scale(0.6);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* === RESPONSIVITAS SELULER (MEDIA QUERY) === */
@media (max-width: 480px) {
    #status-bar {
        bottom: 45px;
        padding: 10px 18px;
        min-width: unset;
        width: 80%;
        max-width: 290px;
    }
    #status-text {
        font-size: 0.85rem;
    }
    #instruction-overlay {
        width: 85%;
        font-size: 0.8rem;
        top: 15px;
        padding: 6px 14px;
    }
}

/* === KURSOR VISUAL 2D HTML === */
#css-cursor {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease;
}
