:root {
  color-scheme: dark;
  --bg: #080b12;
  --surface: rgba(18, 24, 38, 0.88);
  --surface-2: #161e2e;
  --border: rgba(148, 163, 184, 0.17);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #7c5cff;
  --accent-2: #20d7a7;
  --danger: #fb7185;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(124, 92, 255, 0.16), transparent 32%),
    radial-gradient(circle at 85% 65%, rgba(32, 215, 167, 0.1), transparent 30%),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.background-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.26;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.site-header {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--accent), #a78bfa);
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.35);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.status i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 16px var(--accent-2);
}

.layout {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  margin: 64px auto 100px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 1.05fr);
  gap: 56px;
  align-items: start;
}

.hero {
  padding-top: 55px;
}

.eyebrow,
.result-label {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.hero h1 {
  margin: 18px 0 20px;
  max-width: 650px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.feature-row span {
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.5);
  font-size: 12px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.uploader-card {
  padding: 18px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: rgba(8, 11, 18, 0.7);
}

.tab {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
}

.tab.active {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}

.dropzone {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  border: 1px dashed rgba(167, 139, 250, 0.5);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.075), rgba(124, 92, 255, 0.025));
  cursor: pointer;
  outline: none;
  transition: 0.2s ease;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.dragging {
  border-color: var(--accent);
  transform: translateY(-2px);
  background: rgba(124, 92, 255, 0.1);
}

.upload-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 18px;
  color: #c4b5fd;
  background: rgba(124, 92, 255, 0.13);
  border: 1px solid rgba(167, 139, 250, 0.2);
}

.upload-icon svg {
  width: 30px;
  height: 30px;
}

.dropzone strong {
  font-size: 17px;
}

.dropzone span,
.dropzone small {
  color: var(--muted);
}

.dropzone span {
  margin-top: 7px;
}

.dropzone small {
  margin-top: 16px;
  font-size: 11px;
}

.file-preview {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(8, 11, 18, 0.55);
}

.file-badge {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 12px;
  color: #ddd6fe;
  background: rgba(124, 92, 255, 0.16);
  font-size: 10px;
  font-weight: 900;
}

.file-meta {
  min-width: 0;
  flex: 1;
}

.file-meta strong,
.file-meta span {
  display: block;
}

.file-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.field {
  margin-top: 18px;
}

.field label,
.copy-field > span {
  display: block;
  margin-bottom: 9px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
}

select,
.copy-field input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: rgba(8, 11, 18, 0.72);
  outline: none;
}

select {
  padding: 13px 14px;
}

.notice {
  margin-top: 18px;
  padding: 13px 14px;
  border: 1px solid rgba(32, 215, 167, 0.18);
  border-radius: 12px;
  color: #a7f3d0;
  background: rgba(32, 215, 167, 0.07);
  font-size: 12px;
  line-height: 1.55;
}

.primary-button,
.secondary-button,
.danger-button {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.primary-button {
  margin-top: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #6d4aff);
  box-shadow: 0 12px 30px rgba(124, 92, 255, 0.26);
}

.primary-button svg {
  width: 19px;
  height: 19px;
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.progress-area {
  margin-top: 16px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(8, 11, 18, 0.8);
}

.progress-track div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.2s ease;
}

.form-message {
  min-height: 20px;
  margin: 13px 0 0;
  color: var(--danger);
  font-size: 12px;
  text-align: center;
}

.result-card {
  grid-column: 2;
  padding: 24px;
}

.success-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  float: right;
  border-radius: 50%;
  color: #052e25;
  background: var(--accent-2);
  font-weight: 900;
}

.result-card h2 {
  margin: 8px 0 22px;
  font-size: 20px;
  word-break: break-word;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.result-grid div {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(8, 11, 18, 0.45);
}

.result-grid span,
.result-grid strong {
  display: block;
}

.result-grid span {
  color: var(--muted);
  font-size: 11px;
}

.result-grid strong {
  margin-top: 5px;
  font-size: 13px;
}

.copy-field > div,
.delete-token-box > div {
  display: flex;
  gap: 8px;
}

.copy-field input {
  min-width: 0;
  padding: 12px;
  color: #cbd5e1;
}

.copy-field button,
.delete-token-box button {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 0 14px;
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
}

.delete-token-box {
  margin: 18px 0;
  color: var(--muted);
  font-size: 12px;
}

.delete-token-box summary {
  color: #cbd5e1;
  cursor: pointer;
  font-weight: 700;
}

.delete-token-box code {
  min-width: 0;
  flex: 1;
  overflow: auto;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: #ddd6fe;
  background: rgba(8, 11, 18, 0.7);
}

.secondary-button {
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(8, 11, 18, 0.65);
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.danger-button {
  color: #fecdd3;
  border: 1px solid rgba(251, 113, 133, 0.25);
  background: rgba(251, 113, 133, 0.08);
}

.danger-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 40px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

footer span:first-child {
  color: var(--text);
  font-weight: 800;
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .layout {
    margin-top: 20px;
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero {
    padding-top: 20px;
  }

  .hero h1 {
    font-size: clamp(42px, 12vw, 64px);
  }

  .result-card {
    grid-column: 1;
  }
}

@media (max-width: 520px) {
  .site-header,
  .layout,
  footer {
    width: min(100% - 24px, 1120px);
  }

  .status {
    display: none;
  }

  .layout {
    margin-bottom: 60px;
  }

  .card {
    border-radius: 20px;
  }

  .uploader-card {
    padding: 12px;
  }

  .dropzone {
    min-height: 220px;
  }

  .result-grid,
  .result-actions {
    grid-template-columns: 1fr;
  }

  footer {
    flex-direction: column;
  }
}
