/* DIALEK MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 20px;
    padding: 0;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255,255,255,0.1);
}

.modal-body {
    padding: 15px;
}

/* DIALEK CARD */
.dialeg-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dialeg-card:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(0,212,255,0.3);
}

.dialeg-card.active {
    background: rgba(0,212,255,0.15);
    border-color: #00d4ff;
    box-shadow: 0 0 15px rgba(0,212,255,0.2);
}

.dialeg-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff, #0066ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.dialeg-info {
    flex: 1;
}

.dialeg-name {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 3px;
}

.dialeg-desc {
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    line-height: 1.4;
}

.dialeg-select-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(0,212,255,0.5);
    background: transparent;
    color: #00d4ff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.dialeg-select-btn:hover {
    background: rgba(0,212,255,0.2);
}

.dialeg-card.active .dialeg-select-btn {
    background: #00d4ff;
    color: #000;
    border-color: #00d4ff;
}

/* Loading state */
.dialeg-loading {
    text-align: center;
    padding: 40px;
    color: rgba(255,255,255,0.5);
}

.dialeg-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === CAMERA FIX - Hilangkan Bingkai Hitam === */
#camLeft, #camRight {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;     /* Ini yang paling penting */
    background: #000;
    display: block;
}

.cam-container, .camera-wrapper, .robot-camera {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden;
    position: relative;
    background: #000;
}

/* Pastikan tidak ada padding atau border */
.cam-container > div, 
.robot-camera video {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}



.config-menu-wrapper.hidden {
    display: none !important;
}

.config-menu-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.config-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #00d4ff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.config-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    transform: rotate(30deg);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.config-btn.active {
    background: rgba(0, 212, 255, 0.3);
    border-color: #00d4ff;
    transform: rotate(90deg);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.5);
}

.config-dropdown {
    display: none;
    position: absolute;
    top: 55px;
    right: 0;
    width: 220px;
    background: linear-gradient(145deg, #1a1a2e, #0f0f1a);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 212, 255, 0.1);
    z-index: 200;
    animation: configSlideIn 0.2s ease;
}

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

.config-dropdown.active {
    display: block;
}

.config-header {
    padding: 8px 12px 12px;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    pointer-events: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 6px;
}

.config-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    font-family: inherit;
}

.config-item:hover {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
}

.config-item.config-danger {
    color: #ef4444;
}

.config-item.config-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.config-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.config-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 8px 0;
}

/* === HAPUS FAB MENU LAMA === */
.fab-menu-container,
.fab-main,
.fab-menu,
.fab-item,
.fab-label {
    display: none !important;
}


.pilih-btn {
    padding: 6px 16px;
    border-radius: 8px;
    border: 1px solid #3b82f6;
    background: transparent;
    color: #3b82f6;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pilih-btn:hover {
    background: #3b82f6;
    color: white;
}

.pilih-btn:disabled,
.pilih-btn[disabled] {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
    cursor: default;
    opacity: 1;
}
/* Robot Face Minimalis - UKURAN BESAR */
.robot-face-minimalis {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
    padding: 40px 20px;
}

/* Mata Gede */
.eyes-container {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
}

/* Eye dengan Camera Full - Tanpa Pupil */
.eye {
    width: 180px;  /* 🔥 GEDEIN MATA */
    height: 180px;
    background: #0a0a1a;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 0 60px rgba(0, 240, 255, 0.6),
        inset 0 0 30px rgba(0, 240, 255, 0.3),
        0 0 0 4px rgba(0, 240, 255, 0.4);
    transition: all 0.15s ease;
    overflow: hidden;
    border: 3px solid rgba(0, 240, 255, 0.5);
}

/* Camera full di dalam mata */
.eye-camera {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    opacity: 0.95;
}

/* Glow effect di tepi mata */
.eye::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 2px solid rgba(0, 240, 255, 0.3);
    box-shadow: 
        inset 0 0 30px rgba(0, 240, 255, 0.3),
        0 0 40px rgba(0, 240, 255, 0.5);
    pointer-events: none;
}

/* 🔥 BLINKING: Hanya mata yang tutup, yang lain gak ikut */
.eye.blinking {
    height: 8px;           /* 🔥 Mata jadi garis tipis */
    border-radius: 4px;     /* 🔥 Sedikit rounded */
    background: #1a1a2e;
    box-shadow: none;
    border: 2px solid rgba(0, 240, 255, 0.3);
    margin-top: 86px;      /* 🔥 Push ke tengah biar posisi tetep */
    margin-bottom: 86px;   /* 🔥 Push ke tengah biar posisi tetep */
}

.eye.blinking .eye-camera {
    display: none;
}

.eye.blinking::after {
    display: none;
}

/* Hidung - POSISI ABSOLUTE biar gak ikut naik turun */
.nose {
    width: 30px;
    height: 45px;
    background: rgba(0, 240, 255, 0.6);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.5);
    position: relative;  /* 🔥 Tetep di posisi */
    z-index: 10;
}

/* Mulut - POSISI ABSOLUTE biar gak ikut naik turun */
.mouth {
    width: 100px;
    height: 50px;
    background: #2a2a3e;
    border-radius: 50px 50px 80px 80px;
    border: 3px solid #00F0FF;
    box-shadow: 
        0 0 30px rgba(0, 240, 255, 0.6),
        inset 0 10px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.08s ease;
    position: relative;  /* 🔥 Tetep di posisi */
    z-index: 10;
    overflow: hidden;
}

.mouth::before {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 15px;
    background: #ff6b9d;
    border-radius: 50%;
    opacity: 0.9;
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.7);
}

/* State text */
.state-indicator {
    margin-top: 50px;
    text-align: center;
}



/* Responsive - tetep gede di mobile */
@media (max-width: 480px) {
    .eye {
        width: 140px;
        height: 140px;
    }
    
    .eyes-container {
        gap: 30px;
    }
    
    .eye.blinking {
        margin-top: 66px;
        margin-bottom: 66px;
    }
    
    .mouth {
        width: 80px;
        height: 40px;
    }
    
    .nose {
        width: 24px;
        height: 36px;
    }
}
        * { margin: 0; padding: 0; box-sizing: border-box; }
        html, body { width: 100%; height: 100%; background: #0a0a0a; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
        
        .start-screen {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            background: #0a0a0a; display: flex; flex-direction: column;
            align-items: center; justify-content: center; z-index: 999999;
            transition: opacity 0.5s ease, visibility 0.5s ease;
        }
        .start-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
        .start-screen p { color: #00d4ff; font-size: 18px; margin-bottom: 10px; }
        .start-screen .hint { color: #666; font-size: 12px; }
        .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
}
/* Tambahin ini ke CSS */
.dashboard-killed {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    z-index: -9999 !important;
    pointer-events: none !important;
}

.robot-forced {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 99999 !important;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
/* Container langsung visible tanpa transition delay */
.container {
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    background: radial-gradient(circle at center, #1a1a2e 0%, #0a0a0a 100%);
    opacity: 1; /* 🔥 Langsung visible */
    transition: opacity 0.5s ease;
    padding-top: 80px;
}
        .container.visible { opacity: 1; }
        
        .robot-head { 
            position: relative; 
            width: 340px; 
            height: 380px; 
            margin: 0 auto; 
        }
        .robot-head.speaking {
            animation: head-pulse 0.8s infinite;
        }
        .robot-head.speaking .robot-face {
            border-color: #ef4444; 
            box-shadow: 0 0 50px rgba(239,68,68,0.4), inset 0 0 60px rgba(239,68,68,0.1);
        }
        @keyframes head-pulse { 
            0%, 100% { transform: scale(1); } 
            50% { transform: scale(1.02); } 
        }
        .robot-face {
            position: absolute; 
            width: 320px; 
            height: 360px; 
            left: 50%; 
            transform: translateX(-50%);
            background: linear-gradient(145deg, #2a2a3e 0%, #1a1a2e 50%, #0f0f1a 100%);
            border-radius: 60px 60px 80px 80px; 
            border: 3px solid #00d4ff;
            box-shadow: 0 0 40px rgba(0, 212, 255, 0.3), inset 0 0 60px rgba(0, 212, 255, 0.1);
            overflow: hidden; 
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }
        .robot-fin {
            position: absolute; width: 40px; height: 55px;
            background: linear-gradient(180deg, #00d4ff 0%, #0099cc 100%);
            border-radius: 20px 20px 0 0; top: -45px;
            box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
            animation: fin-pulse 2s infinite;
        }
        .robot-fin.left { left: 60px; transform: rotate(-15deg); }
        .robot-fin.right { right: 60px; transform: rotate(15deg); }
        @keyframes fin-pulse { 0%, 100% { opacity: 0.8; } 50% { opacity: 1; } }
        
        .robot-eyes { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); display: flex; gap: 30px; }
        .eye-socket {
            width: 120px; height: 120px; background: #0a0a0a; border-radius: 50%; border: 3px solid #00d4ff;
            overflow: hidden; position: relative;
            box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 0 30px rgba(0,212,255,0.2);
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }
        .robot-head.listening .eye-socket {
            border-color: #22c55e;
            box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 0 30px rgba(34,197,94,0.3);
        }
        .eye-camera { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; filter: contrast(1.3) brightness(1.2) saturate(1.1); }
        .eye-camera.mirror { transform: scaleX(-1); }
        .eye-glow { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(circle at 30% 30%, rgba(0,212,255,0.3) 0%, transparent 50%); pointer-events: none; border-radius: 50%; }
        .eye-ring { position: absolute; top: -5px; left: -5px; right: -5px; bottom: -5px; border: 2px solid transparent; border-top-color: #00d4ff; border-radius: 50%; animation: eye-rotate 3s linear infinite; }
        @keyframes eye-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
        
        .eyelid { position: absolute; top: 0; left: 0; width: 100%; height: 0%; background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%); z-index: 20; transition: height 0.15s ease-in-out; border-radius: 50% 50% 0 0; }
        .eye-socket.blinking .eyelid { height: 100%; }
        
        .eyebrow { position: absolute; width: 55px; height: 6px; background: #00d4ff; border-radius: 4px; top: -15px; transition: all 0.3s ease; box-shadow: 0 0 10px rgba(0,212,255,0.5); }
        .eyebrow.left { left: 5px; transform: rotate(-10deg); }
        .eyebrow.right { right: 5px; transform: rotate(10deg); }
        
        .robot-mouth {
            position: absolute; bottom: 60px; left: 50%; transform: translateX(-50%);
            display: flex; gap: 5px; padding: 12px 20px;
            background: linear-gradient(180deg, rgba(255,139,175,0.2) 0%, rgba(255,107,157,0.3) 50%, rgba(255,51,102,0.2) 100%);
            border-radius: 30px 30px 40px 40px; border: 3px solid #ff8fab;
            box-shadow: 0 0 20px rgba(255,139,175,0.9), 0 0 40px rgba(255,107,157,0.6), 0 5px 15px rgba(255,51,102,0.4), inset 0 0 20px rgba(255,139,175,0.3);
            align-items: flex-end; height: 45px; transition: all 0.1s ease;
        }
        .mouth-led { width: 8px; background: linear-gradient(180deg, #ff8fab 0%, #ff6b9d 50%, #ff3366 100%); border-radius: 4px; transition: all 0.05s ease; box-shadow: 0 0 8px rgba(255,107,157,0.4); }
        .mouth-led:nth-child(1) { height: 6px; background: linear-gradient(180deg, #ffb3c6 0%, #ff8fab 100%); }
        .mouth-led:nth-child(2) { height: 10px; background: linear-gradient(180deg, #ff8fab 0%, #ff6b9d 100%); }
        .mouth-led:nth-child(3) { height: 14px; background: linear-gradient(180deg, #ff6b9d 0%, #ff3366 100%); }
        .mouth-led:nth-child(4) { height: 18px; background: linear-gradient(180deg, #ff3366 0%, #ff1744 100%); }
        .mouth-led:nth-child(5) { height: 14px; background: linear-gradient(180deg, #ff6b9d 0%, #ff3366 100%); }
        .mouth-led:nth-child(6) { height: 10px; background: linear-gradient(180deg, #ff8fab 0%, #ff6b9d 100%); }
        .mouth-led:nth-child(7) { height: 6px; background: linear-gradient(180deg, #ffb3c6 0%, #ff8fab 100%); }
        
        .robot-head.listening .robot-face { border-color: #22c55e; box-shadow: 0 0 40px rgba(34,197,94,0.3), inset 0 0 60px rgba(34,197,94,0.1); }
        
        /* AI Style Rolling Log Bubbles */
        .log-bubbles-container {
            position: absolute;
            top: -180px;
            left: 50%;
            transform: translateX(-50%);
            width: 300px;
            height: 160px;
            overflow: hidden;
            pointer-events: none;
            z-index: 100;
        }
        .log-bubble {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            border-radius: 16px;
            padding: 10px 16px;
            font-size: 12px;
            color: #ffffff;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4), 0 0 0 1px rgba(255,255,255,0.1) inset;
            opacity: 0;
            animation: bubble-rise 4s linear forwards;
            max-width: 280px;
            word-wrap: break-word;
            line-height: 1.4;
            text-align: left;
        }
        .log-bubble::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 8px solid transparent;
            border-right: 8px solid transparent;
            border-top: 8px solid #059669;
        }
        .log-bubble.error {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4), 0 0 0 1px rgba(255,255,255,0.1) inset;
        }
        .log-bubble.error::after {
            border-top-color: #dc2626;
        }
        @keyframes bubble-rise {
            0% {
                bottom: 0;
                opacity: 0;
                transform: translateX(-50%) scale(0.9);
            }
            10% {
                opacity: 1;
                transform: translateX(-50%) scale(1);
            }
            80% {
                opacity: 1;
            }
            100% {
                bottom: 160px;
                opacity: 0;
                transform: translateX(-50%) scale(0.95);
            }
        }
        
        .state-indicator { margin-top: 25px; font-size: 18px; color: #00d4ff; font-weight: 500; display: flex; align-items: flex-end; gap: 10px; }
        .state-text { transition: color 0.3s ease; line-height: 1; }
        .floating-dots { display: flex; gap: 4px; align-items: flex-end; margin-bottom: 2px; }
        .floating-dots .dot { width: 8px; height: 8px; background: #00d4ff; border-radius: 50%; animation: dot-float 1.4s infinite ease-in-out both; }
        .floating-dots .dot:nth-child(1) { animation-delay: 0s; }
        .floating-dots .dot:nth-child(2) { animation-delay: 0.2s; }
        .floating-dots .dot:nth-child(3) { animation-delay: 0.4s; }
        @keyframes dot-float { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }
        
        .fab-menu-container { position: fixed; bottom: 30px; right: 30px; z-index: 1000; }
        .fab-main {
            width: 60px; height: 60px; border-radius: 50%;
            background: linear-gradient(145deg, #00d4ff, #0099cc);
            border: none; color: #fff; font-size: 28px; cursor: pointer;
            box-shadow: 0 4px 20px rgba(0, 212, 255, 0.5);
            transition: all 0.3s ease; display: flex;
            align-items: center; justify-content: center;
        }
        .fab-main:hover { transform: scale(1.1); box-shadow: 0 6px 25px rgba(0, 212, 255, 0.7); }
        .fab-main.active { transform: rotate(45deg); background: linear-gradient(145deg, #ff6b9d, #ff3366); }
        
        .fab-menu {
            position: absolute; bottom: 70px; right: 0;
            display: flex; flex-direction: column; gap: 10px;
            opacity: 0; transform: translateY(20px) scale(0.8);
            pointer-events: none; transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }
        .fab-menu.active { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
        
        .fab-item {
            width: 50px; height: 50px; border-radius: 50%; border: none;
            color: #fff; font-size: 20px; cursor: pointer;
            box-shadow: 0 3px 15px rgba(0,0,0,0.3);
            transition: all 0.2s ease; display: flex;
            align-items: center; justify-content: center; position: relative;
        }
        .fab-item:hover { transform: scale(1.15); }
        .fab-item:nth-child(1) { background: linear-gradient(145deg, #22c55e, #16a34a); }
        .fab-item:nth-child(2) { background: linear-gradient(145deg, #f59e0b, #d97706); }
        .fab-item:nth-child(3) { background: linear-gradient(145deg, #ef4444, #dc2626); }
        .fab-item:nth-child(4) { background: linear-gradient(145deg, #8b5cf6, #7c3aed); }
        .fab-item:nth-child(5) { background: linear-gradient(145deg, #ec4899, #db2777); }
        
        .fab-label {
            position: absolute; right: 60px; background: rgba(0,0,0,0.8);
            color: #fff; padding: 5px 12px; border-radius: 15px;
            font-size: 12px; white-space: nowrap; opacity: 0;
            transform: translateX(10px); transition: all 0.2s ease; pointer-events: none;
        }
        .fab-item:hover .fab-label { opacity: 1; transform: translateX(0); }

        /* Voice Selection Modal */
        .voice-modal-overlay {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.85); backdrop-filter: blur(10px);
            display: flex; align-items: center; justify-content: center;
            z-index: 100000; opacity: 0; visibility: hidden;
            transition: all 0.4s ease;
        }
        .voice-modal-overlay.active { opacity: 1; visibility: visible; }
        .voice-modal {
            background: linear-gradient(145deg, #1a1a2e, #0f0f1a);
            border: 2px solid #00d4ff;
            border-radius: 24px; padding: 30px;
            width: 90%; max-width: 450px;
            max-height: 80vh; overflow-y: auto;
            box-shadow: 0 0 60px rgba(0,212,255,0.3);
            transform: scale(0.9) translateY(20px);
            transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }
        .voice-modal-overlay.active .voice-modal {
            transform: scale(1) translateY(0);
        }
        .voice-modal h2 {
            color: #00d4ff; font-size: 22px; margin-bottom: 8px;
            text-align: center; font-weight: 600;
        }
        .voice-modal .subtitle {
            color: #888; font-size: 13px; text-align: center; margin-bottom: 20px;
        }
        .voice-card {
            display: flex; align-items: center; gap: 15px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 16px; padding: 15px 20px;
            margin-bottom: 10px; cursor: pointer;
            transition: all 0.3s ease;
        }
        .voice-card:hover {
            background: rgba(0,212,255,0.1);
            border-color: #00d4ff;
            transform: translateX(5px);
        }
        .voice-card.active {
            background: rgba(0,212,255,0.15);
            border-color: #00d4ff;
            box-shadow: 0 0 20px rgba(0,212,255,0.2);
        }
        .voice-card .avatar {
            width: 50px; height: 50px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-size: 24px; flex-shrink: 0;
        }
        .voice-card .info { flex: 1; }
        .voice-card .name { color: #fff; font-size: 16px; font-weight: 600; }
        .voice-card .meta { color: #888; font-size: 12px; margin-top: 2px; }
        .voice-card .tags { display: flex; gap: 6px; margin-top: 4px; }
        .voice-card .tag {
            font-size: 10px; padding: 2px 8px; border-radius: 10px;
            background: rgba(255,255,255,0.1); color: #aaa;
        }
        .voice-card .play-btn {
            width: 40px; height: 40px; border-radius: 50%;
            border: 2px solid #00d4ff; background: transparent;
            color: #00d4ff; font-size: 16px; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            transition: all 0.3s ease;
        }
        .voice-card .play-btn:hover {
            background: #00d4ff; color: #0a0a0a;
        }
        .voice-card .play-btn.playing {
            background: #ef4444; border-color: #ef4444; color: #fff;
        }
        .voice-modal .btn-group {
            display: flex; gap: 10px; margin-top: 20px;
        }
        .voice-modal .btn {
            flex: 1; padding: 14px; border-radius: 12px;
            border: none; font-size: 15px; font-weight: 600;
            cursor: pointer; transition: all 0.3s ease;
        }
        .voice-modal .btn-primary {
            background: linear-gradient(145deg, #00d4ff, #0099cc);
            color: #fff;
        }
        .voice-modal .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0,212,255,0.4);
        }
        .voice-modal .btn-secondary {
            background: rgba(255,255,255,0.1);
            color: #fff;
        }
        .voice-modal .btn-secondary:hover {
            background: rgba(255,255,255,0.2);
        }
        .current-voice-badge {
            position: fixed; top: 20px; left: 20px;
            background: rgba(0,0,0,0.6); backdrop-filter: blur(10px);
            border: 1px solid rgba(0,212,255,0.3);
            border-radius: 20px; padding: 8px 16px;
            color: #00d4ff; font-size: 12px;
            display: flex; align-items: center; gap: 8px;
            z-index: 1000;
        }
        
        
        
        
        
        
        
        
        
       
    /* Voice Selection Modal - FIX WIDTH */
    .voice-modal-overlay {
        position: fixed; 
        top: 0; 
        left: 0; 
        right: 0; 
        bottom: 0;
        background: rgba(0,0,0,0.85); 
        backdrop-filter: blur(10px);
        display: flex; 
        align-items: center; 
        justify-content: center;
        z-index: 100000; 
        opacity: 0; 
        visibility: hidden;
        transition: all 0.4s ease;
        padding: 20px; /* 🔥 Tambahin padding biar gak nempel edge */
    }
    
    .voice-modal-overlay.active { 
        opacity: 1; 
        visibility: visible; 
    }
    
    .voice-modal {
        background: linear-gradient(145deg, #1a1a2e, #0f0f1a);
        border: 2px solid #00d4ff;
        border-radius: 24px; 
        padding: 30px;
        width: 100%; /* 🔥 Full width dalam batas max */
        max-width: 500px; /* 🔥 Naikin dari 450px */
        min-width: 320px; /* 🔥 Minimal width biar gak menciut */
        max-height: 85vh; 
        overflow-y: auto;
        box-shadow: 0 0 60px rgba(0,212,255,0.3);
        transform: scale(0.9) translateY(20px);
        transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }
    
    .voice-modal-overlay.active .voice-modal {
        transform: scale(1) translateY(0);
    }
    
    .voice-modal h2 {
        color: #00d4ff; 
        font-size: 24px; /* 🔥 Naikin dikit */
        margin-bottom: 10px;
        text-align: center; 
        font-weight: 600;
    }
    
    .voice-modal .subtitle {
        color: #888; 
        font-size: 14px; /* 🔥 Naikin dikit */
        text-align: center; 
        margin-bottom: 25px;
    }
    
    /* Voice Card - FIX LEBAR */
    .voice-card {
        display: flex; 
        align-items: center; 
        gap: 15px;
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 16px; 
        padding: 18px 20px; /* 🔥 Naikin padding */
        margin-bottom: 12px; 
        cursor: pointer;
        transition: all 0.3s ease;
        width: 100%; /* 🔥 Full width */
        min-height: 70px; /* 🔥 Minimal height biar gak menciut */
    }
    
    .voice-card:hover {
        background: rgba(0,212,255,0.1);
        border-color: #00d4ff;
        transform: translateX(5px);
    }
    
    .voice-card.active {
        background: rgba(0,212,255,0.15);
        border-color: #00d4ff;
        box-shadow: 0 0 20px rgba(0,212,255,0.2);
    }
    
    .voice-card .avatar {
        width: 55px; /* 🔥 Naikin dari 50px */
        height: 55px; 
        border-radius: 50%;
        display: flex; 
        align-items: center; 
        justify-content: center;
        font-size: 28px; /* 🔥 Naikin dari 24px */
        flex-shrink: 0; /* 🔥 Jangan menciut */
    }
    
    .voice-card .info { 
        flex: 1; 
        min-width: 0; /* 🔥 Fix text overflow */
    }
    
    .voice-card .name { 
        color: #fff; 
        font-size: 17px; /* 🔥 Naikin */
        font-weight: 600; 
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .voice-card .meta { 
        color: #888; 
        font-size: 13px; 
        margin-top: 3px; 
    }
    
    .voice-card .tags { 
        display: flex; 
        gap: 6px; 
        margin-top: 5px; 
        flex-wrap: wrap; /* 🔥 Biar gak overflow */
    }
    /* Avatar block tanpa icon */
.voice-card .avatar-block {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(145deg, #00d4ff, #0099cc);
}
    .voice-card .tag {
        font-size: 11px; 
        padding: 3px 10px; 
        border-radius: 12px;
        background: rgba(255,255,255,0.1); 
        color: #aaa;
    }
    .voice-card .avatar-initial {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
}
   /* Play button tanpa icon */
.voice-card .play-btn {
    width: 50px;
    height: 35px;
    border-radius: 8px;
    border: 2px solid #00d4ff;
    background: transparent;
    color: #00d4ff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
    
   .voice-card .play-btn:hover {
    background: #00d4ff;
    color: #0a0a0a;
}
    
   
    .voice-card .play-btn.playing {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}
    /* Button Group - FIX */
    .voice-modal .btn-group {
        display: flex; 
        gap: 12px; 
        margin-top: 25px;
    }
    
    .voice-modal .btn {
        flex: 1; 
        padding: 16px; /* 🔥 Naikin dari 14px */
        border-radius: 14px;
        border: none; 
        font-size: 16px; 
        font-weight: 600;
        cursor: pointer; 
        transition: all 0.3s ease;
    }
    
    .voice-modal .btn-primary {
        background: linear-gradient(145deg, #00d4ff, #0099cc);
        color: #fff;
    }
    
    .voice-modal .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0,212,255,0.4);
    }
    
    .voice-modal .btn-secondary {
        background: rgba(255,255,255,0.1);
        color: #fff;
    }
    
    .voice-modal .btn-secondary:hover {
        background: rgba(255,255,255,0.2);
    }
    
    /* 🔥 RESPONSIVE: Kalo layar kecil */
    @media (max-width: 480px) {
        .voice-modal {
            padding: 20px;
            border-radius: 20px;
        }
        
        .voice-modal h2 {
            font-size: 20px;
        }
        
        .voice-card {
            padding: 14px 16px;
        }
        
        .voice-card .avatar {
            width: 48px;
            height: 48px;
            font-size: 24px;
        }
        
        .voice-card .name {
            font-size: 15px;
        }
    }
    /* Tambahin ke <style> */
video {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

video::-webkit-media-controls {
    display: none !important;
}

video::-webkit-media-controls-start-playback-button {
    display: none !important;
}


/* Tambahin ini ke <style> */
#dashboard-screen.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}
.eye-camera.mirror {
    transform: scaleX(-1);
    -webkit-transform: scaleX(-1); /* 🔥 iOS prefix */
}

/* 🔥 PASTIIN mirror gak ke-reset */
.eye-camera {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    filter: contrast(1.3) brightness(1.2) saturate(1.1);
    /* JANGAN tambah transform di sini, nanti override .mirror */
}


/* =========================================================
   NAVISA DESKTOP CENTER FIX
   Hanya menggeser robot dari tengah panel kiri ke tengah
   viewport desktop. Tidak mengubah header, grid, atau footer.
   ========================================================= */
@media (min-width: 1024px) {
    #robotHead.robot-head {
        position: relative !important;
        left: 10vw !important;
    }

    /* Status berada di luar kepala robot pada layout ini. */
    .state-indicator {
        position: relative !important;
        left: 10vw !important;
    }
}

@media (max-width: 1023px) {
    #robotHead.robot-head,
    .state-indicator {
        left: auto !important;
    }
}