﻿:root {
  --page: #f3f3f3;
  --ink: #535353;
  --panel: #ffffff;
  --line: #dcdcdc;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
  background: linear-gradient(180deg, #fcfcfc, var(--page));
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.app {
  width: min(1220px, 96vw);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.game-shell {
  position: relative;
  border: 1px solid var(--line);
  background: var(--panel);
}

#game {
  display: block;
  width: 100%;
  height: auto;
  max-height: 76vh;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.message {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 4px 8px;
  font-size: clamp(0.7rem, 1.6vw, 0.95rem);
  letter-spacing: 0.1em;
  color: #777;
  background: #ffffffea;
}

.unlock-card {
  position: absolute;
  z-index: 2;
  top: 82px;
  left: 50%;
  transform: translateX(-50%) scale(1);
  width: min(440px, calc(100% - 30px));
  border: 2px solid var(--ink);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  text-align: center;
  box-shadow: 0 8px 24px #0000001a;
}

.unlock-headline {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.unlock-summary {
  margin: 5px 0 0;
  font-size: 0.82rem;
}

.unlock-metric {
  margin: 7px 0 0;
  font-size: 1rem;
  font-weight: 700;
}

.unlock-actions {
  margin-top: 9px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.unlock-actions button {
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
  padding: 5px 8px;
  font-family: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}

.unlock-actions button:hover {
  background: #f4f4f4;
}

.milestone-card {
  position: absolute;
  z-index: 2;
  top: 54%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 36px));
  border: 2px solid var(--ink);
  background: #fff;
  padding: 14px 16px;
  box-shadow: 0 8px 26px #0000001f;
}

.milestone-card h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.milestone-meta {
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
}

.milestone-role,
.milestone-impact {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
}

.milestone-impact {
  border-color: var(--ink);
  font-size: 0.82rem;
}

.milestone-companies {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.company-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 7px 2px 5px;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  background: #fff;
}

.company-pill img {
  width: 12px;
  height: 12px;
  display: block;
}

.company-monogram {
  font-size: 0.56rem;
  letter-spacing: 0.03em;
}

.company-wordmark {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

.company-wordmark.utd-block {
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #ef7d00;
  color: #fff;
  border-radius: 3px;
  padding: 2px 4px;
}

.company-pill.amadeus {
  border-color: #1f5fb4;
  color: #1a57a8;
}

.company-pill.ericsson {
  border-color: #1976d2;
  color: #0f5fa9;
}

.company-pill.utd {
  border-color: #d26b1e;
  color: #a95514;
}

.milestone-card p {
  margin: 8px 0;
  font-size: 0.86rem;
  line-height: 1.35;
}

.milestone-tech {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  vertical-align: middle;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px 2px 6px;
  font-size: 0.72rem;
  line-height: 1;
  background: #fff;
}

.tech-pill svg {
  width: 13px;
  height: 13px;
  display: block;
}

.tech-pill img {
  width: 13px;
  height: 13px;
  display: block;
}

.tech-dot {
  font-size: 0.58rem;
  font-weight: 700;
}

.tech-pill.python {
  border-color: #3f6fa0;
  color: #2f5b89;
}

.tech-pill.gitlab {
  border-color: #e1722a;
  color: #c45416;
}

.tech-pill.selenium {
  border-color: #43b02a;
  color: #2b7f1b;
}

.tech-pill.openai {
  border-color: #555;
  color: #111;
}

.tech-pill.mysql {
  border-color: #2b87a0;
  color: #16617a;
}

.tech-pill.pytorch {
  border-color: #f26430;
  color: #d94f1f;
}

.tech-pill.cuda {
  border-color: #56a33a;
  color: #2f7b16;
}

.tech-pill.robotframework {
  border-color: #555;
  color: #333;
}

.tech-pill.restapi {
  border-color: #4b75b2;
  color: #2e5e9e;
}

.tech-pill.postgresql {
  border-color: #3f78b7;
  color: #245f9f;
}

.tech-pill.javascript {
  border-color: #c6ab00;
  color: #8a7400;
}

.milestone-card button {
  margin-top: 8px;
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
  padding: 7px 10px;
  font-family: inherit;
  cursor: pointer;
}

.milestone-card button:hover {
  background: #f4f4f4;
}

.gameover-panel {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(380px, calc(100% - 36px));
  border: 2px solid var(--ink);
  background: #fff;
  padding: 14px 16px;
  text-align: center;
  box-shadow: 0 8px 26px #0000001f;
}

.gameover-panel h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.gameover-panel p {
  margin: 0 0 12px;
  font-size: 0.84rem;
}

#gameover-stats {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

#gameover-note {
  font-weight: 700;
}

.gameover-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.gameover-actions button {
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
  padding: 7px 12px;
  font-family: inherit;
  cursor: pointer;
}

.gameover-actions button:hover {
  background: #f4f4f4;
}

.gameover-cta {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.gameover-cta a {
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.gameover-cta a:hover {
  background: #f4f4f4;
}

.gameover-cta a[aria-disabled="true"] {
  opacity: 0.6;
  pointer-events: none;
}

.gameover-cta svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.controls {
  margin: 10px 0 0;
  text-align: center;
  color: #7f7f7f;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.actions-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.skip-portfolio {
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  cursor: pointer;
}

.skip-portfolio:hover {
  background: #f4f4f4;
}

.portfolio-scan {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: #00000070;
  display: grid;
  place-items: center;
  padding: 18px;
}

.portfolio-scan[hidden] {
  display: none !important;
}

.scan-panel {
  width: min(960px, 100%);
  max-height: min(86vh, 980px);
  overflow: auto;
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px;
}

.portfolio-scan h2 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

.scan-headbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.close-portfolio {
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.72rem;
  padding: 5px 9px;
  cursor: pointer;
}

.close-portfolio:hover {
  background: #f4f4f4;
}

.scan-subtitle {
  margin: 6px 0 12px;
  color: #777;
  font-size: 0.78rem;
}

.portfolio-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scan-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px;
}

.scan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.scan-title {
  margin: 0;
  font-size: 0.88rem;
}

.scan-metric {
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.scan-role {
  margin: 0 0 8px;
  font-size: 0.75rem;
  color: #666;
}

.scan-line {
  margin: 4px 0;
  font-size: 0.8rem;
}

.scan-tech {
  margin-top: 8px;
}

@media (max-width: 640px) {
  body {
    padding: 8px;
  }

  .app {
    width: min(1000px, 100vw);
  }

  .actions-row {
    flex-direction: column;
    align-items: stretch;
  }

  .controls {
    font-size: 0.68rem;
    text-align: left;
  }
}
