@font-face {
  font-family: "Soopafresh";
  src: url("assets/soopafresh.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Classic 2010-2012 Transformice Flash palette */
  --bg-outer: #1c242b;
  --stage-bg: #6a7495;

  --panel-bg: #324650;
  --panel-dark: #223037;
  --panel-deep: #1b262c;
  --panel-border: #11181c;
  --panel-bevel: #4c6876;

  --tfm-teal: #009d9d;
  --tfm-teal-bright: #2ecfce;
  --tfm-gold: #ffd84d;
  --tfm-cheese: #babd2f;

  --text-main: #e2e6f0;
  --text-soft: #b9c3d4;
  --text-muted: #8a99ab;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

::selection {
  background: var(--tfm-teal);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--tfm-teal-bright);
  outline-offset: 1px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Quicksand", "Trebuchet MS", Tahoma, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-outer);
  padding: 18px 12px 32px;
}

.page-wrap {
  width: min(860px, 100%);
  margin: 0 auto;
}

/* Classic crisp Flash-era outer frame (no blurry modern glow) */
.tfm-frame {
  border: 2px solid var(--panel-border);
  border-radius: 3px;
  overflow: hidden;
  background: var(--panel-dark);
  box-shadow: 0 0 0 1px #2e404a;
}

.hud-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 7px 12px;
  background: #212e35;
  border-bottom: 2px solid var(--panel-border);
  font-size: 12.5px;
}

.hud-left,
.hud-center,
.hud-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-label {
  color: #93a8b5;
}

.hud-val {
  color: #ffffff;
  font-weight: 700;
}

.hud-room {
  color: var(--tfm-teal-bright);
}

.hud-link {
  color: #c7d6e0;
  text-decoration: none;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 2px;
  background: #2b3c45;
  border: 1px solid #141d22;
  box-shadow: inset 0 1px 0 #445d6b;
}

.hud-link:hover {
  background: #354c57;
  color: #ffffff;
}

.hud-discord-mini {
  background: #4b55c4;
  border-color: #29307a;
  box-shadow: inset 0 1px 0 #7a83e8;
  color: #ffffff;
}

.hud-discord-mini:hover {
  background: #5865f2;
}

/* Flat iconic #6A7495 Transformice stage */
.tfm-stage {
  background: var(--stage-bg);
  padding-top: 26px;
  border-bottom: 2px solid var(--panel-border);
}

.stage-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 20px;
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.brand-cheese {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.brand-titles h1 {
  margin: 0;
  font-family: "Soopafresh", "Quicksand", sans-serif;
  font-size: clamp(36px, 6.2vw, 52px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-shadow:
    -2px -2px 0 #1b2832,
     2px -2px 0 #1b2832,
    -2px  2px 0 #1b2832,
     2px  2px 0 #1b2832,
     0px  4px 0 #152028;
}

.logo-tfm {
  color: #ffe26a;
}

.logo-classic {
  color: #5ce1e6;
}

.subtitle {
  margin: 3px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #eef2ff;
  text-shadow: 0 1px 0 #26314a;
}

/* Classic 2012 flat beveled dark-teal panel */
.tfm-panel {
  background: var(--panel-bg);
  border: 2px solid var(--panel-border);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 var(--panel-bevel);
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  background: #23333b;
  border-bottom: 2px solid var(--panel-border);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--tfm-teal-bright);
}

.panel-header h2 {
  margin: 0;
  font-size: 14px;
  color: var(--tfm-teal-bright);
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px;
}

/* Authentic 2012 beveled Flash-style buttons */
.tfm-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 3px;
  text-decoration: none;
  border: 2px solid var(--panel-border);
}

.tfm-btn:hover {
  filter: brightness(1.07);
}

.tfm-btn:active {
  transform: translateY(1px);
}

.tfm-btn .ico {
  flex-shrink: 0;
}

.btn-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.btn-copy strong {
  font-size: 14.5px;
  font-weight: 700;
}

.btn-copy small {
  font-size: 11.5px;
  font-weight: 600;
  opacity: 0.9;
}

.tfm-btn-gold {
  color: #212412;
  background: #e6bf47;
  border-color: #6b5212;
  box-shadow:
    inset 0 1px 0 #fff1b8,
    inset 0 -2px 0 #c29927;
}

.tfm-btn-discord {
  color: #ffffff;
  background: #5865f2;
  border-color: #2d358c;
  box-shadow:
    inset 0 1px 0 #8a94ff,
    inset 0 -2px 0 #414cc2;
}

.tfm-btn-teal {
  color: #ffffff;
  background: #008a8a;
  border-color: #0b3c3c;
  box-shadow:
    inset 0 1px 0 #2ecfce,
    inset 0 -2px 0 #006666;
}

/* Classic flat grass + dirt strip */
.tfm-ground {
  width: 100%;
  border-top: 2px solid #2b4a1c;
}

.ground-grass {
  height: 10px;
  background: #78b83d;
  border-bottom: 2px solid #4a7822;
}

.ground-dirt {
  height: 18px;
  background: #61432d;
}

.tfm-lower {
  padding: 14px;
  background: var(--panel-dark);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.tfm-card {
  background: var(--panel-bg);
  border: 2px solid var(--panel-border);
  border-radius: 3px;
  padding: 11px;
  box-shadow: inset 0 1px 0 var(--panel-bevel);
}

.tfm-card h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--tfm-cheese);
}

.tfm-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-soft);
}

.panel-header-tabs {
  padding-bottom: 0;
  align-items: flex-end;
}

.panel-header-tabs h2 {
  padding-bottom: 7px;
}

.chat-tabs {
  display: flex;
  gap: 4px;
}

.chat-tab {
  appearance: none;
  border: 2px solid var(--panel-border);
  border-bottom: none;
  border-radius: 3px 3px 0 0;
  padding: 5px 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: #a9b9c8;
  background: #1b262c;
  cursor: pointer;
}

.chat-tab:hover:not(.is-active) {
  background: #283a44;
  color: #ffffff;
}

.chat-tab.is-active {
  background: var(--panel-bg);
  color: var(--tfm-gold);
}

.panel-content {
  padding: 12px 14px;
}

.tfm-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tfm-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  background: var(--panel-deep);
  border: 1px solid #2b3f4a;
  border-radius: 2px;
  color: var(--text-soft);
  font-size: 13px;
}

.tfm-steps li strong {
  color: #ffffff;
}

.step-tag {
  flex-shrink: 0;
  width: 21px;
  height: 21px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: var(--tfm-teal);
  border: 1px solid #006666;
}

code {
  display: inline-block;
  padding: 0 5px;
  border-radius: 2px;
  background: #121b20;
  border: 1px solid #2f4652;
  color: var(--tfm-teal-bright);
  font-family: Consolas, ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
}

.chat-notice {
  margin: 0;
  padding: 9px 11px;
  background: var(--panel-deep);
  border-left: 3px solid var(--tfm-teal);
  color: var(--text-soft);
  font-size: 13px;
}

.notice-tag {
  color: var(--tfm-teal-bright);
  font-weight: 700;
  margin-right: 4px;
}

.chat-notice a {
  color: var(--tfm-gold);
  font-weight: 700;
}

.faq-stack {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tfm-faq {
  background: var(--panel-deep);
  border: 1px solid #2b3f4a;
  border-radius: 2px;
  padding: 9px 11px;
}

.tfm-faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 700;
  color: #eef3fb;
}

.tfm-faq summary::-webkit-details-marker {
  display: none;
}

.tfm-faq summary::before {
  content: "+";
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #132227;
  background: var(--tfm-teal-bright);
}

.tfm-faq[open] summary::before {
  content: "−";
  background: var(--tfm-gold);
}

.tfm-faq p {
  margin: 7px 0 0 28px;
  font-size: 13px;
  color: var(--text-soft);
}

.tfm-footer {
  padding: 9px 11px;
  background: #141d22;
  border: 1px solid #243640;
  border-radius: 2px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.footer-tag {
  color: var(--tfm-cheese);
  font-weight: 700;
  margin-right: 5px;
}

@media (max-width: 760px) {
  .action-buttons {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .brand-header {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  body {
    padding: 8px 6px 20px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hud-center {
    display: none;
  }
}
