:root {
  --navy: #071a3d;
  --navy-2: #0d2b5c;
  --gold: #d6aa4b;
  --gold-light: #f5dc92;
  --white: #ffffff;
  --cream: #fff8e8;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at top left, rgba(245,220,146,.24), transparent 34%), linear-gradient(135deg, #020611 0%, var(--navy) 52%, #020611 100%);
  color: var(--white);
}
.app { width: min(1100px, 100%); margin: auto; padding: 14px; }
.hero { text-align: center; margin: 8px 0 14px; }
.brand-badge { display: inline-block; padding: 8px 16px; border: 1px solid rgba(245,220,146,.8); border-radius: 999px; color: var(--gold-light); font-size: 12px; letter-spacing: 1.4px; }
h1 { margin: 12px 0 4px; font-size: clamp(28px, 7vw, 48px); color: var(--gold-light); line-height: 1.05; }
.hero p { margin: 0; color: #f7edcf; }
.photobooth-card { background: rgba(255,255,255,.08); border: 1px solid rgba(245,220,146,.35); border-radius: 26px; padding: 14px; box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.filter-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 14px; }
.filter-option { border: 1px solid rgba(245,220,146,.35); background: rgba(255,255,255,.09); color: var(--cream); border-radius: 18px; padding: 8px; cursor: pointer; font-weight: 700; }
.filter-option img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; display: block; background: #000; margin-bottom: 7px; }
.filter-option.active { border: 3px solid var(--gold-light); background: rgba(214,170,75,.18); color: var(--gold-light); }
.camera-wrap { position: relative; width: 100%; max-height: 74vh; margin: auto; overflow: hidden; border-radius: 22px; border: 4px solid var(--gold); background: #000; }
.camera-wrap.portrait { max-width: min(640px, 100%); aspect-ratio: 1086 / 1448; }
.camera-wrap.landscape { max-width: min(1000px, 100%); aspect-ratio: 1448 / 1086; }
video, canvas, #resultImage { width: 100%; height: 100%; object-fit: cover; display: block; }
video.user-camera { transform: scaleX(-1); }
video.front-wide { object-fit: contain; background: #000; }
.overlay-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; z-index: 2; }
.empty-camera { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: rgba(255,248,232,.8); font-weight: 700; letter-spacing: .5px; background: radial-gradient(circle, rgba(255,255,255,.08), rgba(0,0,0,.4)); z-index: 1; }
.camera-on .empty-camera { display: none; }
.controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.btn { border: none; border-radius: 16px; padding: 13px 10px; font-weight: 800; text-align: center; text-decoration: none; cursor: pointer; font-size: 14px; }
.btn.primary { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #1a1202; }
.btn.secondary { background: rgba(255,255,255,.12); color: var(--white); border: 1px solid rgba(245,220,146,.4); }
.btn.whatsapp { background: linear-gradient(135deg, #35d56d, #128c4a); color: #ffffff; }
.btn.instagram { background: linear-gradient(135deg, #f9ce34, #ee2a7b 55%, #6228d7); color: #ffffff; }
.status { text-align: center; color: #f7edcf; font-size: 13px; margin-bottom: 0; }
.result { margin-top: 18px; text-align: center; }
.result h2 { color: var(--gold-light); }
.result img { border-radius: 20px; border: 3px solid var(--gold); max-height: 70vh; max-width: 100%; object-fit: contain; background: #000; }
.small-controls { grid-template-columns: 1fr 1fr; }
.result-controls { grid-template-columns: repeat(4, 1fr); }
.share-note { margin: 10px auto 0; max-width: 760px; color: #f7edcf; font-size: 12px; line-height: 1.5; }
.hidden { display: none !important; }
footer { text-align: center; color: rgba(255,255,255,.65); font-size: 12px; margin: 18px 0 6px; }
@media (max-width: 760px) { .filter-picker { grid-template-columns: repeat(3, 1fr); } .result-controls { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .app { padding: 10px; }
  .photobooth-card { padding: 10px; border-radius: 20px; }
  .filter-picker { grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .filter-option { padding: 5px; border-radius: 13px; font-size: 11px; }
  .filter-option img { border-radius: 9px; }
  .controls { grid-template-columns: 1fr; }
  .small-controls { grid-template-columns: 1fr; }
  .result-controls { grid-template-columns: 1fr; }
}
