:root {
  --black: #111111;
  --red: #7a0e11;
  --yellow: #e0a800;
  --card: #ffffff;
  --muted: #6e7687;
  --text: #1f2430;
  --accent: #d9a100;
  --accent-2: #ffb400;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", "Poppins", "Montserrat", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 200, 0, 0.25), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(255, 0, 0, 0.18), transparent 50%),
    linear-gradient(135deg, #1a0d0e 0%, #4c1012 35%, #a36d00 70%, #6f0f12 100%);
  position: relative;
  overflow-x: hidden;
}

.bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 200, 0, 0.4), transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(255, 0, 0, 0.25), transparent 55%),
    radial-gradient(circle at 60% 80%, rgba(255, 170, 0, 0.2), transparent 50%);
  filter: blur(18px);
  pointer-events: none;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 48px;
  color: #fff;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  letter-spacing: 0.12em;
}

.brand-mark {
  font-size: 38px;
  font-weight: 700;
}

.brand-sub {
  font-size: 12px;
  opacity: 0.75;
}

.lang {
  display: flex;
  gap: 10px;
}

.pill {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.pill.active {
  background: linear-gradient(135deg, #ffcf47, #ff7a00);
  color: #2a1600;
  border: none;
}

.shell {
  max-width: 1050px;
  margin: 40px auto 80px;
  padding: 0 24px;
  display: grid;
  gap: 28px;
}

.card {
  background: var(--card);
  padding: 34px 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hidden {
  display: none;
}

.reveal {
  animation: reveal 0.35s ease-out forwards;
}

h1 {
  margin: 0 0 10px;
  font-size: 28px;
}

.muted {
  color: var(--muted);
  margin: 0 0 24px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
}

input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e0e5ee;
  font-size: 14px;
  background: #f9fbff;
}

.btn {
  padding: 14px 22px;
  border-radius: 999px;
  background: #cfd7e3;
  border: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(120deg, #f6c438, #ff8700);
  color: #2b1c00;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status {
  margin-top: 12px;
  min-height: 20px;
  font-size: 14px;
}

.dropzone {
  display: block;
  border: 2px dashed #d5dde9;
  border-radius: 18px;
  padding: 40px;
  text-align: center;
  background: #f7f9fc;
  transition: border-color 0.2s ease, background 0.2s ease;
  margin-bottom: 18px;
}

.dropzone.dragover {
  border-color: var(--accent-2);
  background: #fff6dc;
}

.dropzone-inner .icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.dropzone-inner .title {
  font-weight: 700;
  margin-bottom: 4px;
}

.dropzone-inner .subtitle {
  color: var(--muted);
  font-size: 14px;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.file-name {
  color: var(--muted);
  font-size: 14px;
}

.response {
  margin-top: 24px;
  background: linear-gradient(135deg, rgba(16, 19, 27, 0.92), rgba(35, 24, 20, 0.9));
  color: #f1f4f9;
  border-radius: 16px;
  padding: 18px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.response-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.result-amount {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.result-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.65);
}

.result-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.02em;
  user-select: all;
  cursor: text;
}

.result-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.copy-btn {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  font-size: 12px;
}

.copy-btn:active {
  transform: translateY(1px);
}

.copy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.result-value.error {
  color: #ffb4b4;
}

.result-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 13px;
}

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

.footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  padding-bottom: 30px;
}

@media (max-width: 700px) {
  .topbar {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .card {
    padding: 26px;
  }

  .file-row {
    flex-direction: column;
    align-items: stretch;
  }
}
