/* DBTI — dipper.com design language */

@font-face {
  font-family: 'Greed';
  src: url('https://www.dipper.com/_next/static/media/GreedStandard_Regular-s.p.87cb63e9.woff2') format('woff2');
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Greed';
  src: url('https://www.dipper.com/_next/static/media/GreedStandard_Medium-s.p.ab44878b.woff2') format('woff2');
  font-display: swap;
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'Greed';
  src: url('https://www.dipper.com/_next/static/media/GreedStandard_SemiBold-s.p.95c26464.woff2') format('woff2');
  font-display: swap;
  font-weight: 600;
  font-style: normal;
}

:root {
  --bg: #000;
  --surface: rgba(255,255,255,0.05);
  --surface-2: rgba(255,255,255,0.08);
  --text: #fff;
  --text-muted: rgba(255,255,255,0.55);
  --border: rgba(255,255,255,0.12);
  --radius: 12px;
  --max-w: 480px;
}

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

body {
  font-family: 'Greed', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  padding: 24px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Landing */
.landing {
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 20px;
  min-height: 100dvh;
}
.landing h1 {
  font-size: 48px;
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -1.5px;
}
.landing .subtitle {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.2px;
}
.landing .badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 999px;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
  text-decoration: none;
  letter-spacing: -0.3px;
}
.btn:hover { transform: translateY(-1px); opacity: 0.9; }
.btn:active { transform: scale(0.97); }
.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text);
}
.btn-secondary:hover { background: rgba(255,255,255,0.05); }
.btn-small { padding: 10px 24px; font-size: 14px; }
.btn-primary {
  background: #fff;
  color: #000;
}

/* Quiz */
.quiz-container {
  justify-content: center;
  min-height: 100dvh;
  gap: 20px;
}
.progress-bar {
  display: flex;
  gap: 6px;
  padding: 0 4px;
}
.progress-dot {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--surface-2);
  transition: background 0.3s;
}
.progress-dot.done { background: rgba(255,255,255,0.6); }
.progress-dot.active { background: #fff; }

.question-card {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}
.question-number {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-muted);
  font-weight: 500;
}
.question-text {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.3px;
}
.upload-area {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.upload-area:hover, .upload-area.dragover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.03);
}
.upload-area.has-file {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.03);
}
.upload-icon {
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.7;
}
.upload-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.upload-hint {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.5;
  margin-top: 6px;
}

.btn-link {
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 4px 0;
}
.btn-link:hover { color: rgba(255,255,255,0.8); }

.rarity-badge {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  margin-top: 8px;
  letter-spacing: -0.2px;
}

.preview-container {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.preview-container.visible { display: flex; }
.preview-thumb {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.preview-thumb-video {
  width: 200px;
  height: auto;
  max-height: 200px;
  border-radius: var(--radius);
}

.reaction {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  min-height: 20px;
}

.upload-progress {
  width: 100%;
  max-width: 240px;
  height: 3px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
  display: none;
}
.upload-progress.visible { display: block; margin: 0 auto; }
.upload-progress-bar {
  height: 100%;
  background: #fff;
  width: 0%;
  transition: width 0.3s;
}

.nav-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Loading */
.loading-container {
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 28px;
  min-height: 100dvh;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 2px solid var(--surface-2);
  border-top: 2px solid rgba(255,255,255,0.6);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-message {
  font-size: 15px;
  color: var(--text-muted);
  min-height: 48px;
  transition: opacity 0.3s;
  line-height: 1.5;
}
.loading-title {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.3px;
}

/* Result */
.result-container {
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 40px;
}
.result-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.result-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
.result-subtitle {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}
.video-loading-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}
.video-loading-copy {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  max-width: 320px;
  margin: 0 auto;
}
.result-video {
  width: 100%;
  border-radius: var(--radius);
  background: #000;
  aspect-ratio: 9/16;
  max-height: 70vh;
}
.type-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  border: 1px solid var(--border);
}
.type-code {
  font-size: 48px;
  font-weight: 600;
  letter-spacing: 4px;
  margin-bottom: 4px;
}
.type-name {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.type-rarity {
  margin-bottom: 8px;
}
.type-tagline {
  font-size: 15px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
}
.cta-section {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}
.cta-text {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 14px;
  letter-spacing: -0.3px;
}
.cta-btn {
  width: 100%;
  font-size: 18px;
  padding: 16px 40px;
}

/* Dipper branding */
.dipper-branding {
  text-align: center;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.dipper-made-with {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-muted);
  font-weight: 500;
}
.dipper-logo {
  height: 24px;
  opacity: 0.8;
}
.dipper-tagline {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Error */
.error-message {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  padding: 16px;
  border-radius: var(--radius);
  text-align: center;
  font-size: 14px;
}

.upload-error {
  color: rgba(255,120,120,0.9);
  font-size: 13px;
  padding: 8px 16px;
  background: rgba(255,120,120,0.08);
  border-radius: 8px;
  text-align: center;
}

.hidden { display: none !important; }
