body {
    background: #111; color: white;
    font-family: 'Courier New', Courier, monospace;
    display: flex; justify-content: center; align-items: flex-start;
    min-height: 100vh; margin: 0; padding: 40px 20px;
}

.container { display: flex; gap: 40px; flex-wrap: wrap; justify-content: center; align-items: flex-start; }

.booth-side { width: 450px; position: sticky; top: 40px; }
.camera-screen {
    width: 100%; height: 337px;
    background: #000; border: 3px solid #333;
    position: relative; overflow: hidden; border-radius: 8px;
}
video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); transition: filter 0.3s; }

#countdown {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 80px; font-weight: bold; text-shadow: 2px 2px 10px #000; z-index: 10;
}
#flash { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: white; opacity: 0; z-index: 20; pointer-events: none; }

.control-panel { background: #1a1a1a; padding: 15px; margin-top: 15px; border-radius: 8px; max-height: 400px; overflow-y: auto; }

/* CSS MENU ACCORDION */
.step-title {
    background: #222; color: #fff;
    padding: 12px; border-radius: 5px;
    margin: 10px 0 5px 0 !important;
    cursor: pointer; font-size: 14px;
    display: flex; justify-content: space-between;
    transition: background 0.2s; user-select: none;
}
.step-title:hover { background: #333; }
.step-title:first-child { margin-top: 0 !important; }

.step-content { display: block; margin-bottom: 15px; }
.hidden { display: none !important; }

.next-step-btn {
    width: 100%; padding: 10px; margin-top: 12px;
    background: #38a3a5; color: white; border: none;
    border-radius: 4px; cursor: pointer; font-weight: bold;
    transition: 0.2s; font-size: 14px;
}
.next-step-btn:hover { background: #22577a; }

.layout-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.layout-bar button { padding: 8px; font-size: 11px; background: #333; color: white; border: 1px solid #555; cursor: pointer; border-radius: 4px; }
.layout-bar button.active-btn { background: #fff; color: #000; font-weight: bold; }

.theme-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.theme-bar button { padding: 8px 4px; font-size: 10px; border: none; cursor: pointer; border-radius: 4px; transition: 0.2s; font-weight: bold; }
.theme-bar button:hover { transform: translateY(-2px); box-shadow: 0 2px 5px rgba(0,0,0,0.5); }

.theme-bar button.lucu-btn { background: #ffd1dc; color: #000; }
.theme-bar button.cool-btn { background: #333; color: #fff; border: 1px solid #555;}
.theme-bar button.aes-btn { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); color: #000; }

/* =========================================
   FIXED: 20 KOLEKSI FRAME (BASE64 SVG - ANTI GAGAL DOWNLOAD)
   ========================================= */

/* --- LUCU / CUTE --- */
.theme-cloud { background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%); }
.theme-cow { background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cpath d='M30,30 Q50,10 70,30 T90,70 Q70,90 50,70 T10,50 Z' fill='%23111'/%3E%3C/svg%3E"); }
.theme-sparkle { background: #fdfbfb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M20 0 L25 15 L40 20 L25 25 L20 40 L15 25 L0 20 Z' fill='%23e0e0e0'/%3E%3C/svg%3E"); }
.theme-polka { background: #fecfef url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Ccircle cx='15' cy='15' r='6' fill='%23ff9a9e'/%3E%3C/svg%3E"); }
.theme-plaid { background: #a1c4fd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Crect width='40' height='40' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='10'/%3E%3C/svg%3E"); }
.theme-fruit { background: #ffb1cb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='50'%3E%3Cpath d='M10 25 A 15 15 0 0 0 40 25' fill='%23ff4d6d' stroke='%234cd137' stroke-width='4'/%3E%3Ccircle cx='20' cy='30' r='2' fill='%23000'/%3E%3Ccircle cx='30' cy='30' r='2' fill='%23000'/%3E%3C/svg%3E"); }
.theme-flower { background: #cdb4db url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='20' cy='20' r='6' fill='%23fcf6bd'/%3E%3Ccircle cx='20' cy='10' r='5' fill='%23fff'/%3E%3Ccircle cx='20' cy='30' r='5' fill='%23fff'/%3E%3Ccircle cx='10' cy='20' r='5' fill='%23fff'/%3E%3Ccircle cx='30' cy='20' r='5' fill='%23fff'/%3E%3C/svg%3E"); }

/* --- KEREN / COOL --- */
.theme-charcoal { background: #1a1a1a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M0 20 L20 0 Z' stroke='%232a2a2a' stroke-width='5'/%3E%3C/svg%3E"); }
.theme-neon { background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Crect width='20' height='20' fill='none' stroke='%2300d4ff' stroke-width='1'/%3E%3C/svg%3E"); }
.theme-steel { background: #636e72 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Ccircle cx='5' cy='5' r='1' fill='rgba(255,255,255,0.3)'/%3E%3C/svg%3E"); }
.theme-camo { background: #4b5320 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M10 20 Q 30 10 40 30 T 10 50 Z' fill='%233f4714'/%3E%3Cpath d='M40 10 Q 60 20 50 40 T 30 20 Z' fill='%235a6327'/%3E%3C/svg%3E"); }
.theme-matrix { background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Ctext x='5' y='20' fill='%2300ff00' font-family='monospace' font-size='15' opacity='0.5'%3E10%3C/text%3E%3C/svg%3E"); }
.theme-pixel { background: #1a1a1a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Crect x='0' y='0' width='10' height='10' fill='rgba(0,255,0,0.1)'/%3E%3Crect x='10' y='10' width='10' height='10' fill='rgba(0,255,0,0.1)'/%3E%3C/svg%3E"); }

/* --- AESTHETIC --- */
.theme-sunset { background: linear-gradient(to bottom, #ff7e5f, #feb47b, #86a8e7, #91eae4); }
.theme-holo { background: linear-gradient(120deg, #ff9a9e, #fecfef, #a1c4fd, #c2e9fb, #e2d1c3); }
.theme-retro { background: #111 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Crect width='40' height='40' fill='none' stroke='%23ff00ff' stroke-width='1'/%3E%3Cline x1='0' y1='20' x2='40' y2='20' stroke='%2300ffff' stroke-width='1'/%3E%3C/svg%3E"); }
.theme-denim { background: #2b5876 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M0 10 L10 0' stroke='rgba(255,255,255,0.2)' stroke-width='1'/%3E%3C/svg%3E"); }
.theme-galaxy { background: #0b0c10 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='50'%3E%3Ccircle cx='10' cy='10' r='1' fill='%23fff'/%3E%3Ccircle cx='40' cy='30' r='1.5' fill='%23fff' opacity='0.7'/%3E%3Ccircle cx='25' cy='45' r='0.5' fill='%23fff'/%3E%3C/svg%3E"); }
.theme-artdeco { background: #0b1c3e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M20 0 L40 20 L20 40 L0 20 Z' fill='none' stroke='%23d4af37' stroke-width='1' opacity='0.4'/%3E%3C/svg%3E"); }
.theme-popdots { background: #fafafa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='10' cy='10' r='8' fill='%23ffd1dc'/%3E%3Ccircle cx='30' cy='30' r='6' fill='%23bde0fe'/%3E%3C/svg%3E"); }


.filter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.filter-grid button { padding: 8px 5px; font-size: 11px; background: #222; color: white; border: 1px solid #444; cursor: pointer; border-radius: 4px; transition: 0.2s; }
.filter-grid button:hover { background: #444; }

.result-side { display: flex; flex-direction: column; align-items: center; width: 400px;}

.custom-frame {
    padding: 25px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    position: relative; 
    transition: width 0.3s, background 0.4s ease; 
    border-radius: 8px;
}

.frame-grid { width: 350px; } 
.frame-strip { width: 230px; } 
.frame-polaroid { width: 350px; } 

.slots-container { display: grid; gap: 15px; }
.grid-2x2 { grid-template-columns: 1fr 1fr; }
.grid-strip { grid-template-columns: 1fr; } 
.grid-1x1 { grid-template-columns: 1fr; } 

.slot { 
    width: 100%; aspect-ratio: 4/3; 
    background: rgba(0,0,0,0.2); 
    overflow: hidden; border-radius: 10px; 
    border: 5px solid #ffffff; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    box-sizing: border-box; transition: border 0.4s ease;
}
.slot img { width: 100%; height: 100%; object-fit: cover; }

.footer-text { 
    margin-top: 25px; text-align: center; font-size: 15px; 
    font-weight: bold; letter-spacing: 2px; padding: 8px; 
    border-radius: 5px; transition: 0.3s;
}

.sticker-panel { margin-top: 15px; background: #1a1a1a; padding: 15px; border-radius: 8px; width: 100%; box-sizing: border-box; text-align: center;}
.sticker-panel p { font-size: 12px; color: #ccc; margin-bottom: 15px; line-height: 1.5; }
.sticker-bank { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.stk { font-size: 28px; cursor: pointer; transition: 0.2s; user-select: none; }
.stk:hover { transform: scale(1.3); }

#sticker-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; }
.placed-sticker { position: absolute; font-size: 40px; pointer-events: auto; cursor: move; user-select: none; transform-origin: center center; z-index: 100; }

button#start-btn, button#download-btn {
    width: 100%; padding: 15px; margin-top: 15px;
    background: #fff; color: #000; border: none; font-size: 16px;
    font-weight: bold; cursor: pointer; border-radius: 5px; transition: 0.3s;
}
button#start-btn:hover, button#download-btn:hover { background: #ccc; }

.scrollable-panel::-webkit-scrollbar { width: 8px; }
.scrollable-panel::-webkit-scrollbar-track { background: #1a1a1a; }
.scrollable-panel::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; }