:root {
  --bg: #0d0d0d;
  --surface: #1a1a1a;
  --surface2: #242424;
  --border: #2a2a2a;
  --text: #e0e0e0;
  --text2: #999;
  --accent: #4a9eff;
  --accent-dim: #2a5a9e;
  --green: #4caf50;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.container { max-width: 700px; margin: 0 auto; padding: 16px; }
a { color: var(--accent); }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
header h1 { font-size: 18px; font-weight: 600; }
header nav { display: flex; gap: 8px; flex-wrap: wrap; }
header nav a {
  color: var(--text2);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 6px;
}
header nav a:hover, header nav a[aria-current="page"] { color: var(--text); background: var(--surface); }

h2 { font-size: 22px; font-weight: 600; margin-bottom: 16px; }
h3 { font-size: 16px; font-weight: 500; margin-bottom: 12px; color: var(--text2); }
p { color: var(--text2); margin-bottom: 12px; }
label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--text2); }

textarea, select, input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 12px;
  font-size: 15px;
  font-family: inherit;
}
textarea:focus, select:focus, input:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 120px; }
select { cursor: pointer; }
.form-group { margin-bottom: 20px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: #3a8eef; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface2); }
.btn-block { width: 100%; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.actions .btn { flex: 1; min-width: 120px; }

.status { padding: 14px 16px; border-radius: var(--radius); margin-bottom: 16px; font-weight: 500; }
.status-success { background: rgba(76, 175, 80, .15); color: var(--green); border: 1px solid rgba(76, 175, 80, .3); }
.status-info { background: rgba(74, 158, 255, .1); color: var(--accent); border: 1px solid rgba(74, 158, 255, .2); }
.page-note { font-size: 13px; margin-top: 20px; overflow-wrap: anywhere; }
.page-note:empty { display: none; }
.footer-divider { border: 0; border-top: 1px solid var(--border); margin-top: 28px; }
footer.page-note { padding-top: 20px; margin-top: 0; }

.hero { padding: 36px 0 28px; }
.hero-kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.hero h2 { font-size: 32px; line-height: 1.2; margin-bottom: 14px; max-width: 580px; }
.hero-intro { font-size: 17px; line-height: 1.65; margin-bottom: 24px; max-width: 640px; }
.suggested-use {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: 24px;
}
.suggested-use > h3 { color: var(--text); font-size: 18px; font-weight: 600; margin-bottom: 18px; }
.suggested-use-flow { display: grid; gap: 20px; list-style: none; }
.suggested-use-flow li { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.suggested-use-step {
  align-items: center;
  background: rgba(74, 158, 255, .12);
  border: 1px solid rgba(74, 158, 255, .28);
  border-radius: 50%;
  color: var(--accent);
  display: inline-flex;
  flex: 0 0 34px;
  font-size: 14px;
  font-weight: 700;
  height: 34px;
  justify-content: center;
}
.suggested-use-flow h4 { color: var(--text); font-size: 15px; font-weight: 600; line-height: 1.4; margin-bottom: 5px; }
.suggested-use-flow p { font-size: 14px; line-height: 1.55; margin-bottom: 0; }
.hero-links { display: flex; flex-direction: column; gap: 12px; max-width: 320px; margin: 0 0 28px; }
.empty-state { text-align: center; padding: 48px 16px; color: var(--text2); }
.empty-state p { font-size: 15px; }

.settings-intro { margin-bottom: 28px; }
.settings-intro p { max-width: 640px; }
.settings-section { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); }
.excluded-games { list-style: none; margin: 16px 0; }
.excluded-games li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.excluded-games li > div { min-width: 0; overflow-wrap: anywhere; }
.excluded-games .btn { flex-shrink: 0; padding: 8px 16px; }

/* Descriptions stay in one movable group, including the user's draft. */
.comparison-container { max-width: 800px; }
.comparison-toolbar { display: flex; flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 12px; }
.comparison-toolbar h2 { margin-bottom: 6px; }
.comparison-toolbar p { margin-bottom: 0; font-size: 14px; }
.comparison-toolbar .btn { flex-shrink: 0; }
.comparison-toolbar-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.comparison-pool-note { font-size: 13px; margin-bottom: 20px; }
.description-column { display: flex; flex-direction: column; gap: 18px; }
.description-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
  overflow-wrap: anywhere;
}
.description-card-heading { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
.description-card h3 { font-size: 16px; line-height: 1.4; color: var(--text); margin: 0 0 5px; font-weight: 600; }
.description-game-title a { color: var(--text); text-decoration-color: var(--text2); text-underline-offset: 3px; }
.description-game-title a:hover { color: var(--accent); }
.description-game-title { margin-bottom: 5px; font-weight: 600; }
.steam-game-information { margin-bottom: 16px; }
.description-source { font-size: 12px; margin: 0; }
.description-drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  width: 30px;
  min-height: 40px;
  margin: -8px 0 0 -6px;
  flex-shrink: 0;
  font-size: 20px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.description-drag-handle:active { cursor: grabbing; }
.description-text { color: var(--text); font-size: 15px; line-height: 1.7; white-space: pre-wrap; margin: 0 0 24px; }
.description-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.description-move-controls { display: flex; gap: 6px; }
.description-move-controls button {
  width: 38px;
  min-height: 38px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  border-radius: 6px;
  font-size: 19px;
  cursor: pointer;
}
.description-move-controls button:disabled { cursor: not-allowed; }
.exclude-game-btn { min-height: 38px; font-size: 13px; padding: 8px 14px; }
.description-drag-placeholder { opacity: .3; border-style: dashed; }
.description-being-dragged { box-shadow: 0 4px 18px rgba(74, 158, 255, .18); }

@media (min-width: 600px) {
  .container { padding: 24px; }
  .suggested-use-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
}
@media (max-width: 480px) {
  header { align-items: flex-start; flex-direction: column; gap: 10px; }
  header nav { gap: 2px; }
  header nav a { padding: 5px 8px; }
  .hero { padding-top: 24px; }
  .hero h2 { font-size: 28px; }
  .suggested-use { padding: 20px 18px; }
  .comparison-toolbar-actions { width: 100%; }
  .comparison-toolbar .btn { width: 100%; }
}
