:root {
    --primary: #ff4757;
    --primary-hover: #ff6b81;
    --secondary: #2ed573;
    --secondary-hover: #7bed9f;
    --bg-color: #f1f2f6;
    --text-color: #2f3542;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    text-align: center;
    padding: 30px 15px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 40px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

h1 { color: var(--primary); font-size: 2.2rem; margin-bottom: 5px; }
.subtitle { color: #747d8c; margin-bottom: 30px; font-size: 1.1rem; }

/* Booth Section */
.video-wrapper {
    position: relative; width: 100%; max-width: 640px; margin: 0 auto 25px;
    border: 8px solid #dfe4ea; border-radius: 15px; background: #000;
    overflow: hidden; aspect-ratio: 4/3; display: flex; align-items: center;
}

#webcam {
    width: 100%; height: 100%; object-fit: cover;
    transform: scaleX(-1); /* Efek Cermin */
}

.hidden { display: none !important; }

#countdown {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 120px; color: white; text-shadow: 0 4px 15px rgba(0,0,0,0.6); font-weight: 800;
}

#status {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.8); color: white; padding: 12px 25px;
    border-radius: 30px; font-size: 18px; font-weight: 600; z-index: 10;
}

#flash {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: white; opacity: 0.8; z-index: 5;
    animation: flashAnim 0.4s ease-out;
}

@keyframes flashAnim {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* Buttons */
.btn {
    background-color: var(--primary); color: white; border: none; padding: 16px 32px;
    font-size: 20px; border-radius: 50px; cursor: pointer; transition: all 0.3s ease;
    text-decoration: none; display: inline-block; font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}
.btn:hover { background-color: var(--primary-hover); transform: translateY(-2px); }
.btn:disabled { background-color: #a4b0be; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-download { background-color: var(--secondary); box-shadow: 0 4px 15px rgba(46, 213, 115, 0.4); font-size: 16px; width: 100%; margin-top: 20px; display: block; }
.btn-download:hover { background-color: var(--secondary-hover); }
.btn-outline { background-color: white; color: var(--text-color); border: 2px solid #dfe4ea; box-shadow: none; margin-top: 30px; }
.btn-outline:hover { background-color: #f1f2f6; color: var(--text-color); transform: none; }

/* Result Section */
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 30px; }
.result-card { background: #f8f9fa; padding: 25px; border-radius: 15px; border: 1px solid #f1f2f6; }
.preview-container { background: white; padding: 15px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.preview-container img, .preview-container video { width: 100%; height: auto; border-radius: 5px; display: block; }
