:root {
  --xp-blue: #0755d9;
  --xp-blue-dark: #0037a8;
  --xp-red: #e24a2e;
  --cream: #fff6e4;
  --paper: #fffaf0;
  --ink: #181818;
  --muted: #5b6270;
  --grass: #62b12f;
  --sky: #27a8ff;
  --purple: #8f68d8;
  --line: rgba(10, 24, 54, 0.16);
  --shadow: rgba(11, 28, 71, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #e9f8ff 0%, #fff6e4 52%, #efe1ff 100%);
  font-family: Tahoma, Verdana, Arial, sans-serif;
}

img {
  display: block;
  width: 100%;
}

a,
button {
  font: inherit;
}

.topbar {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  width: min(1120px, calc(100% - 28px));
  padding: 8px;
  background: rgba(255, 250, 240, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(12, 38, 88, 0.18);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.brand,
.nav-links a,
.copy-ca,
.x-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.brand {
  padding: 0 16px;
  color: #fff;
  background: var(--xp-blue);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.nav-links a {
  padding: 0 12px;
}

.nav-links a:hover {
  background: rgba(7, 85, 217, 0.08);
}

.actions {
  display: flex;
  gap: 8px;
}

.copy-ca {
  max-width: 220px;
  padding: 0 12px;
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--purple);
  border: 0;
  cursor: pointer;
}

.x-link {
  width: 42px;
  color: #fff;
  background: var(--xp-red);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 112px 18px 48px;
  background:
    url("assets/html-banner.png") center / cover no-repeat,
    linear-gradient(180deg, var(--sky), var(--grass));
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.08), rgba(0, 25, 80, 0.38) 72%),
    linear-gradient(180deg, rgba(6, 35, 96, 0.08), rgba(6, 35, 96, 0.34));
}

.xp-window {
  position: relative;
  z-index: 2;
  width: min(640px, 100%);
  overflow: hidden;
  background: #fff7e8;
  border: 2px solid var(--xp-blue-dark);
  border-radius: 8px;
  box-shadow: 0 24px 64px var(--shadow);
}

.xp-title {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 6px 5px 12px;
  color: #fff;
  background: linear-gradient(180deg, #2d7dff, #0049cc);
  font-weight: 900;
}

.xp-title button {
  width: 29px;
  height: 29px;
  color: #fff;
  background: linear-gradient(180deg, #ff7a54, #df2d16);
  border: 2px solid #ffd4c5;
  border-radius: 6px;
  cursor: pointer;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.xp-body {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: clamp(24px, 5vw, 48px);
}

.info {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--xp-blue);
  background: linear-gradient(180deg, #ffffff, #d7ecff);
  border: 2px solid #8bb8e9;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 38px;
  font-weight: 900;
  font-style: italic;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(58px, 12vw, 132px);
  line-height: 0.86;
  font-weight: 1000;
}

.hero-window p {
  margin: 8px 0 0;
  font-size: clamp(22px, 4vw, 38px);
  font-weight: 900;
}

.ok-button {
  width: 152px;
  min-height: 42px;
  display: grid;
  place-items: center;
  margin: 0 auto 32px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #e7e1d6);
  border: 2px solid #74849d;
  border-radius: 4px;
  box-shadow: inset -2px -2px 0 #b8b0a4, inset 2px 2px 0 #ffffff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.floating-errors {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.mini-error {
  position: absolute;
  min-width: 230px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff7e8;
  border: 2px solid var(--xp-blue-dark);
  border-top: 28px solid var(--xp-blue);
  border-radius: 6px;
  box-shadow: 0 18px 36px rgba(5, 22, 70, 0.2);
  font-size: 14px;
  font-weight: 800;
  animation: floaty 5.5s ease-in-out infinite;
}

.one {
  top: 20%;
  left: 8%;
  transform: rotate(-4deg);
}

.two {
  right: 8%;
  top: 24%;
  transform: rotate(3deg);
  animation-delay: -1.2s;
}

.three {
  bottom: 18%;
  left: 14%;
  transform: rotate(2deg);
  animation-delay: -2s;
}

.four {
  right: 14%;
  bottom: 16%;
  transform: rotate(-5deg);
  animation-delay: -3s;
}

@keyframes floaty {
  0%, 100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -14px;
  }
}

.ticker {
  display: flex;
  gap: 10px;
  overflow: hidden;
  padding: 14px;
  background: var(--xp-blue);
}

.ticker span {
  flex: 0 0 auto;
  padding: 9px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
}

.lore,
.rules,
.meme,
.final {
  padding: clamp(58px, 8vw, 110px) clamp(18px, 6vw, 92px);
}

.lore {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(280px, 0.55fr);
  gap: clamp(26px, 6vw, 86px);
  align-items: center;
  background: var(--cream);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--xp-blue);
  font-size: 13px;
  font-weight: 1000;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  font-size: clamp(40px, 6vw, 86px);
  line-height: 0.95;
  font-weight: 1000;
}

.copy p {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.5;
}

.logo-card {
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 8px solid #fff;
  border-radius: 8px;
  box-shadow: 0 24px 64px var(--shadow);
  transform: rotate(1.5deg);
}

.logo-card img {
  aspect-ratio: 1;
  object-fit: cover;
}

.rules {
  background: linear-gradient(180deg, #eaf7ff, #fff6e4);
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.rule-grid article {
  min-height: 230px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(11, 28, 71, 0.12);
}

.rule-grid span {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--purple);
  font-size: 14px;
  font-weight: 1000;
}

.rule-grid h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
}

.rule-grid p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.meme {
  background: #fff6e4;
}

.meme-copy {
  width: min(860px, 100%);
  margin-bottom: 24px;
}

.meme img {
  border: 8px solid #fff;
  border-radius: 8px;
  box-shadow: 0 24px 64px var(--shadow);
}

.final {
  min-height: 62vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(0, 50, 160, 0.2), rgba(0, 20, 70, 0.45)),
    url("assets/html-banner.png") center / cover no-repeat;
}

.final-window {
  width: min(540px, 100%);
}

.final-window .xp-body {
  padding: 34px;
}

.final-window p {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .mini-error {
    animation: none;
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .lore,
  .rule-grid {
    grid-template-columns: 1fr;
  }

  .mini-error {
    opacity: 0.76;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .actions {
    justify-content: center;
  }

  .hero {
    padding-top: 150px;
  }

  .xp-body {
    align-items: flex-start;
    flex-direction: column;
  }

  .mini-error {
    display: none;
  }

  h1 {
    font-size: 62px;
  }
}
