/* UI mobile-first seperti referensi: dark gradient + rounded card + tombol besar */

:root{
  --app-bg1:#0b1220;
  --app-bg2:#0a2a3a;
  --card:#101a2a;
  --card2:#0f1a2a;
  --muted:rgba(255,255,255,.65);
  --muted2:rgba(255,255,255,.5);
  --border:rgba(255,255,255,.08);
}

body.app-bg{
  min-height:100vh;
  background: radial-gradient(1200px 600px at 10% -10%, #1e4b7a 0%, rgba(30,75,122,0) 60%),
              radial-gradient(1000px 700px at 90% 10%, #6b2fd6 0%, rgba(107,47,214,0) 55%),
              linear-gradient(180deg, var(--app-bg1), var(--app-bg2));
  color:#fff;
}

.app-title{
  font-weight:800;
  letter-spacing:.2px;
  font-size:1.25rem;
}

.app-card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--border);
  border-radius: 22px;
  color:#fff;
  backdrop-filter: blur(8px);
}

.app-subcard{
  background: rgba(0,0,0,.22);
  border:1px solid var(--border);
  border-radius: 18px;
}

.badge-soft{
  background: rgba(255,255,255,.10);
  border:1px solid var(--border);
  color:#fff;
  border-radius: 999px;
  padding:.35rem .65rem;
  font-weight:600;
}

.camera-frame{
  background:#000;
  border-radius: 18px;
  border:1px solid var(--border);
  overflow:hidden;
}

.camera-frame video,
.camera-frame img{
  width:100%;
  height:auto;
  display:block;
}

.shutter-btn{
  width:86px;
  height:86px;
  border-radius:50%;
  border:10px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.95);
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}

.shutter-btn:active{
  transform: scale(.98);
}

.model-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:10px;
}

.model-btn{
  background: rgba(255,255,255,.07);
  border:1px solid var(--border);
  color:#fff;
  border-radius:14px;
  padding:10px 8px;
  text-align:center;
  font-size:.8rem;
  line-height:1.1;
}

.model-btn .bi{
  display:block;
  font-size:1.2rem;
  margin-bottom:6px;
  opacity:.9;
}

.model-btn.active{
  outline: 2px solid rgba(45,125,255,.9);
  background: rgba(45,125,255,.18);
}

.btn-gradient{
  border:0;
  background: linear-gradient(90deg, #2d7dff, #7a2cff);
  color:#fff;
  font-weight:800;
  border-radius:16px;
  padding:14px 16px;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
}

.btn-gradient:disabled{
  opacity:.6;
  box-shadow:none;
}

.footer-note{
  color: var(--muted2);
  font-size:.8rem;
  text-align:center;
}

.loading-overlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.55);
  z-index: 2000;
}
.loading-overlay.show{ display:flex; }

.preview-split{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}

.preview-card{
  position:relative;
  border-radius:18px;
  overflow:hidden;
  border:1px solid var(--border);
  background:#000;
}
.preview-card img{
  width:100%;
  height:100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display:block;
}
.preview-tag{
  position:absolute;
  left:10px;
  bottom:10px;
  background: rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,.12);
  color:#fff;
  font-weight:800;
  font-size:.75rem;
  padding:.35rem .55rem;
  border-radius:10px;
}
.preview-dl{
  position:absolute;
  top:10px;
  right:10px;
  width:36px;
  height:36px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.40);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}
.preview-dl:hover{ background: rgba(0,0,0,.55); }

@media (max-width: 360px){
  .model-grid{ grid-template-columns: repeat(3, 1fr); }
}

