@font-face {
  font-family: "GoblinExo";
  src: url("Exo2ExtraBoldItalic-gaD6.ttf") format("truetype");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

html,
body {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  overflow: hidden;
  background: #001b1f;
  color: #f5fff9;
  font-family: "GoblinExo", Arial, Helvetica, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 28% 35%, rgba(18, 211, 154, 0.2), transparent 38%),
    linear-gradient(115deg, rgba(6, 112, 88, 0.95), rgba(0, 38, 48, 0.98));
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(135deg, rgba(0, 255, 180, 0.06) 0 4px, transparent 4px 22px);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

#unity-container {
  position: absolute;
  inset: 0;
  z-index: 1;
}

#unity-container.unity-desktop,
#unity-container.unity-mobile {
  left: 0;
  top: 0;
  transform: none;
  width: 100%;
  height: 100%;
}

#unity-canvas {
  width: 100%;
  height: 100%;
  background: #001b1f;
}

#unity-loading-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
}

#unity-logo {
  width: 154px;
  height: 130px;
  background: url("unity-logo-dark.png") no-repeat center;
}

#unity-progress-bar-empty {
  width: 141px;
  height: 18px;
  margin-top: 10px;
  margin-left: 6.5px;
  background: url("progress-bar-empty-dark.png") no-repeat center;
}

#unity-progress-bar-full {
  width: 0%;
  height: 18px;
  margin-top: 10px;
  background: url("progress-bar-full-dark.png") no-repeat center;
}

#unity-footer {
  display: none;
}

#unity-warning {
  position: absolute;
  left: 50%;
  top: 5%;
  transform: translateX(-50%);
  background: white;
  color: black;
  padding: 10px;
  display: none;
  z-index: 50;
}

#wallet-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  color: #f8fff9;
}

#wallet-gate.wallet-hidden {
  display: none;
}

.gate-screen {
  display: none;
  position: absolute;
  inset: 0;
}

.gate-screen.is-active {
  display: flex;
}

#screen-home {
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 22px;
  text-align: center;
}

#home-logo {
  width: min(760px, 70vw);
  max-height: 260px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 10px rgba(148, 255, 188, 0.8))
    drop-shadow(0 0 32px rgba(0, 255, 157, 0.35));
}

.home-copy {
  max-width: 780px;
  padding: 0 24px;
  font-size: clamp(18px, 1.4vw, 25px);
  line-height: 1.35;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.br-button,
.terminal-button,
.terminal-link,
.free-test-link {
  border: 1px solid rgba(0, 255, 166, 0.9);
  background: rgba(0, 28, 24, 0.72);
  color: #66ff91;
  min-height: 48px;
  padding: 0 34px;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.br-button {
  min-width: 220px;
  color: #001b18;
  background: #08d8a6;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 72%, calc(100% - 18px) 100%, 0 100%);
  box-shadow: 10px 9px 0 rgba(0, 0, 0, 0.35);
}

.br-button:not(.primary) {
  background: rgba(0, 39, 35, 0.82);
  color: #66ff91;
}

.br-button:hover,
.terminal-button:hover,
.terminal-link:hover,
.free-test-link:hover {
  transform: translateY(-2px);
  background: #ffffff;
  color: #02150f;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.4);
}

.free-test-link {
  min-height: auto;
  border: 0;
  background: transparent;
  padding: 6px 12px;
  color: rgba(235, 255, 240, 0.86);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.home-teaser {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.home-teaser span {
  border: 1px solid rgba(0, 255, 166, 0.55);
  background: rgba(0, 25, 22, 0.55);
  color: #75ff8f;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

#home-status,
#wallet-status {
  min-height: 22px;
  color: #e7ff35;
  font-weight: 800;
}

.terminal-shell {
  align-items: stretch;
  background: rgba(0, 0, 0, 0.45);
  font-family: "GoblinExo", "Courier New", monospace;
  text-align: left;
}

#terminal-nav {
  width: 260px;
  flex: 0 0 260px;
  min-height: 100vh;
  border-right: 1px solid rgba(0, 255, 89, 0.35);
  background: rgba(0, 12, 9, 0.76);
  padding: 24px 16px;
  box-sizing: border-box;
}

.terminal-brand {
  color: #5dff70;
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
}

.terminal-version,
.terminal-label,
.screen-kicker,
.terminal-card > span {
  color: #24d53d;
  font-size: 13px;
  text-transform: uppercase;
}

.terminal-rule {
  height: 1px;
  margin: 22px -16px;
  background: rgba(0, 255, 89, 0.25);
}

.terminal-label {
  margin-top: 28px;
  margin-bottom: 12px;
}

.terminal-link {
  display: block;
  width: 100%;
  min-height: 38px;
  margin-bottom: 12px;
  border: 0;
  background: transparent;
  text-align: left;
  color: #67ff70;
}

.split-line {
  display: flex;
  justify-content: space-between;
  border: 1px solid rgba(0, 255, 89, 0.22);
  margin-bottom: 10px;
  padding: 8px;
  color: #dfffdf;
}

.split-line strong {
  color: #61ff70;
}

.terminal-footer {
  position: absolute;
  left: 16px;
  bottom: 18px;
  color: #39e84f;
  font-size: 12px;
  line-height: 1.8;
}

#terminal-main {
  position: relative;
  flex: 1;
  overflow-y: auto;
  padding: 34px 56px 60px;
  box-sizing: border-box;
}

.terminal-screen {
  display: none;
  max-width: 1100px;
  margin: 0 auto;
}

.terminal-screen.is-active {
  display: block;
}

#terminal-logo {
  display: block;
  width: min(520px, 48vw);
  margin: 0 auto 54px;
  filter:
    drop-shadow(0 0 8px rgba(148, 255, 188, 0.9))
    drop-shadow(0 0 28px rgba(0, 255, 126, 0.45));
}

.terminal-screen h1 {
  max-width: 900px;
  margin: 12px 0 16px;
  font-size: clamp(38px, 4vw, 70px);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.5),
    0 0 20px rgba(170, 255, 200, 0.18);
}

.screen-copy {
  max-width: 900px;
  color: #e5fff0;
  font-size: 16px;
  line-height: 1.65;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.48);
}

.wallet-strip,
.queue-panel,
.pot-panel,
.terminal-card {
  border: 1px solid rgba(0, 255, 89, 0.45);
  background: rgba(0, 20, 13, 0.62);
  box-shadow: inset 0 0 34px rgba(0, 255, 89, 0.06);
}

.wallet-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  margin: 26px 0;
}

.terminal-button.compact {
  min-height: 38px;
}

.queue-panel,
.pot-panel {
  padding: 18px;
  margin-bottom: 24px;
}

.panel-head,
.pot-row,
.queue-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.panel-head strong,
.pot-row strong {
  color: #65ff71;
}

.queue-meter {
  height: 10px;
  margin: 16px 0;
  border: 1px solid rgba(0, 255, 89, 0.35);
}

#paid-queue-fill {
  width: 0;
  height: 100%;
  background: #08d8a6;
}

.payment-panel {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dotted rgba(0, 255, 89, 0.35);
}

.payment-panel input {
  width: min(100%, 460px);
  height: 40px;
  margin: 10px 10px 0 0;
  border: 1px solid rgba(0, 255, 89, 0.45);
  background: rgba(0, 0, 0, 0.45);
  color: #eaffef;
  padding: 0 12px;
}

.market-form {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.market-form input {
  min-height: 46px;
  border: 1px solid rgba(0, 255, 89, 0.45);
  background: rgba(0, 0, 0, 0.45);
  color: #eaffef;
  padding: 0 14px;
  font: inherit;
  text-transform: uppercase;
  outline: none;
}

.market-form input:focus {
  border-color: #0eff91;
  box-shadow: 0 0 16px rgba(0, 255, 127, 0.24);
}

#market-list-status {
  min-height: 22px;
  margin-top: 12px;
  color: #fff36f;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.terminal-card {
  padding: 20px;
}

.terminal-card.wide {
  margin: 20px 0;
}

.terminal-card h2 {
  color: #f7fff9;
  margin: 10px 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.5),
    0 0 14px rgba(170, 255, 200, 0.12);
}

.terminal-card p {
  color: #e3fff0;
  line-height: 1.6;
}

.terminal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.terminal-actions.lower {
  margin-top: 24px;
}

@media (max-width: 900px) {
  body {
    overflow-y: auto;
  }

  #screen-home {
    min-height: 100vh;
    padding: 48px 18px;
    box-sizing: border-box;
  }

  .terminal-shell {
    display: block;
    overflow-y: auto;
  }

  #terminal-nav {
    width: 100%;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 255, 89, 0.35);
  }

  .terminal-footer {
    position: static;
    margin-top: 24px;
  }

  #terminal-main {
    padding: 28px 18px 48px;
  }

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

/* Goblin Royale site polish overrides. Keep after Unity/custom base styles. */
body::before {
  background:
    radial-gradient(circle at 28% 34%, rgba(18, 211, 154, 0.18), transparent 34%),
    linear-gradient(115deg, rgba(2, 97, 77, 0.96), rgba(0, 30, 39, 0.99));
}

body::after {
  background:
    repeating-linear-gradient(135deg, rgba(0, 255, 180, 0.055) 0 4px, transparent 4px 22px);
  opacity: 0.62;
}

#screen-home {
  min-height: 100vh;
  padding: 56px 24px;
  box-sizing: border-box;
  gap: 22px;
}

#home-logo {
  width: min(840px, 78vw);
  max-height: 310px;
  margin-bottom: 14px;
  filter:
    drop-shadow(0 0 7px rgba(255, 255, 255, 0.85))
    drop-shadow(0 0 22px rgba(122, 255, 168, 0.72))
    drop-shadow(0 0 44px rgba(0, 255, 128, 0.36));
}

.home-copy {
  max-width: 860px;
  font-size: clamp(18px, 1.45vw, 26px);
  line-height: 1.35;
  color: #ffffff;
}

.home-actions {
  gap: 22px;
}

.br-button {
  min-width: 260px;
  min-height: 58px;
  font-size: 18px;
}

.home-teaser span {
  padding: 10px 18px;
  background: rgba(0, 20, 17, 0.68);
}

.terminal-shell {
  background:
    linear-gradient(180deg, rgba(0, 10, 8, 0.94), rgba(0, 2, 2, 0.98)),
    repeating-linear-gradient(0deg, rgba(31, 255, 87, 0.05) 0 1px, transparent 1px 4px);
  color: #effff0;
}

.terminal-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(94, 255, 111, 0.045) 0 1px, transparent 1px 5px),
    radial-gradient(circle at 58% 0%, rgba(38, 255, 92, 0.12), transparent 32%);
  mix-blend-mode: screen;
}

#terminal-nav {
  width: 256px;
  flex-basis: 256px;
  padding: 20px 14px;
  background: rgba(0, 13, 8, 0.86);
  border-right-color: rgba(55, 255, 82, 0.42);
}

.terminal-brand {
  color: #5cff6d;
  font-size: 20px;
}

.terminal-version,
.terminal-label,
.screen-kicker,
.terminal-card > span {
  color: #3dff52;
}

.terminal-link {
  min-height: 34px;
  margin-bottom: 10px;
  color: #78ff7f;
  font-size: 13px;
}

.terminal-footer {
  color: #55ff5e;
}

#terminal-main {
  padding: 32px 52px 64px;
}

.terminal-screen {
  max-width: 1040px;
}

#terminal-logo {
  width: min(500px, 44vw);
  margin: 0 auto 56px;
  filter:
    drop-shadow(0 0 8px rgba(255, 255, 255, 0.78))
    drop-shadow(0 0 20px rgba(137, 255, 169, 0.82))
    drop-shadow(0 0 48px rgba(0, 255, 80, 0.42));
}

.terminal-screen h1 {
  max-width: 860px;
  margin: 8px 0 14px;
  font-size: clamp(30px, 3vw, 52px);
  line-height: 1.14;
  letter-spacing: 0.01em;
  color: #f9fff6;
}

.screen-copy {
  max-width: 930px;
  font-size: 13px;
  line-height: 1.7;
  color: #eaffea;
}

.wallet-strip,
.queue-panel,
.pot-panel,
.terminal-card {
  border-color: rgba(28, 255, 78, 0.56);
  background: rgba(0, 20, 12, 0.5);
  box-shadow:
    inset 0 0 24px rgba(34, 255, 92, 0.04),
    0 0 0 1px rgba(0, 0, 0, 0.35);
}

.wallet-strip {
  margin: 22px 0;
  padding: 13px 16px;
}

.queue-panel,
.pot-panel {
  padding: 16px;
  margin-bottom: 20px;
}

.mode-grid {
  gap: 16px;
  margin: 20px 0;
}

.terminal-card {
  padding: 18px;
  min-height: 166px;
}

.terminal-card h2 {
  margin: 9px 0;
  font-size: 22px;
}

.terminal-card p,
.queue-panel,
.wallet-strip,
.pot-panel,
.payment-panel input {
  font-size: 13px;
}

.terminal-button {
  min-height: 40px;
  padding: 0 28px;
  font-size: 13px;
}

.terminal-button.primary,
.terminal-button.secondary {
  background: rgba(0, 18, 11, 0.7);
  color: #62ff72;
}

.terminal-button.primary:hover,
.terminal-button.secondary:hover,
.terminal-button.ghost:hover {
  background: #ffffff;
  color: #04160d;
}

.pot-panel .panel-head strong {
  color: #8eff8f;
}

@media (max-width: 900px) {
  #home-logo {
    width: min(720px, 92vw);
  }

  #terminal-logo {
    width: min(420px, 80vw);
    margin-bottom: 34px;
  }

  .terminal-screen h1 {
    font-size: 34px;
  }
}
