:root {
  --gold: #d4af37;
  --gold-bright: #f2cf5b;
  --danger: #e0392b;
}

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

html, body { height: 100%; background: #000; }

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  position: relative;
  padding: 24px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(212,175,55,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,175,55,0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 75%);
  pointer-events: none;
}

.flag {
  width: clamp(80px, 10vw, 120px);
  aspect-ratio: 11 / 7;
  margin-bottom: clamp(16px, 3vw, 26px);
  box-shadow: 0 0 14px rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.15);
}

.wordmark {
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  line-height: 1.05;
  text-align: center;
  margin-bottom: clamp(24px, 4vw, 40px);
}

.wordmark .ftc { color: var(--gold); text-shadow: 0 0 30px rgba(212,175,55,0.35); }
.wordmark .rest { color: #ffffff; }

.card {
  width: 100%;
  max-width: 460px;
  background: rgba(255,255,255,0.03);
  border: 1.5px solid rgba(212,175,55,0.35);
  border-radius: 18px;
  padding: clamp(22px, 4vw, 34px);
  position: relative;
  z-index: 1;
}

.dropzone {
  border: 1.5px dashed rgba(212,175,55,0.6);
  border-radius: 14px;
  padding: 36px 20px;
  text-align: center;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.dropzone:hover, .dropzone.drag-over { background: rgba(212,175,55,0.07); border-color: var(--gold); }
.dropzone input[type=file] { display: none; }
.dropzone .dz-label { font-size: 0.95rem; font-weight: 600; color: #fff; margin-bottom: 4px; }
.dropzone .dz-hint { font-size: 0.8rem; color: rgba(255,255,255,0.45); }
.dropzone .dz-filename { margin-top: 12px; font-size: 0.85rem; color: var(--gold-bright); word-break: break-all; }

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  background: transparent;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  font-family: inherit;
}
.pill-btn:hover, .pill-btn:focus-visible { background: var(--gold); color: #000; box-shadow: 0 0 22px rgba(212,175,55,0.55); }
.pill-btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; background: transparent; color: var(--gold); }

.pill-btn.full { width: 100%; margin-top: 20px; padding: 14px 22px; }
.pill-btn.small { padding: 9px 14px; font-size: 0.78rem; }

.field {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(212,175,55,0.35);
  border-radius: 10px;
  padding: 13px 15px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}
.field:focus { border-color: var(--gold); }
.field::placeholder { color: rgba(255,255,255,0.35); }

.result-row { margin-top: 18px; }
.result-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 6px;
}
.result-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(212,175,55,0.3);
  border-radius: 10px;
  padding: 12px 14px;
}
.result-box span.value {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  color: var(--gold-bright);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
}

.msg { text-align: center; font-size: 0.85rem; margin-top: 16px; }
.msg.error { color: var(--danger); }
.msg.success { color: var(--gold-bright); }

.copied-tag {
  font-size: 0.7rem;
  color: var(--gold-bright);
  opacity: 0;
  transition: opacity 0.15s ease;
  margin-left: 4px;
}
.copied-tag.show { opacity: 1; }

.footer-link {
  margin-top: 22px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
}
.footer-link:hover { color: var(--gold); }

@media (max-width: 480px) {
  .result-box { flex-direction: column; align-items: stretch; }
}
