:root { 
    --primary: #1a202c; --accent: #e53e3e; --success: #39FF14; 
    --bg: #f0f2f5; --card: #ffffff; --text: #2d3748;
    --transition-speed: 0.4s;
}
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); margin: 0; display: flex; justify-content: center; min-height: 100vh; }
.app-container { width: 100%; max-width: 900px; padding: 20px; box-sizing: border-box; }

.step { display: none; opacity: 0; transform: translateY(10px); transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease; }
.step.active { display: block; }
.step.fade-in { opacity: 1; transform: translateY(0); }
.card-main { background: var(--card); padding: 30px; border-radius: 24px; box-shadow: 0 10px 25px rgba(0,0,0,0.08); overflow: hidden; }

.t2-layout { display: flex; flex-direction: column; gap: 20px; align-items: center; }

.form-box { flex: 1; width: 100%; display: flex; flex-direction: column; gap: 10px; }
#inputsWrap { background: #f8fafc; padding: 15px; border-radius: 16px; border: 1px solid #e2e8f0; }
input { width: 100%; padding: 12px; margin-bottom: 8px; border: 1px solid #cbd5e0; border-radius: 10px; font-size: 14px; background: #ffffff; box-sizing: border-box; }

.preview-box { position: relative; width: 100%; max-width: 250px; }
#livePreview { width: 100%; height: auto; aspect-ratio: 3/4; background: #e2e8f0; border-radius: 12px; border: 4px solid var(--primary); }
.btn-clear-img { position: absolute; top: -10px; right: -10px; background: var(--accent); color: white; border: none; border-radius: 50%; width: 35px; height: 35px; cursor: pointer; display: none; z-index: 30; font-weight: bold; }

#videoWrapper { position: relative; width: 100%; max-width: 354px; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; display: none; margin: 0 auto; border: 4px solid var(--primary); }
#video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }

.capture-badge {
    position: absolute; top: 15px; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.6); color: white; padding: 8px 15px;
    border-radius: 20px; font-size: 0.75em; font-weight: bold;
    animation: pulse 2s infinite; pointer-events: none; white-space: nowrap;
}

@keyframes pulse { 0% { opacity: 0.7; } 50% { opacity: 1; } 100% { opacity: 0.7; } }

.data-rect-guide { position: absolute; bottom: 0; width: 100%; height: 26.5%; background: rgba(0,0,0,0.4); display: none; border-top: 1px dashed rgba(255,255,255,0.6); }

.action-bar { display: flex; gap: 12px; margin-top: 25px; }
.btn { flex: 1; padding: 16px; border: none; border-radius: 14px; font-weight: bold; cursor: pointer; text-transform: uppercase; font-size: 0.85em; }
.btn-primary { background: var(--primary); color: white; }
.btn-secondary { background: #edf2f7; color: #4a5568; }
.btn-danger-soft { background: #fff5f5; color: #c53030; border: 1px solid #feb2b2; width: 100%; margin-top: 10px; }
.btn-success { background: var(--success); color: #000; }

.silhouette-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 150px; margin: 20px auto; }
.sil { height: 45px; background: #cbd5e0; border-radius: 3px; opacity: 0.5; }

/* FIX: Imagen final responsive */
#finalResult { 
    max-width: 100%; 
    height: auto; 
    display: block; 
    margin: 0 auto;
    border-radius: 0 0 12px 12px;
    border: 1px solid #ddd;
}
.result-container { width: 100%; overflow: hidden; }
