:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #687386;
  --line: #dce3ee;
  --accent: #1570ef;
  --accent-strong: #0b5bd3;
  --accent-soft: #eef6ff;
  --teal: #13a58a;
  --ok: #13845b;
  --warn: #b54708;
  --shadow: 0 18px 46px rgba(23, 32, 51, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(21, 112, 239, 0.12), transparent 30%),
    radial-gradient(circle at 82% 10%, rgba(19, 165, 138, 0.13), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #eef3f8 100%),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

.app {
  width: min(1100px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 0 26px;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  padding: 6px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #172033 0%, #203b63 100%);
  color: #fff;
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.22);
}

.logo-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.brand h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: 0;
}

.brand p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.panel[data-uploader="json"] {
  order: 1;
}

.panel[data-uploader="logo"] {
  order: 2;
}

.panel[data-uploader="video"] {
  order: 3;
  grid-column: 1 / -1;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.panel::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--teal));
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.panel h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}

.panel small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.dropzone {
  display: grid;
  min-height: 226px;
  place-items: center;
  margin: 20px;
  border: 1.5px dashed #aebbd0;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(245, 249, 255, 0.92)),
    #f9fbfe;
  text-align: center;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.dropzone:hover {
  border-color: #7fa8df;
  box-shadow: inset 0 0 0 1px rgba(21, 112, 239, 0.08);
}

.dropzone.is-dragging {
  border-color: var(--accent);
  background: #eef5ff;
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(21, 112, 239, 0.18);
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-inner {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 28px 18px;
}

.choose-button,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #1485e8);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 9px 14px;
  box-shadow: 0 10px 22px rgba(21, 112, 239, 0.25);
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.choose-button:hover,
.copy-button:hover {
  background: linear-gradient(135deg, var(--accent-strong), #0875d6);
  box-shadow: 0 12px 26px rgba(21, 112, 239, 0.3);
}

.choose-button:active,
.copy-button:active {
  transform: translateY(1px);
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.result {
  display: grid;
  gap: 12px;
  padding: 0 20px 20px;
}

.result-row {
  display: grid;
  gap: 8px;
}

.result-row label {
  color: var(--muted);
  font-size: 13px;
}

.copy-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.copy-line input {
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faff;
  color: var(--ink);
  padding: 0 11px;
}

.copy-button {
  min-width: 92px;
  padding: 9px 12px;
}

.message {
  min-height: 22px;
  margin: 0 20px 18px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.message.ok {
  color: var(--ok);
}

.message.warn {
  color: var(--warn);
}

.preview {
  display: none;
  overflow: hidden;
  margin: 0 20px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101828;
}

.preview.is-visible {
  display: block;
}

.preview video,
.preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.file-preview {
  display: grid;
  gap: 8px;
  padding: 22px;
  color: #fff;
  word-break: break-all;
}

.file-preview strong {
  font-size: 16px;
}

.file-preview span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.6;
}

.site-footer {
  margin-top: auto;
  padding-top: 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

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

  .app {
    width: min(100% - 22px, 1100px);
    padding-top: 22px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .copy-line {
    grid-template-columns: 1fr;
  }

  .copy-button {
    width: 100%;
  }
}
