:root {
  --bg: #080808;
  --panel: rgba(12, 12, 12, 0.72);
  --panel-strong: rgba(7, 7, 7, 0.86);
  --line: rgba(255, 255, 255, 0.16);
  --text: #f5efe6;
  --muted: #c6b8a6;
  --orange: #ff8a1d;
  --orange-soft: rgba(255, 138, 29, 0.18);
  --danger: #ff513d;
  --ok: #d7f1c2;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(115deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.52) 43%, rgba(0, 0, 0, 0.84)),
    radial-gradient(circle at 30% 18%, rgba(255, 138, 29, 0.18), transparent 32%),
    url("assets/rz-klima-wartung-background.png") center center / cover fixed,
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 4px;
  mix-blend-mode: soft-light;
  opacity: 0.22;
}

button {
  font: inherit;
}

.game-shell {
  width: min(1420px, calc(100% - 36px));
  margin: 0 auto;
  padding: 36px 0 68px;
}

.brand-panel {
  max-width: 980px;
  margin-bottom: 20px;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.9);
}

.eyebrow,
.end-kicker {
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(2.3rem, 6vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
}

.subtitle {
  margin-bottom: 10px;
  color: var(--text);
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  font-weight: 700;
}

.scenario-tag {
  display: inline-flex;
  max-width: 860px;
  margin-bottom: 0;
  padding: 10px 14px;
  border: 1px solid rgba(255, 138, 29, 0.44);
  border-radius: 999px;
  color: #ffe5c7;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.intro-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 26px;
  padding: clamp(24px, 4vw, 48px);
}

.intro-copy h2,
.end-screen h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.intro-copy p,
.intro-card p,
.round-text,
.end-screen p {
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  line-height: 1.68;
}

.punchline {
  color: var(--text) !important;
  font-weight: 800;
}

.intro-card {
  align-self: start;
  padding: 24px;
  border: 1px solid rgba(255, 138, 29, 0.28);
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.45);
}

.primary-button,
.secondary-button {
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}

.primary-button {
  color: #1a0d00;
  background: linear-gradient(180deg, #ffb15d, var(--orange));
  box-shadow: 0 14px 36px rgba(255, 138, 29, 0.24);
}

.secondary-button {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.primary-button:hover,
.secondary-button:hover,
.choice-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.game-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}

.status-panel,
.lage-panel,
.log-panel,
.end-screen {
  padding: 22px;
}

.panel-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.panel-header strong {
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}

.metric {
  margin-bottom: 19px;
}

.metric-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.91rem;
}

.metric-label strong {
  color: var(--text);
}

.meter {
  height: 11px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.meter span {
  display: block;
  width: 50%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.88), var(--orange));
  transition: width 0.35s ease;
}

.temperature .meter span,
.pressure .meter span {
  background: linear-gradient(90deg, #ffc17a, var(--danger));
}

.lage-panel {
  min-height: 630px;
  background: linear-gradient(180deg, rgba(12, 12, 12, 0.82), rgba(12, 12, 12, 0.68));
}

.round-text {
  min-height: 140px;
  margin-bottom: 22px;
  color: #e7d9c9;
  font-size: clamp(1.05rem, 1.4vw, 1.28rem);
}

.decision-area h2 {
  margin-bottom: 14px;
  font-size: 1.08rem;
  color: #fff2df;
}

.choices {
  display: grid;
  gap: 12px;
}

.choice-button {
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.34);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.choice-button strong {
  display: block;
  margin-bottom: 6px;
  color: #fff4e6;
  font-size: 1.02rem;
}

.choice-button span {
  color: var(--muted);
  line-height: 1.5;
}

.choice-button.selected {
  border-color: rgba(255, 138, 29, 0.85);
  background: var(--orange-soft);
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.impact-box {
  margin-top: 16px;
  padding: 16px;
  border-left: 4px solid var(--orange);
  border-radius: 16px;
  color: #ffe8cc;
  background: rgba(255, 138, 29, 0.12);
  line-height: 1.55;
}

.log-panel {
  max-height: 720px;
  overflow: hidden;
}

.log-list {
  display: grid;
  gap: 12px;
  max-height: 620px;
  margin: 0;
  padding: 0 0 0 22px;
  overflow: auto;
}

.log-list li {
  padding-right: 8px;
  color: var(--muted);
  line-height: 1.48;
}

.log-list li::marker {
  color: var(--orange);
  font-weight: 800;
}

.end-screen {
  max-width: 1120px;
  padding: clamp(24px, 4vw, 46px);
  background: var(--panel-strong);
}

.ending-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 26px 0;
}

.ending-grid > div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
}

.ending-grid h3 {
  margin-bottom: 8px;
  color: #fff0dd;
}

.cta {
  padding: 18px;
  border: 1px solid rgba(255, 138, 29, 0.38);
  border-radius: 18px;
  background: var(--orange-soft);
}

.corner-brand {
  position: fixed;
  right: clamp(14px, 2.4vw, 34px);
  bottom: clamp(14px, 2.4vw, 34px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.corner-logo-link {
  display: block;
  width: clamp(58px, 7vw, 96px);
  border-radius: 999px;
  line-height: 0;
  transition: transform 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
}

.corner-logo-link:hover,
.corner-logo-link:focus-visible {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 18px rgba(255, 138, 29, 0.35));
  outline: none;
}

.corner-logo {
  width: 100%;
  height: auto;
  opacity: 0.94;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.75));
}

.legal-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  line-height: 1;
}

.legal-links a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.legal-links a:hover,
.legal-links a:focus-visible {
  color: var(--orange);
  border-bottom-color: var(--orange);
  outline: none;
}

.footer-note {
  position: fixed;
  left: 18px;
  bottom: 14px;
  z-index: 2;
  max-width: calc(100% - 36px);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

.hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .game-grid {
    grid-template-columns: 1fr;
  }

  .status-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
  }

  .status-panel .panel-header {
    grid-column: 1 / -1;
  }

  .metric {
    margin-bottom: 0;
  }

  .log-panel {
    max-height: none;
  }

  .log-list {
    max-height: 300px;
  }
}

@media (max-width: 760px) {
  body {
    background-attachment: scroll;
  }

  .game-shell {
    width: min(100% - 22px, 1420px);
    padding-top: 22px;
  }

  .scenario-tag {
    border-radius: 18px;
  }

  .intro-screen,
  .ending-grid {
    grid-template-columns: 1fr;
  }

  .status-panel {
    grid-template-columns: 1fr;
  }

  .panel,
  .intro-screen {
    border-radius: 20px;
  }

  .status-panel,
  .lage-panel,
  .log-panel,
  .end-screen {
    padding: 18px;
  }

  .footer-note {
    position: static;
    margin: -36px 12px 18px;
  }
}

@media (max-width: 720px) {
  .corner-brand {
    position: static;
    align-items: flex-end;
    margin: -38px 12px 18px auto;
  }

  .corner-logo-link {
    width: 52px;
  }

  .corner-logo {
    opacity: 0.88;
  }

  .legal-links {
    font-size: 0.72rem;
  }
}

.brand-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 139, 18, 0.72);
  transition: color 160ms ease, border-color 160ms ease;
}

.brand-link:hover,
.brand-link:focus-visible {
  color: var(--orange);
  border-bottom-color: var(--orange);
}
