:root {
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #e5e9f2;
  background: #07090f;
  --bg-card: rgba(18, 22, 30, 0.97);
  --bg-panel: rgba(12, 15, 23, 0.98);
  --bg-page: #06080f;
  --border: rgba(255, 255, 255, 0.06);
  --panel-border: rgba(255, 255, 255, 0.08);
  --accent: #4f86ff;
  --accent-soft: rgba(79, 134, 255, 0.15);
  --danger: #ff7c7c;
  --text-muted: #8a98ae;
  --text-secondary: #c3cbd8;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(rgba(7, 9, 15, 0.82), rgba(7, 9, 15, 0.82)),
    url('/static/images/wallpaper.jpg') center/cover no-repeat;
  color: #e5e9f2;
}

button,
input {
  font: inherit;
}

button {
  border: none;
  border-radius: 0;
  cursor: pointer;
}

.app-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px 32px 40px;
}

.banner-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
  padding: 0 12px;
}

.banner-image {
  width: auto;
  max-width: 1000px;
  max-height: 220px;
  height: auto;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 10px 30px rgba(0, 0, 0, 0.24);
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 30px;
  padding: 24px 28px 28px;
  border: 1px solid var(--panel-border);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(15, 18, 28, 0.97), rgba(9, 12, 20, 0.95));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 18px 60px rgba(0, 0, 0, 0.28);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.25rem);
  line-height: 1.05;
}

.hero-copy {
  margin: 18px 0 0;
  max-width: 56rem;
  color: #cbd4e8;
  line-height: 1.7;
}

.hero-tagline {
  margin-top: 14px;
  max-width: 42rem;
  color: #bac4da;
  font-size: 1rem;
}

.score-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.score-panel .clear-btn {
  padding: 14px 20px;
  min-width: 140px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--danger);
  background: rgba(255, 124, 124, 0.1);
  border: 1px solid rgba(255, 124, 124, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 8px 18px rgba(0, 0, 0, 0.08);
}

.score-panel .clear-btn:hover {
  background: rgba(255, 124, 124, 0.18);
}

.score-card,
.status-pill {
  padding: 14px 20px;
  border-radius: 0;
  background: var(--bg-card);
  border: 1px solid var(--panel-border);
  text-align: center;
}

.score-card {
  min-width: 180px;
}

.score-card .label {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 10px;
}

#score {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-pill.valid {
  color: #a0d8ff;
  background: rgba(79, 134, 255, 0.14);
}

.status-pill.invalid {
  color: #ffb7b7;
  background: rgba(255, 124, 124, 0.14);
}

.section {
  margin-top: 32px;
  padding: 24px;
  border-radius: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border);
}

.section.alt {
  margin-top: 20px;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}

.section-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.section-eyebrow {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.8rem;
  color: #ffffff;
}

.section-note {
  margin: 0;
  max-width: 30rem;
  color: #c2cfe1;
  line-height: 1.6;
}

.modifier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.modifier-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
  min-height: 125px;
}

.modifier-card.is-selected {
  transform: translateY(-1px);
}

.modifier-card.is-negative.is-selected {
  border-color: rgba(255, 124, 124, 0.5);
  background: rgba(255, 124, 124, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 124, 124, 0.18);
}

.modifier-card.is-negative.is-selected .modifier-name,
.modifier-card.is-negative.is-selected .modifier-value,
.modifier-card.is-negative.is-selected .modifier-description {
  color: #ffe4e4;
}

.modifier-card.is-negative.is-selected input {
  accent-color: #ff7c7c;
}

.modifier-card.is-positive.is-selected {
  border-color: rgba(74, 211, 122, 0.5);
  background: rgba(74, 211, 122, 0.16);
  box-shadow: inset 0 0 0 1px rgba(74, 211, 122, 0.18);
}

.modifier-card.is-positive.is-selected .modifier-name,
.modifier-card.is-positive.is-selected .modifier-value,
.modifier-card.is-positive.is-selected .modifier-description {
  color: #e8fff0;
}

.modifier-card.is-positive.is-selected input {
  accent-color: #4ad37a;
}

.modifier-card-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 68px;
}

.modifier-card input {
  width: 0;
  height: 0;
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.modifier-card {
  position: relative;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
  min-height: 125px;
}

.modifier-card:hover {
  border-color: rgba(79, 134, 255, 0.24);
  background: rgba(79, 134, 255, 0.05);
  transform: translateY(-1px);
}

.modifier-card input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.modifier-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.modifier-content {
  display: grid;
  gap: 6px;
}

.modifier-name {
  font-weight: 700;
  color: #edf3ff;
}

.modifier-value {
  color: #a7b2c9;
  font-size: 0.93rem;
}

.modifier-description {
  color: #9aa5bb;
  font-size: 0.82rem;
  line-height: 1.45;
  margin-top: 2px;
  display: block;
}

.footer-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 28px;
}

.footer-actions button {
  padding: 14px 24px;
  background: linear-gradient(135deg, #68d39f, #4d92ff);
  color: #0c1322;
  font-weight: 700;
  box-shadow: 0 20px 50px rgba(33, 60, 103, 0.18);
}

@media (max-width: 960px) {
  .hero-panel {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .score-panel {
    justify-content: stretch;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 24px 16px 36px;
  }

  .hero-copy {
    margin: 0;
  }

  .section-heading {
    flex-direction: column;
  }

  .modifier-card {
    flex-direction: column;
    align-items: stretch;
  }

  .modifier-card-badge {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-width: auto;
  }

  .modifier-card input {
    margin-left: auto;
  }
}
