*{box-sizing:border-box}body{font-family:Inter,system-ui,Segoe UI,Roboto,Arial,sans-serif;margin:0;background:#f6f8fa;color:#111} 
.container{max-width:1200px;margin:28px auto;padding:20px;}

/* Top Section Layout */
.top-section { display: flex; gap: 20px; margin-bottom: 20px; justify-content: center; flex-wrap: wrap; }
.card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); padding: 20px; display: flex; flex-direction: column; }
.card h2 { margin: 0 0 15px; font-size: 16px; font-weight: bold; color: #333; }

/* Camera & Preview Combined Area */
.combined-content { display: flex; gap: 20px; align-items: center; justify-content: center; }
.media-frame { width: 480px; aspect-ratio: 4/3; background: #000; border-radius: 4px; overflow: hidden; display: flex; align-items: center; justify-content: center; position: relative; }
video, #previewImg { width: 100%; height: 100%; object-fit: cover; display: block; }
.overlay { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(0,0,0,0.5); }

/* Vertical Controls */
.controls-vertical { display: flex; flex-direction: column; gap: 10px; width: 120px; flex-shrink: 0; }
.btn { padding: 10px; border-radius: 4px; border: 1px solid #e0e0e0; background: #fff; color: #333; cursor: pointer; text-align: center; font-size: 14px; width: 100%; text-decoration: none; display: block; box-sizing: border-box; transition: all 0.2s; }
select.btn { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 30px; }
.btn:hover:not(:disabled) { background: #f5f5f5; border-color: #ccc; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; color: #999; }
.btn-primary { background: #fff; border: 1px solid #e0e0e0; } /* Unified style as requested */
#transformBtn { margin-top: auto; border-width: 2px; font-weight: bold; }

/* Progress Bar */
#progressContainer { margin: 20px 0; background: #e9ecef; border-radius: 4px; height: 24px; position: relative; overflow: hidden; }
#progressBar { background: #007bff; height: 100%; width: 0%; transition: width 0.3s ease; }
#progressText { position: absolute; width: 100%; text-align: center; top: 0; line-height: 24px; font-size: 12px; color: #333; font-weight: bold; }

/* Results Area */
.results-area { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.results-area h2 { margin: 0 0 20px; font-size: 18px; }
.results-grid { display: flex; gap: 20px; }
.result-card { flex: 1; border: 1px solid #eee; border-radius: 8px; padding: 15px; text-align: center; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.result-card h3 { margin: 0 0 15px; font-size: 16px; color: #333; }
.img-wrapper { width: 100%; aspect-ratio: 4/3; background: #f8f9fa; margin-bottom: 15px; border-radius: 4px; overflow: hidden; display: flex; align-items: center; justify-content: center; position: relative; }
.img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.download-btn { display: inline-block; padding: 8px 24px; background: #0b5cff; color: #fff; text-decoration: none; border-radius: 4px; font-size: 14px; cursor: pointer; border: none; }
.download-btn:hover { background: #0046d5; }

.qr-code { display: flex; justify-content: center; align-items: center; }
.qr-code img { max-width: 80px; border: 1px solid #eee; padding: 2px; background: #fff; }
.overlay-qr { position: absolute; bottom: 5px; right: 5px; z-index: 10; }

.hidden { display: none !important; }
.notes { margin-top: 20px; color: #666; font-size: 13px; text-align: center; }

/* Responsive */
@media (max-width: 1050px) {
  .combined-content { flex-direction: column; }
  .controls-vertical { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .controls-vertical button, .controls-vertical a { flex: 1; }
  .media-frame { width: 100%; max-width: 480px; }
  .results-grid { flex-direction: column; }
}
