@import url("../../styles.css");

header {
  padding-bottom: 1rem;
}

body.generator-page main {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

.tool-shell {
  display: grid;
  gap: 0.75rem;
}

.intro-card,
.tool-card,
.footer-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}

.intro-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.intro-header .titles h2 {
  margin-bottom: 0;
}

.intro-header .page-subtitle {
  margin-top: 0;
}

.page-subtitle {
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

.page-subtitle.branding {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.page-subtitle.branding a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  text-decoration: none;
  opacity: 0.35;
  filter: grayscale(1);
  transition: opacity 0.2s, filter 0.2s;
}

.page-subtitle.branding .header-logo {
  margin-right: 0;
  top: 0;
  vertical-align: baseline;
}

.page-subtitle a:hover {
  opacity: 0.8;
  filter: grayscale(0);
}

.intro-card h2 {
  font-size: 1.4rem;
  font-weight: 600;
}

.intro-card p.page-subtitle + p.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.1rem;
}

.inline-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.inline-nav a {
  color: var(--purple);
  text-decoration: none;
  font-weight: 500;
  padding: 0.3rem 0.85rem;
  border: 1.5px solid var(--purple);
  border-radius: 999px;
}

.inline-nav a:hover,
.inline-nav a.active {
  background: var(--purple);
  color: #fff;
}

.steps {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.step {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.step.active {
  border-color: var(--purple);
  color: var(--purple);
  font-weight: 600;
}

.card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem;
  background: #fff;
}

.card b:first-child {
  display: block;
  margin-bottom: 0.25rem;
}

.row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

input:not([type="checkbox"]):not([type="radio"]),
select {
  width: 100%;
  min-width: 240px;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  border: 1px solid #cfcfd4;
  background: #fff;
  color: var(--text);
  font: inherit;
}

input[type="checkbox"],
input[type="radio"] {
  margin-right: 0.35rem;
}

button {
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--purple);
  background: #fff;
  color: var(--purple);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

button.primary {
  background: var(--purple);
  color: #fff;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hidden {
  display: none;
}

.games {
  width: 100%;
  min-width: 280px;
  overflow-x: auto;
}

.games option {
  white-space: nowrap;
}

.hint {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.error {
  color: #b00020;
  white-space: pre-wrap;
  margin-top: 0.75rem;
}

.ok {
  color: #116611;
}

.preview-box {
  white-space: pre-wrap;
  max-height: 360px;
  overflow: auto;
  margin-top: 10px;
}

#chosen-summary {
  margin: 4px 0 12px 0;
}

#preview-hint {
  margin-top: 6px;
}

#stats-correction-note {
  margin-top: 10px;
}

#stats-params-card {
  margin-top: 14px;
}

#stats-params-card .hint {
  margin-top: 2px;
  margin-bottom: 12px;
}

#stats-params-card label {
  margin-bottom: 2px;
}

#stats-params-card input,
#stats-params-card select {
  margin-top: 0;
}

#statsGameTypeBox {
  display: grid;
  gap: 0.35rem;
}

#statsGameTypeBox > div {
  margin-top: 6px;
  padding-left: 10px;
}

.copy-note {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.copy-note a,
.tool-card a,
.footer-card a {
  color: var(--purple);
  text-decoration: none;
}

.copy-note a:hover,
.tool-card a:hover,
.footer-card a:hover {
  text-decoration: underline;
}

.prose {
  font-size: 0.95rem;
}

.prose ul,
.prose ol {
  margin: 0.75rem 0 0.75rem 1.25rem;
}

.prose p > b:only-child {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--purple);
  margin-top: 1.1rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose ul ul,
.prose ol ul {
  margin-top: 0.4rem;
}

.smallprint {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

@media (max-width: 580px) {
  .intro-card,
  .tool-card,
  .footer-card,
  .card {
    padding: 0.75rem;
  }

  input:not([type="checkbox"]):not([type="radio"]),
  select {
    min-width: 100%;
  }

  .inline-nav {
    gap: 0.45rem;
  }

  .inline-nav a {
    font-size: 0.88rem;
  }
}

@media (prefers-color-scheme: dark) {
  .card, .step, input:not([type="checkbox"]):not([type="radio"]), select, button {
    background: #1e1e1e;
    border-color: #444;
  }
  .error { color: #ff8a80; }
  .ok { color: #81c784; }
  .step.active { border-color: var(--purple-light); color: var(--purple-light); }
}
