:root {
  --bg: #0b0f14;
  --panel: #121821;
  --muted: #8892a6;
  --text: #e6edf3;
  --accent: #6aa4ff;
  --accent-2: #00d0a3;
  --danger: #ff6a6a;
  --warning: #ffcc66;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.app-header,
.app-footer {
  background: var(--panel);
  border-bottom: 1px solid #1f2733;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-footer {
  border-top: 1px solid #1f2733;
  border-bottom: none;
  bottom: 0;
  top: auto;
}

.modes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  padding: 16px;
}

.sidebar {
  background: var(--panel);
  border: 1px solid #1f2733;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: calc(100vh - 140px);
  position: sticky;
  top: 76px;
  overflow: auto;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card {
  background: var(--panel);
  border: 1px solid #1f2733;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #1f2733;
}

.card-body {
  padding: 0 16px 16px;
}

.card-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px 16px;
  border-top: 1px solid #1f2733;
}

.editor {
  width: 100%;
  min-height: 320px;
  background: #0e1420;
  color: var(--text);
  border: 1px solid #1f2733;
  border-radius: 12px;
  padding: 14px;
  line-height: 1.55;
  resize: vertical;
  font-size: 16px;
}

.btn {
  background: #1a2331;
  color: var(--text);
  border: 1px solid #263247;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.btn:hover {
  border-color: #375072;
}

.btn.primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #04121a;
  border: none;
}

.timer {
  font-size: 24px;
}

.small {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 8px;
}

.tag {
  background: #1b2434;
  color: var(--muted);
  border: 1px solid #2a3850;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}

.assist {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.assist .issue {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #0e1420;
  border: 1px solid #1f2733;
  border-radius: 10px;
  padding: 8px;
}

.issue mark {
  background: #3a2d00;
  color: #ffd880;
  border-radius: 4px;
  padding: 0 4px;
}

.hidden {
  display: none;
}

.results {
  margin-top: 16px;
}

.results .score {
  font-size: 22px;
  margin-bottom: 8px;
}

.results .row {
  background: #0e1420;
  border: 1px solid #1f2733;
  border-radius: 10px;
  padding: 10px;
  margin: 8px 0;
}

.results .ok {
  border-color: #194d2a;
}

.results .bad {
  border-color: #5a1e1e;
}

.weights-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.input {
  width: 80px;
  background: #0e1420;
  border: 1px solid #1f2733;
  border-radius: 6px;
  color: var(--text);
  padding: 6px;
}

.article-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #1f2733;
  border-radius: 10px;
  padding: 8px;
}

.article-item button {
  padding: 6px 8px;
}

.highlight-locate {
  background: rgba(255, 204, 102, 0.25);
  outline: 2px dashed #ffcc66;
}
