@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400&display=swap");

:root {
  --bg-primary: #0f1015;
  --bg-surface: #181920;
  --bg-surface-elevated: #22242e;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(212, 175, 55, 0.5);

  --accent-gold: #d4af37;
  --accent-gold-hover: #e5c158;
  --accent-rose: #e07a86;
  --accent-gradient: linear-gradient(135deg, #d4af37 0%, #e07a86 100%);
  --accent-gradient-glow: rgba(212, 175, 55, 0.15);

  --text-primary: #ffffff;
  --text-secondary: #a0a3b1;
  --text-tertiary: #686b7c;

  --success: #10b981;
  --danger: #ef4444;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow-card: 0 12px 32px -4px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.2);

  /* Aliases used by the admin, gallery and landing pages */
  --gold-start: var(--accent-gold);
  --gold-end: var(--accent-gold-hover);
  --gold-glow: var(--accent-gradient-glow);
  --dark-bg: var(--bg-primary);
  --surface-card: var(--bg-surface);
  --surface-translucent: rgba(255, 255, 255, 0.05);
  --border-glass: rgba(255, 255, 255, 0.1);
  --radius-pill: var(--radius-full);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Background atmospheric glow */
.ambient-glow {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-gradient-glow) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

/* Container */
.guest-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  padding: 24px 20px 48px;
  display: flex;
  flex-direction: column;
}

/* Event Header */
.event-header {
  text-align: center;
  margin-bottom: 24px;
}

.event-monogram {
  min-width: 56px;
  width: fit-content;
  height: 56px;
  padding: 0 12px;
  white-space: nowrap;
  margin: 0 auto 16px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-gold);
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.15);
}

.event-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.event-date {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.event-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 380px;
  margin: 0 auto;
}

/* Upload Card */
.upload-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Dual Button Trigger */
.picker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.picker-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 12px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.picker-btn:hover,
.picker-btn:active {
  border-color: var(--border-focus);
  background: rgba(212, 175, 55, 0.08);
  transform: translateY(-2px);
}

.picker-btn svg {
  width: 28px;
  height: 28px;
  stroke: var(--accent-gold);
}

/* Selected Items Tray */
.staged-tray {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.staged-tray.active {
  display: flex;
}

.staged-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.staged-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 2px;
}

.staged-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
}

.staged-thumb img,
.staged-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.staged-thumb .video-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
}

.staged-thumb .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.8);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Input Fields */
.guest-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-field {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.input-field:focus {
  border-color: var(--accent-gold);
}

.input-field::placeholder {
  color: var(--text-tertiary);
}

/* Primary Action Button */
.submit-btn {
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-full);
  padding: 16px 24px;
  color: #121216;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
  transition: all 0.2s ease;
}

.submit-btn:hover:not(:disabled) {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.4);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* Progress bar */
.progress-container {
  display: none;
  flex-direction: column;
  gap: 8px;
}

.progress-container.active {
  display: flex;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width 0.2s ease;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

/* Success Card */
.success-card {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 32px 20px;
}

.success-card.active {
  display: flex;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.success-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
}

.success-msg {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 340px;
}

.reset-btn {
  margin-top: 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 12px 24px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reset-btn:hover {
  border-color: var(--accent-gold);
}

/* Footer */
.guest-footer {
  margin-top: auto;
  padding-top: 32px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.guest-footer a {
  color: var(--accent-gold);
  text-decoration: none;
}
