:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  background: #0f172a;
  color: #e2e8f0;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px;
}

.card {
  background: #111827;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  margin-bottom: 20px;
}

h1, h2 {
  margin-top: 0;
}

.subtitle {
  color: #94a3b8;
  margin-bottom: 20px;
}

label {
  display: block;
  margin: 12px 0 8px;
  font-weight: 600;
}

input,
select,
button {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid #475569;
  background: #0f172a;
  color: #e2e8f0;
  padding: 10px 12px;
  font-size: 14px;
}

select {
  min-height: 320px;
}

button {
  cursor: pointer;
  background: #2563eb;
  border: none;
  font-weight: 700;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.actions button {
  width: auto;
  min-width: 160px;
}

.status-text {
  color: #93c5fd;
}

.status-text.error {
  color: #fca5a5;
}

.hidden {
  display: none;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 20px;
}

.qr-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qr-panel img {
  width: 100%;
  background: #fff;
  border-radius: 12px;
}

.qr-panel a {
  color: #93c5fd;
  text-decoration: none;
}

.meta-list {
  margin: 0 0 16px;
}

.meta-list > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #334155;
}

.meta-list dt {
  color: #94a3b8;
}

.meta-list dd {
  margin: 0;
  word-break: break-all;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #020617;
  border-radius: 12px;
  padding: 12px;
  overflow-x: auto;
}

@media (max-width: 900px) {
  .result-layout {
    grid-template-columns: 1fr;
  }

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

  .actions button {
    width: 100%;
  }
}
