/* ═══════════════════════════════════════════
   QR Wedding Gallery — Guest Upload Page
   Vypera Dark Elegance
   ═══════════════════════════════════════════ */

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

:root {
  --bg: #0a0a0a;
  --surface: #111;
  --surface-raised: #161513;
  --text: #e0d6c2;
  --muted: #8a7e6b;
  --gold: #C5A059;
  --gold-light: #d4b86a;
  --error: #c56a59;
  --radius: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  background: var(--bg);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: "Inter", sans-serif;
  background: radial-gradient(circle at top, rgba(197, 160, 89, 0.05), transparent 55%), var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.container {
  max-width: 420px;
  width: 100%;
  text-align: center;
  position: relative;
  animation: rise 0.6s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .container { animation: none; }
}

/* ── Watermark ───── */
.watermark {
  position: absolute;
  top: -2rem;
  right: 0;
  font-family: "Fraunces", serif;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: rgba(197, 160, 89, 0.2);
  pointer-events: none;
  user-select: none;
}

/* ── Event identity ─── */
.event-kicker {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--gold-light);
  opacity: 0.85;
  margin-bottom: 0.5rem;
}

.couple-names {
  font-family: "Jost", "Inter", sans-serif;
  font-weight: 200;
  font-size: clamp(2.1rem, 9vw, 3rem);
  letter-spacing: 0.02em;
  color: var(--gold);
  line-height: 1.1;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.couple-names .name { white-space: nowrap; }

.couple-names .amp {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 0.8em;
  color: var(--muted);
}

.event-date {
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.subtitle {
  font-weight: 300;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* ── Upload Area ──── */
.upload-area {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

/* Viewfinder corner marks, in place of a generic dashed drop-zone. */
.upload-area::before,
.upload-area::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1.5px solid rgba(197, 160, 89, 0.4);
  transition: border-color 0.3s var(--ease), width 0.3s var(--ease), height 0.3s var(--ease);
  pointer-events: none;
}
.upload-area::before {
  top: 14px;
  left: 14px;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: 6px;
}
.upload-area::after {
  bottom: 14px;
  right: 14px;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: 6px;
}

.upload-area:hover::before,
.upload-area:hover::after,
.upload-area:focus-within::before,
.upload-area:focus-within::after {
  border-color: rgba(197, 160, 89, 0.75);
}

.upload-area.drag-over::before,
.upload-area.drag-over::after {
  border-color: var(--gold);
  width: 28px;
  height: 28px;
}
.upload-area.drag-over {
  background: rgba(197, 160, 89, 0.06);
}

.file-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  cursor: pointer;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
  pointer-events: none;
  padding: 1rem;
  text-align: center;
}

.upload-placeholder .hint {
  font-size: 0.7rem;
  color: rgba(138, 126, 107, 0.7);
}

.camera-icon {
  width: 40px;
  height: 40px;
  stroke: var(--gold);
  opacity: 0.7;
  transition: transform 0.3s var(--ease);
}

.upload-area:hover .camera-icon {
  transform: scale(1.05);
}

.preview {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-preview {
  display: none;
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(10, 10, 10, 0.65);
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  backdrop-filter: blur(4px);
}

.upload-area.has-preview .remove-preview {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Upload Button ── */
.upload-btn {
  width: 100%;
  padding: 0.9rem;
  border-radius: var(--radius);
  background: var(--gold);
  color: #0a0a0a;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  transition: opacity 0.3s var(--ease), transform 0.2s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.upload-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.upload-btn:not(:disabled):hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.upload-btn:not(:disabled):active {
  transform: scale(0.98);
}

/* Spinner */
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(10, 10, 10, 0.25);
  border-top-color: #0a0a0a;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Status ─── */
.status {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.75rem;
  min-height: 1.2em;
}

.status.error { color: var(--error); }

/* ── Toast ─── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--surface-raised);
  border: 1px solid rgba(197, 160, 89, 0.3);
  color: var(--gold-light);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  transition: transform 0.4s var(--ease);
  z-index: 100;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}

.toast--visible {
  transform: translateX(-50%) translateY(0);
}
