html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
}

body {
  background: #2e2eea;
  color: #ffffff;
  font-family: "Arial Narrow", Arial, sans-serif;
  overflow-x: hidden;
}

/*
  TF2's MOTD panel is usually much smaller than a normal browser tab.
  Keep this page as a compact card: capped width, smaller logo, natural text flow.
*/
.motd {
  width: 100%;
  max-width: 960px;
  min-height: 100vh;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 18px 28px;
  background: #2e2eea;

  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.logo {
  display: block;
  width: 260px;
  max-width: 100%;
  height: auto;
}

.copy {
  min-width: 0;
  max-width: 620px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.copy-main p,
.visit {
  margin: 0;
  font-size: 34px;
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.16);
}

.copy-main p {
  max-width: 19em;
}

.copy-main p + p {
  margin-top: 18px;
}

.visit {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.visit-label {
  white-space: nowrap;
}

.site-button {
  display: inline-block;
  box-sizing: border-box;
  padding: 10px 18px 12px;
  border: 2px solid #f8eaff;
  background: #e100d4;
  color: #ffffff;
  text-decoration: none;
  font: inherit;
  line-height: 1;
  text-shadow: none;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.28);
}

.site-button:hover,
.site-button:focus {
  background: #f659ff;
  outline: none;
}

/* Short in-game panels need a denser version, but still two columns when width allows it. */
@media (max-height: 520px) {
  .motd {
    max-width: 880px;
    padding: 14px 22px;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
  }

  .logo {
    width: 220px;
  }

  .copy-main p,
  .visit {
    font-size: 28px;
    line-height: 1.12;
  }

  .copy-main p + p {
    margin-top: 13px;
  }

  .visit {
    gap: 12px;
    margin-top: 16px;
  }

  .site-button {
    padding: 8px 14px 10px;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.28);
  }
}

/* Very wide browser views should not make the logo/text balloon forever. */
@media (min-width: 1200px) and (min-height: 620px) {
  .motd {
    max-width: 1040px;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 40px;
  }

  .logo {
    width: 300px;
  }

  .copy-main p,
  .visit {
    font-size: 38px;
  }

  .copy-main p + p {
    margin-top: 22px;
  }

  .visit {
    margin-top: 30px;
  }
}

/* Only stack when the panel is genuinely narrow. */
@media (max-width: 620px) {
  .motd {
    min-height: auto;
    padding: 12px 16px;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 8px;
    text-align: center;
  }

  .brand {
    display: block;
  }

  .logo {
    width: 180px;
    max-width: 58vw;
    margin: 0 auto;
  }

  .copy {
    max-width: 560px;
    margin: 0 auto;
    display: block;
    text-align: center;
  }

  .copy-main p,
  .visit {
    font-size: 24px;
    line-height: 1.14;
  }

  .copy-main p {
    max-width: none;
  }

  .copy-main p + p {
    margin-top: 12px;
  }

  .visit {
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
  }

  .site-button {
    padding: 8px 12px 10px;
  }
}

@media (max-width: 420px) {
  .motd {
    padding: 10px 12px;
  }

  .logo {
    width: 150px;
  }

  .copy-main p,
  .visit {
    font-size: 21px;
  }

  .site-button {
    padding: 7px 10px 9px;
  }
}
