/* the look every dnd page shares; each page's style.css is appended after this at build */

:root {
  color-scheme: dark;

  --background: linear-gradient(135deg, rgb(34, 33, 33) 0%, rgb(28, 27, 27) 100%);
  --surface: linear-gradient(145deg, #3a3838, #2f2d2d);
  --surface-flat: #353333;
  --field: #262525;
  --text: white;
  --text-soft: rgba(255, 255, 255, 0.85);
  --muted: rgba(255, 255, 255, 0.6);
  --border: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.2);
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  --text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  --radius: 1.5em;
  --radius-small: 0.5em;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
    sans-serif;
}

body {
  box-sizing: border-box;
  max-width: 600px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 1em 20px;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}

main {
  flex: 1 0 auto;
}

h1,
h2 {
  font-weight: 300;
  text-shadow: var(--text-shadow);
}

h1 {
  margin: 0.4em 0 0.2em;
  letter-spacing: 0.05em;
}

h2 {
  letter-spacing: 0.03em;
}

a {
  color: var(--text);
  text-decoration-color: var(--muted);
}

a:hover {
  text-decoration-color: var(--text);
}

button,
input[type='submit'] {
  padding: 0.6em 1em;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

button:hover,
input[type='submit']:hover {
  border-color: var(--border-hover);
}

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

input[type='number'],
input[type='text'],
select {
  box-sizing: border-box;
  padding: 0.3em 0.5em;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--field);
  color: var(--text);
  font: inherit;
}

input[type='checkbox'] {
  accent-color: #8a8686;
}

details {
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface-flat);
}

summary {
  padding: 0.3em 0.6em;
  cursor: pointer;
}

footer {
  flex-shrink: 0;
  margin-top: 3em;
  padding: 1.5em 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9em;
}

footer p {
  margin: 0;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--text-soft);
}

/* calculator layout shared by khorne and war-calls */

.form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.form-group {
  flex: 1;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
}

.form-group input,
.form-group select {
  width: 100%;
}

.abilities {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.ability-column {
  flex: 1;
}

.ability-option {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.ability-option input[type='checkbox'] {
  margin-right: 5px;
}

.disabled {
  opacity: 0.5;
  pointer-events: none;
  text-decoration: line-through;
}

#result {
  margin-top: 20px;
}

.calculation,
.final-result,
.effects {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface-flat);
}

.final-result {
  margin-top: 20px;
}

.effects ul {
  margin: 0;
  padding-left: 20px;
}

.effects li {
  margin-bottom: 5px;
}

/* chip pickers shared by animate-objects and multi-attack */

.option {
  user-select: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  height: 1em;
  padding: 0.5em;
  margin: 0.5em;
  display: inline-block;
  line-height: 1;
  color: #1c1b1b;
  cursor: pointer;
}

.config-row {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1em;
}

.centered-group {
  display: flex;
  gap: 20px;
}

.buffer {
  padding: 0.5em;
}
body {
  max-width: 1200px;
  padding: 1em 0;
  text-align: center;
  line-height: 1.6;
}

h1 {
  font-size: 2.5em;
  margin: 0.8em 0;
}

h2 {
  font-size: 1.8em;
}

footer {
  padding: 2em 0;
}

.sites {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1em;
  padding: 0 1em;
  max-width: 1000px;
  margin: 0 auto 2em auto;
}

.site {
  display: flex;
  flex-direction: row;
  padding: 0;
  width: calc(50% - 5em);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: all 0.3s ease;
  overflow: hidden;
  min-height: 8em;
}

.site:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  border-color: var(--border-hover);
}

.icon {
  width: 20%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: filter 0.3s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* For Safari */
  border-radius: var(--radius) 0 0 var(--radius);
}

.site:hover .icon {
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4)) brightness(1.1);
}

.site-content {
  width: 90%;
  padding: 1.2em;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.site h2 {
  margin: 0 0 0.5em 0;
  padding: 0;
  font-size: 1.3em;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: left;
}

.site p {
  text-align: left;
  padding: 0;
  margin: 0;
  font-size: 0.95em;
  color: var(--text-soft);
  line-height: 1.5;
}

@media screen and (max-width: 600px) {
  body {
    padding: 0.5em 0;
  }

  h1 {
    font-size: 2em;
  }

  h2 {
    font-size: 1.5em;
  }

  .sites {
    gap: 0.8em;
    padding: 0 0.8em;
  }

  .site {
    width: 100%;
    min-height: 7em;
  }

  .site-content {
    padding: 1em;
  }

  .site h2 {
    font-size: 1.15em;
  }

  .site p {
    font-size: 0.9em;
  }
}
