:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface-2: #243044;
  --border: #2d3f56;
  --text: #e8edf4;
  --text-muted: #8b9cb3;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #22c55e;
  --error: #ef4444;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.hero {
  background: linear-gradient(160deg, #1e3a5f 0%, #0f1419 55%);
  border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem 2.5rem;
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
}

.highlight {
  color: #60a5fa;
}

.subtitle {
  margin: 0 0 2rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.feature {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.feature-icon {
  font-size: 1.5rem;
}

.feature strong {
  display: block;
  font-size: 0.95rem;
}

.feature span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.panel-title {
  margin: 0 0 1.25rem;
  font-size: 1.15rem;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}

.dropzone-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.dropzone h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.dropzone > p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.parse-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.parse-list li::before {
  content: "✓ ";
  color: var(--success);
}

.file-name {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--surface-2);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--accent);
  display: inline-block;
}

.error {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid var(--error);
  border-radius: 8px;
  color: #fca5a5;
  font-size: 0.9rem;
}

.placeholder {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.placeholder p {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.placeholder span {
  font-size: 0.85rem;
}

.results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.result-group {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.result-group-title {
  margin: 0;
  padding: 0.6rem 1rem;
  background: var(--surface-2);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.result-row {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
}

.result-row:first-of-type {
  border-top: none;
}

.result-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-top: 0.15rem;
}

.result-value {
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 0.82rem;
  word-break: break-all;
  white-space: pre-wrap;
  line-height: 1.5;
}

.result-value.multiline {
  max-height: 200px;
  overflow-y: auto;
}

.btn-copy {
  flex-shrink: 0;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-copy:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn-copy.copied {
  background: var(--success);
  border-color: var(--success);
}

.info-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.info-grid {
  display: grid;
  gap: 1rem;
}

.info-grid article {
  padding: 1rem;
  background: var(--surface-2);
  border-radius: 8px;
}

.info-grid h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.info-grid p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.info-grid code {
  font-size: 0.8em;
  background: var(--bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
  .result-row {
    grid-template-columns: 1fr;
  }

  .btn-copy {
    justify-self: start;
  }
}
