:root {
--primary: #00ffff;
--glow: 0 0 10px var(--primary), 0 0 20px var(--primary);
--bg-panel: rgba(10, 20, 40, 0.65);
--transition: 0.4s ease;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: 'Inter', sans-serif;
color: #fff;
background: url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat fixed;
height: 100vh;
overflow: hidden;
}
.app-container { width: 100vw; height: 100vh; position: relative; }
.page { display: none; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: center; position: absolute; top: 0; left: 0; }
.page.active { display: flex; animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.glass-panel { background: var(--bg-panel); backdrop-filter: blur(12px); padding: 30px; border-radius: 20px; border: 1px solid var(--primary); box-shadow: var(--glow); text-align: center; z-index: 10; }
h1 { font-size: 28px; text-shadow: var(--glow); margin-bottom: 5px; }
h1 span { color: var(--primary); }
.subtitle { color: #ccc; font-size: 14px; margin-bottom: 25px; }
.control-group { margin-bottom: 20px; text-align: left; width: 100%; }
.control-group h3 { font-size: 13px; color: var(--primary); text-shadow: 0 0 5px var(--primary); margin-bottom: 10px; text-transform: uppercase; }
#fileInfo { font-size: 12px; margin-top: 8px; text-align: center; color: #aaa; }

.neon-btn { display: block; width: 100%; background: transparent; border: 1px solid var(--primary); color: #fff; padding: 12px; border-radius: 8px; cursor: pointer; transition: var(--transition); text-align: center; font-weight: 600; }
.neon-btn:hover, .device-btn.active, .fit-btn.active { background: var(--primary); color: #000; box-shadow: var(--glow); }
.device-toggles { display: flex; gap: 10px; }
.action-btn { width: 100%; background: var(--primary); color: #000; border: none; padding: 15px; border-radius: 8px; font-weight: 700; cursor: pointer; box-shadow: var(--glow); transition: var(--transition); margin-top: 10px; }
.action-btn:hover { transform: translateY(-3px); box-shadow: 0 0 25px var(--primary); }

.top-nav { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 15px; padding: 15px 30px; width: auto; white-space: nowrap; z-index: 20; }
.top-nav .neon-btn, .top-nav .action-btn { margin: 0; width: auto; padding: 10px 20px; }
.workspace { flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; overflow: hidden; padding-top: 80px; }

/* FIX WORKSPACE ZOOM: Tambahkan origin dan transition yang mulus */
#captureArea { 
    padding: 40px; 
    display: inline-flex; 
    justify-content: center; 
    align-items: center; 
    transform-origin: center center; 
    transition: transform 0.3s ease; 
}

/* Device Frames (Xiaomi 14 & Xiaomi Pad 6) */
.device { position: relative; background: #000; border: 4px solid #1f1f1f; box-shadow: 0 0 0 2px #0a0a0a, var(--glow); transition: border-radius var(--transition), width var(--transition), height var(--transition); flex-shrink: 0; }
.device.phone { width: 330px; height: 733px; border-radius: 36px; }
.device.tablet { width: 850px; height: 531px; border-radius: 18px; }

/* Notches */
.notch { position: absolute; background: #000; z-index: 2; transition: var(--transition); }
.device.phone .notch { width: 14px; height: 14px; top: 18px; left: 50%; transform: translateX(-50%); border-radius: 50%; box-shadow: inset 0 0 3px rgba(255,255,255,0.15); }
.device.tablet .notch { width: 10px; height: 10px; top: 5px; left: 50%; transform: translateX(-50%); border-radius: 50%; box-shadow: inset 0 0 3px rgba(255,255,255,0.15); }

/* Area Layar */
.screen { position: absolute; background: #ffffff; overflow: hidden; transition: var(--transition); isolation: isolate; }
.device.phone .screen { top: 8px; left: 8px; right: 8px; bottom: 8px; border-radius: 28px; }
.device.tablet .screen { top: 20px; left: 20px; right: 20px; bottom: 20px; border-radius: 8px; }

/* Gambar SS (Bisa ditarik / Drag) */
#mockupImage { 
    width: 100%; 
    height: 100%; 
    background-size: cover; 
    background-position: 50% 50%; 
    background-repeat: no-repeat; 
    transition: opacity 0.3s; 
    cursor: grab; 
}
#mockupImage:active { cursor: grabbing; }