/* Arena13 rebrand for Merge 2048. Loaded after main.css; overrides colours,
   type and spacing only. Board geometry and tile positions are unchanged. */

html, body {
  background: #14171f;
  color: #ebe5ce;
  font-family: "Helvetica Neue", Arial, sans-serif;
  overscroll-behavior: none;
}

body {
  margin: 24px 0;
}

::selection {
  background: #ff1919;
  color: #14171f;
}

/* ---- Title: solid + outline lockup ---- */
h1.title {
  font-size: 46px;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: #ebe5ce;
}

h1.title span {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1.5px #ff1919;
}

.heading {
  margin-bottom: 12px;
}

/* ---- Scores ---- */
.score-container, .best-container {
  background: #1f2430;
  color: #ebe5ce;
  border-radius: 0;
  outline: 1px solid rgba(235, 229, 206, 0.16);
  outline-offset: -1px;
  font-variant-numeric: tabular-nums;
}

.score-container:after, .best-container:after {
  color: rgba(235, 229, 206, 0.55);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.score-container .score-addition {
  color: #ff1919;
}

/* ---- Intro / buttons ---- */
.game-intro {
  color: rgba(235, 229, 206, 0.7);
}

.game-intro strong {
  color: #ff1919;
}

a {
  color: #ebe5ce;
}

.restart-button,
.game-container .game-message a {
  background: transparent;
  color: #ebe5ce;
  border-radius: 0;
  outline: 1px solid rgba(235, 229, 206, 0.35);
  outline-offset: -1px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 14px;
}

.restart-button:hover,
.game-container .game-message a:hover {
  background: #ff1919;
  color: #14171f;
  outline-color: #ff1919;
}

/* ---- Board ---- */
.game-container {
  margin-top: 20px;
  background: #1a1e28;
  border-radius: 0;
  outline: 1px solid rgba(235, 229, 206, 0.16);
  outline-offset: -1px;
}

.grid-cell {
  background: #232835;
  border-radius: 0;
}

.tile .tile-inner {
  border-radius: 0;
  background: #2b303c;
  color: #ebe5ce;
}

.tile.tile-2 .tile-inner { background: #2b303c; color: #ebe5ce; box-shadow: none; }
.tile.tile-4 .tile-inner { background: #3a4050; color: #ebe5ce; box-shadow: none; }
.tile.tile-8 .tile-inner { background: #5c2a30; color: #ebe5ce; box-shadow: none; }
.tile.tile-16 .tile-inner { background: #7d2329; color: #ebe5ce; box-shadow: none; }
.tile.tile-32 .tile-inner { background: #a51d23; color: #ebe5ce; box-shadow: none; }
.tile.tile-64 .tile-inner { background: #d4191f; color: #ebe5ce; box-shadow: none; }
.tile.tile-128 .tile-inner { background: #ff1919; color: #14171f; box-shadow: 0 0 24px rgba(255, 25, 25, 0.35); }
.tile.tile-256 .tile-inner { background: #ff4b3a; color: #14171f; box-shadow: 0 0 26px rgba(255, 75, 58, 0.4); }
.tile.tile-512 .tile-inner { background: #ff7b55; color: #14171f; box-shadow: 0 0 28px rgba(255, 123, 85, 0.4); }
.tile.tile-1024 .tile-inner { background: #f0b58f; color: #14171f; box-shadow: 0 0 30px rgba(240, 181, 143, 0.45); }
.tile.tile-2048 .tile-inner { background: #ebe5ce; color: #ff1919; box-shadow: 0 0 34px rgba(235, 229, 206, 0.5); }
.tile.tile-super .tile-inner {
  background: #14171f;
  color: #ff1919;
  outline: 2px solid #ff1919;
  outline-offset: -2px;
}

/* ---- End-of-run overlay ---- */
.game-container .game-message {
  background: rgba(20, 23, 31, 0.82);
  color: #ebe5ce;
}

.game-container .game-message p {
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

.game-container .game-message.game-won {
  background: rgba(255, 25, 25, 0.78);
  color: #14171f;
}

.game-container .game-message.game-won a {
  outline-color: #14171f;
  color: #14171f;
}

/* ---- Footer copy ---- */
.game-explanation {
  margin-top: 24px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(235, 229, 206, 0.6);
}

.game-explanation strong {
  color: #ebe5ce;
}

strong.important {
  color: #ff1919;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-weight: normal;
  letter-spacing: 0.06em;
}

/* ---- Fit the board inside short portal frames (desktop layout is ~640px tall) ---- */
@media screen and (min-width: 521px) and (max-height: 700px) {
  body { margin: 14px 0; }
  .container { zoom: 0.86; }
}

@media screen and (min-width: 521px) and (max-height: 600px) {
  .container { zoom: 0.74; }
}

@media screen and (min-width: 521px) and (max-height: 500px) {
  .container { zoom: 0.6; }
}

/* ---- Phones ---- */
@media screen and (max-width: 520px) {
  body {
    margin: 14px 0;
  }

  h1.title {
    font-size: 26px;
    margin-top: 4px;
  }

  h1.title span {
    -webkit-text-stroke-width: 1px;
  }

  .restart-button {
    font-size: 12px;
  }

  .game-intro {
    line-height: 1.35;
    font-size: 13px;
    padding-top: 2px;
  }

  .game-explanation {
    font-size: 12px;
  }

  .game-container .game-message a {
    font-size: 12px;
    padding: 0 12px;
    margin-left: 4px;
  }
}
