/* Copyright (c) 2025, Williams.Wang. All rights reserved. Use restricted under LICENSE terms. */
:root {
  --bg: #0b1220;
  --fg: #e5e7eb;
  --muted: #9ca3af;
  --accent: #60a5fa;
  --panel: #111827;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--fg);
}

.app-header {
  padding: 16px 20px;
  border-bottom: 1px solid #1f2937;
}

.app-header h1 {
  margin: 0 0 4px 0;
  font-size: 20px;
}

.app-header .sub-title {
  color: var(--muted);
  font-size: 13px;
}

/* 版权横幅 */
.copyright-banner {
  padding: 8px 20px;
  background: #0f172a;
  border-bottom: 1px solid #1f2937;
  font-size: 12px;
  color: var(--muted);
}
.light .copyright-banner {
  background: #ffffff;
  border-bottom-color: #e5e7eb;
  color: #6b7280;
}

.controls {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px 16px;
  padding: 12px 20px;
  background: var(--panel);
  border-bottom: 1px solid #1f2937;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-group label {
  font-size: 12px;
  color: var(--muted);
}

.control-group input[type="range"] {
  width: 100%;
}

.control-group output {
  font-size: 12px;
}

.inline-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  grid-column: 1 / -1; /* 横跨整行 */
}

button {
  background: #111827;
  color: var(--fg);
  border: 1px solid #374151;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
}

button:hover {
  border-color: var(--accent);
}

.tabs {
  padding: 12px 20px;
}

.tab-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab-btn {
  background: #0f172a;
  border: 1px solid #1f2937;
}

.tab-btn.active {
  border-color: var(--accent);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

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

.plot {
  min-height: 360px;
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 8px;
}

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.self-check {
  padding: 12px 20px;
}

.selfcheck-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.app-footer {
  padding: 12px 20px 24px 20px;
  color: var(--muted);
  font-size: 12px;
}

/* Light theme support */
.light {
  --bg: #f7f8fa;
  --fg: #0b1220;
  --muted: #6b7280;
  --accent: #2563eb;
  --panel: #ffffff;
}

/* Modal */
.modal.hidden { display: none; }
.modal { position: fixed; inset: 0; z-index: 1000; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.modal-content {
  position: relative;
  max-width: 720px;
  margin: 8vh auto;
  background: var(--panel);
  border: 1px solid #1f2937;
  border-radius: 10px;
  overflow: hidden;
  color: var(--fg);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #1f2937; }
.modal-header h2 { margin: 0; font-size: 16px; }
.modal-close { background: transparent; border: none; color: var(--fg); font-size: 18px; cursor: pointer; }
.modal-body { padding: 12px 16px; font-size: 14px; }
.modal-body ul { margin: 0; padding-left: 18px; }
.modal-body li { margin: 6px 0; line-height: 1.5; }
.modal-footer { display: flex; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid #1f2937; }
.modal-primary { background: #2563eb; color: white; border: none; border-radius: 6px; padding: 8px 12px; cursor: pointer; }


