/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1F2937;
  background: #FFFFFF;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* === Variables === */
:root {
  --primary: #7C5CFC;
  --primary-light: #A78BFA;
  --primary-soft: #EDE9FE;
  --primary-dark: #5B3FD6;
  --primary-bg: #F5F3FF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --success: #22C55E;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary-soft); }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: var(--gray-50); }
.btn-outline-white { background: transparent; border: 2px solid rgba(255,255,255,0.4); color: #fff; }
.btn-outline-white:hover { background: rgba(255,255,255,0.1); }
.btn-arrow { font-size: 18px; }

/* === Nav === */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 8px; }
.nav-icon { font-size: 20px; color: var(--primary); }
.nav-name { font-size: 20px; font-weight: 800; color: var(--gray-900); }
.nav-cta {
  padding: 8px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--primary-dark); }

/* === Hero === */
.hero {
  padding: 120px 24px 80px;
  text-align: center;
  background: linear-gradient(180deg, var(--primary-bg) 0%, #fff 100%);
}
.hero-content { max-width: 700px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--gray-900);
}
.hero-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, #EC4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 18px;
  color: var(--gray-500);
  max-width: 540px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.stat { text-align: center; }
.stat-number { display: block; font-size: 24px; font-weight: 800; color: var(--gray-900); }
.stat-label { font-size: 13px; color: var(--gray-400); }
.stat-divider { width: 1px; height: 32px; background: var(--gray-200); }

/* === Sections === */
.section-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.section-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: 12px;
}
.section-desc { font-size: 17px; color: var(--gray-500); max-width: 560px; margin: 0 auto; }

/* === Features === */
.features { padding: 80px 0; background: var(--gray-50); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 32px;
  border: 1px solid var(--gray-100);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}
.feature-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
}
.feature-card h3 {
  font-size: 18px; font-weight: 700;
  margin-bottom: 8px; color: var(--gray-900);
}
.feature-card p { font-size: 15px; color: var(--gray-500); line-height: 1.6; }

/* === How It Works === */
.how-it-works { padding: 80px 0; }
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
}
.step {
  flex: 1;
  max-width: 280px;
  text-align: center;
}
.step-number {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 20px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.step h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--gray-900); }
.step p { font-size: 15px; color: var(--gray-500); line-height: 1.6; }
.step-arrow,
.step-connector svg {
  color: var(--gray-300);
  flex-shrink: 0;
}

/* === QR Feature === */
.qr-feature { padding: 80px 0; background: var(--gray-50); }
.qr-content { max-width: 600px; }
.qr-benefits { margin-top: 24px; }
.qr-benefit {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px; font-size: 16px; color: var(--gray-700);
}
.benefit-check {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #D1FAE5;
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}

/* === CTA === */
.cta { padding: 80px 0; }
.cta-card {
  background: linear-gradient(135deg, var(--primary) 0%, #5B3FD6 50%, #4C1D95 100%);
  border-radius: var(--radius-2xl);
  padding: 64px 48px;
  text-align: center;
  color: #fff;
}
.cta-card h2 { font-size: 32px; font-weight: 800; margin-bottom: 12px; }
.cta-card p { font-size: 17px; opacity: 0.85; margin-bottom: 32px; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.cta-note { font-size: 13px; opacity: 0.6; }

/* === Footer === */
.footer {
  border-top: 1px solid var(--gray-100);
  padding: 24px 0;
}
.footer-copy { font-size: 13px; color: var(--gray-400); }

/* === Mobile === */
@media (max-width: 768px) {
  .hero-title { font-size: 32px; }
  .hero-desc { font-size: 16px; }
  .section-title { font-size: 28px; }
  .features-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); }
  .cta-card { padding: 40px 24px; }
  .cta-card h2 { font-size: 24px; }
  .hero-stats { gap: 20px; }
  .stat-number { font-size: 20px; }
}

/* ======================= */
/* === Event Page === */
/* ======================= */
.event-page { min-height: 100vh; background: var(--gray-50); }
.event-header {
  background: var(--primary);
  color: #fff;
  padding: 80px 24px 32px;
}
.event-header-inner {
  max-width: 700px;
  margin: 0 auto;
}
.event-header .nav-brand .nav-name { color: #fff; }
.event-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  opacity: 0.85;
}
.event-meta-item { display: flex; align-items: center; gap: 6px; }

.event-body {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px;
}

/* Upload area */
.upload-area {
  background: #fff;
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 32px;
  text-align: center;
  margin-bottom: 32px;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-bg);
}
.upload-icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.upload-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}
.upload-desc {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 16px;
}
.upload-btn {
  display: inline-flex;
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.upload-btn:hover { background: var(--primary-dark); }

.upload-progress {
  margin-top: 16px;
  display: none;
}
.upload-progress.active { display: block; }
.progress-bar {
  height: 6px;
  background: var(--gray-100);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s;
}
.progress-text {
  font-size: 13px;
  color: var(--gray-500);
  text-align: center;
}

.upload-success {
  display: none;
  text-align: center;
  padding: 16px;
}
.upload-success.active { display: block; }
.upload-success-icon { font-size: 32px; margin-bottom: 8px; }
.upload-success-text { font-size: 15px; font-weight: 600; color: var(--success); }

/* Gallery */
.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.gallery-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
}
.gallery-count {
  font-size: 13px;
  color: var(--gray-400);
  font-weight: 500;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--gray-100);
  position: relative;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 8px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  color: #fff;
}
.gallery-uploader {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
}

.gallery-empty {
  text-align: center;
  padding: 48px 24px;
  background: #fff;
  border-radius: var(--radius-xl);
}
.gallery-empty-icon { font-size: 48px; margin-bottom: 12px; }
.gallery-empty-text { font-size: 16px; font-weight: 600; color: var(--gray-700); margin-bottom: 4px; }
.gallery-empty-desc { font-size: 14px; color: var(--gray-400); }

/* Loading */
.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  flex-direction: column;
  gap: 16px;
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 14px; color: var(--gray-400); }

/* Name prompt */
.name-prompt {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--gray-100);
}
.name-prompt label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.name-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.name-input:focus { border-color: var(--primary); }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: var(--radius-md);
  object-fit: contain;
}

/* Powered by */
.powered-by {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: var(--gray-400);
}
.powered-by a { color: var(--primary); font-weight: 600; }

@media (min-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
