@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&amp;family=Share+Tech+Mono&amp;family=Audiowide&amp;display=swap');

/* --- ROOT VARIABLES FROM brain.css --- */
:root {
    --color-background: #000000;
    --color-text: #E0E0E0;
    --color-primary-neon: #00FFFF; /* Neon Cyan/Blue */
    --color-secondary-neon: #FF00FF; /* Neon Pink */
    --color-accent-neon: #39FF14; /* Neon Green */
    --color-warning-neon: #FFF000; /* Neon Yellow */
    --color-heading: var(--color-accent-neon);
    --color-link: var(--color-primary-neon);
    --color-link-hover: var(--color-secondary-neon);
    --color-border-subtle: #222222;
    --color-border-accent: var(--color-accent-neon);
    --color-surface-1: #0A0A0A;
    --color-surface-2: #111111;

    --font-body: 'Share Tech Mono', 'Lucida Console', Monaco, monospace;
    --font-heading: 'Orbitron', 'Audiowide', sans-serif;

    --shadow-neon-primary: 0 0 5px var(--color-primary-neon), 0 0 10px var(--color-primary-neon), 0 0 15px rgba(0, 255, 255, 0.5);
    --shadow-neon-secondary: 0 0 5px var(--color-secondary-neon), 0 0 10px var(--color-secondary-neon), 0 0 15px rgba(255, 0, 255, 0.5);
    --shadow-neon-accent: 0 0 5px var(--color-accent-neon), 0 0 10px var(--color-accent-neon), 0 0 15px rgba(57, 255, 20, 0.5);
}


html, body {
  margin: 0;
  padding: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 18px; }

.row {margin-left:0px; margin-right:0px;}

#uvt_box { margin-top: 30px; }

.game-intro {text-align:center;}

.heading h1 {padding-top:25px;padding-bottom:25px; text-align: center; }

@media (max-width:500px) {
  #uvt_box { margin-top: 20px !important; }
  .padsm { padding-top:30px;}
  .heading h1 {padding-top:0px;padding-bottom:0px;}
  .col-sm-8 {
    padding-left: 0px;
    padding-right:0px;
  }
  .container {padding:0px;}
  p {padding:10px;}
}

#uvt_credits { z-index: 9001; }
  form { margin: 0; padding: 0; }
body {
  margin: 80px 0; }

  #fix {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; position: fixed; z-index: -1000;
  }

.heading:after {
  content: "";
  display: block;
  clear: both; }

h1.title {
  font-family: var(--font-heading);
  font-size: 40px;
  line-height: 40px;
  font-weight: bold;
  margin: 0;
  padding-bottom: 0;
  display: block;
  color: var(--color-heading);
  text-shadow: var(--shadow-neon-accent);
  }

@-webkit-keyframes move-up {
  0% {
    top: 25px;
    opacity: 1; }

  100% {
    top: -50px;
    opacity: 0; } }

@-moz-keyframes move-up {
  0% {
    top: 25px;
    opacity: 1; }

  100% {
    top: -50px;
    opacity: 0; } }

@keyframes move-up {
  0% {
    top: 25px;
    opacity: 1; }

  100% {
    top: -50px;
    opacity: 0; } }

    #makeyourown { text-align: center;background: var(--color-surface-2);color: var(--color-text); border-radius: 3px; padding: 10px; }
    #makeyourown a { color: var(--color-link); }

.scores-container {
  text-align: center; }

.score-container, .best-container {
  position: relative;
  display: inline-block;
  background: var(--color-surface-2);
  padding: 15px 25px;
  font-size: 25px;
  height: 25px;
  line-height: 47px;
  font-weight: bold;
  border-radius: 3px;
  color: white;
  margin-top: 8px;
  text-align: center;
  border: 1px solid var(--color-primary-neon);
  }
  .score-container:after, .best-container:after {
    position: absolute;
    width: 100%;
    top: 10px;
    left: 0;
    text-transform: uppercase;
    font-size: 13px;
    line-height: 13px;
    text-align: center;
    color: var(--color-text); }

  .score-container .score-addition, .best-container .score-addition {
    position: absolute;
    right: 30px;
    font-size: 25px;
    line-height: 25px;
    font-weight: bold;
    color: var(--color-warning-neon);
    z-index: 100;
    -webkit-animation: move-up 600ms ease-in;
    -moz-animation: move-up 600ms ease-in;
    animation: move-up 600ms ease-in;
    -webkit-animation-fill-mode: both;
    -moz-animation-fill-mode: both;
    animation-fill-mode: both; }

.score-container:after {
  content: "Score"; }

.best-container:after {
  content: "Best"; }

p {
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.65; }

a {
  color: var(--color-link);
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

a:hover, a:focus {
    color: var(--color-link-hover);
    text-shadow: var(--shadow-neon-secondary);
    outline: none;
}

strong.important {
  text-transform: uppercase;
  color: var(--color-warning-neon);
}

hr {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0,0,0,0), var(--color-primary-neon), rgba(0,0,0,0));
    margin: 2em 0;
}

  #credit { text-align: center; margin-top: 10px; padding-top: 0; }

.container {
  width: 500px;
  margin: 0 auto; }

@-webkit-keyframes fade-in {
  0% {
    opacity: 0; }

  100% {
    opacity: 1; } }

@-moz-keyframes fade-in {
  0% {
    opacity: 0; }

  100% {
    opacity: 1; } }

@keyframes fade-in {
  0% {
    opacity: 0; }

  100% {
    opacity: 1; } }

.game-container {
  margin-top: 40px;
  position: relative;
  padding: 15px;
  cursor: default;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  background: var(--color-surface-2);
  border: 2px solid var(--color-accent-neon);
  box-shadow: var(--shadow-neon-accent);
  border-radius: 6px;
  width: 500px;
  height: 500px;
  -ms-touch-action: none;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box; }
  .game-container .game-message {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(10, 10, 10, 0.8);
    z-index: 100;
    text-align: center;
    -webkit-animation: fade-in 800ms ease 1200ms;
    -moz-animation: fade-in 800ms ease 1200ms;
    animation: fade-in 800ms ease 1200ms;
    -webkit-animation-fill-mode: both;
    -moz-animation-fill-mode: both;
    animation-fill-mode: both; }
    .game-container .game-message p {
      font-family: var(--font-heading);
      color: var(--color-accent-neon);
      text-shadow: var(--shadow-neon-accent);
      font-size: 60px;
      font-weight: bold;
      height: 60px;
      line-height: 60px;
      margin-top: 222px; }
    .game-container .game-message .lower {
      display: block;
      margin: 15px 0; }
         .game-container .game-message iframe {

  width: 48% !important;
  display: block;
  margin: 0 auto 5px;

    }
    .game-container .game-message a {
      display: inline-block;
      background: var(--color-accent-neon);
      border-radius: 3px;
      padding: 0 20px;
      text-decoration: none;
      color: var(--color-background);
      height: 40px;
      line-height: 42px;
      margin-left: 9px;
      font-family: var(--font-heading);
      font-weight: bold;
    }
     .game-container .game-message a:hover {
        background-color: var(--color-secondary-neon);
        color: #FFFFFF;
        text-shadow: none;
        transform: scale(1.05);
        box-shadow: var(--shadow-neon-secondary);
     }
      .game-container .game-message a.keep-playing-button {
        display: none; }
    .game-container .game-message .score-sharing {
      display: inline-block;
      vertical-align: middle;
      margin-left: 10px; }
    .game-container .game-message.game-won {
      background: rgba(57, 255, 20, 0.3);
      color: var(--color-text); }
      .game-container .game-message.game-won a.keep-playing-button {
        display: inline-block; }
    .game-container .game-message.game-won, .game-container .game-message.game-over {
      display: block; }

.grid-container {
  position: absolute;
  z-index: 1; }

.grid-row {
  margin-bottom: 15px; }
  .grid-row:last-child {
    margin-bottom: 0; }
  .grid-row:after {
    content: "";
    display: block;
    clear: both; }

.grid-cell {
  width: 106.25px;
  height: 106.25px;
  margin-right: 15px;
  float: left;
  border-radius: 3px;
  background: rgb(0 255 255); }
  .grid-cell:last-child {
    margin-right: 0; }

.tile-container {
  position: absolute;
  z-index: 2; }

.tile, .tile .tile-inner {
  width: 107px;
  height: 107px;
  line-height: 107px; }
.tile.tile-position-1-1 {
  -webkit-transform: translate(0px, 0px);
  -moz-transform: translate(0px, 0px);
  transform: translate(0px, 0px); }
.tile.tile-position-1-2 {
  -webkit-transform: translate(0px, 121px);
  -moz-transform: translate(0px, 121px);
  transform: translate(0px, 121px); }
.tile.tile-position-1-3 {
  -webkit-transform: translate(0px, 242px);
  -moz-transform: translate(0px, 242px);
  transform: translate(0px, 242px); }
.tile.tile-position-1-4 {
  -webkit-transform: translate(0px, 363px);
  -moz-transform: translate(0px, 363px);
  transform: translate(0px, 363px); }
.tile.tile-position-2-1 {
  -webkit-transform: translate(121px, 0px);
  -moz-transform: translate(121px, 0px);
  transform: translate(121px, 0px); }
.tile.tile-position-2-2 {
  -webkit-transform: translate(121px, 121px);
  -moz-transform: translate(121px, 121px);
  transform: translate(121px, 121px); }
.tile.tile-position-2-3 {
  -webkit-transform: translate(121px, 242px);
  -moz-transform: translate(121px, 242px);
  transform: translate(121px, 242px); }
.tile.tile-position-2-4 {
  -webkit-transform: translate(121px, 363px);
  -moz-transform: translate(121px, 363px);
  transform: translate(121px, 363px); }
.tile.tile-position-3-1 {
  -webkit-transform: translate(242px, 0px);
  -moz-transform: translate(242px, 0px);
  transform: translate(242px, 0px); }
.tile.tile-position-3-2 {
  -webkit-transform: translate(242px, 121px);
  -moz-transform: translate(242px, 121px);
  transform: translate(242px, 121px); }
.tile.tile-position-3-3 {
  -webkit-transform: translate(242px, 242px);
  -moz-transform: translate(242px, 242px);
  transform: translate(242px, 242px); }
.tile.tile-position-3-4 {
  -webkit-transform: translate(242px, 363px);
  -moz-transform: translate(242px, 363px);
  transform: translate(242px, 363px); }
.tile.tile-position-4-1 {
  -webkit-transform: translate(363px, 0px);
  -moz-transform: translate(363px, 0px);
  transform: translate(363px, 0px); }
.tile.tile-position-4-2 {
  -webkit-transform: translate(363px, 121px);
  -moz-transform: translate(363px, 121px);
  transform: translate(363px, 121px); }
.tile.tile-position-4-3 {
  -webkit-transform: translate(363px, 242px);
  -moz-transform: translate(363px, 242px);
  transform: translate(363px, 242px); }
.tile.tile-position-4-4 {
  -webkit-transform: translate(363px, 363px);
  -moz-transform: translate(363px, 363px);
  transform: translate(363px, 363px); }

.tile {
  position: absolute;
  -webkit-transition: 100ms ease-in-out;
  -moz-transition: 100ms ease-in-out;
  transition: 100ms ease-in-out;
  -webkit-transition-property: -webkit-transform;
  -moz-transition-property: -moz-transform;
  transition-property: transform; }
  .tile .tile-inner {
    border-radius: 3px;
    background: var(--color-surface-1);
    text-align: center;
    font-weight: bold;
    z-index: 10;
    font-size: 55px;
    font-family: var(--font-heading);
    color: var(--color-text);
  }
  .tile.tile-2 .tile-inner {
    color: var(--color-primary-neon);
    background: var(--color-surface-1);
    box-shadow: none; }
  .tile.tile-4 .tile-inner {
    color: var(--color-primary-neon);
    background: var(--color-surface-2);
    box-shadow: none; }
  .tile.tile-8 .tile-inner {
    color: var(--color-background);
    background: var(--color-primary-neon); }
  .tile.tile-16 .tile-inner {
    color: var(--color-background);
    background: var(--color-accent-neon); }
  .tile.tile-32 .tile-inner {
    color: var(--color-background);
    background: var(--color-secondary-neon); }
  .tile.tile-64 .tile-inner {
    color: var(--color-background);
    background: var(--color-warning-neon); }
  .tile.tile-128 .tile-inner {
    color: var(--color-primary-neon);
    background: var(--color-surface-2);
    box-shadow: var(--shadow-neon-primary);
    font-size: 45px; }
    @media screen and (max-width: 520px) {
      .tile.tile-128 .tile-inner {
        font-size: 25px; } }
  .tile.tile-256 .tile-inner {
    color: var(--color-secondary-neon);
    background: var(--color-surface-2);
    box-shadow: var(--shadow-neon-secondary);
    font-size: 45px; }
    @media screen and (max-width: 520px) {
      .tile.tile-256 .tile-inner {
        font-size: 25px; } }
  .tile.tile-512 .tile-inner {
    color: var(--color-accent-neon);
    background: var(--color-surface-2);
    box-shadow: var(--shadow-neon-accent);
    font-size: 45px; }
    @media screen and (max-width: 520px) {
      .tile.tile-512 .tile-inner {
        font-size: 25px; } }
  .tile.tile-1024 .tile-inner {
    color: var(--color-warning-neon);
    background: var(--color-surface-2);
    box-shadow: 0 0 5px var(--color-warning-neon), 0 0 10px var(--color-warning-neon), 0 0 15px rgba(255, 240, 0, 0.5);
    font-size: 35px; }
    @media screen and (max-width: 520px) {
      .tile.tile-1024 .tile-inner {
        font-size: 20px; } }
  .tile.tile-2048 .tile-inner {
    color: #FFFFFF;
    background: linear-gradient(45deg, var(--color-primary-neon), var(--color-secondary-neon));
    box-shadow: 0 0 30px 10px rgba(255, 0, 255, 0.55);
    font-size: 35px; }
    @media screen and (max-width: 520px) {
      .tile.tile-2048 .tile-inner {
        font-size: 20px; } }
  .tile.tile-super .tile-inner {
    color: var(--color-text);
    background: #000;
    border: 2px solid var(--color-accent-neon);
    font-size: 30px; }
    @media screen and (max-width: 520px) {
      .tile.tile-super .tile-inner {
        font-size: 15px; } }

@-webkit-keyframes appear {
  0% {
    opacity: 0;
    -webkit-transform: scale(0);
    -moz-transform: scale(0);
    transform: scale(0); }

  100% {
    opacity: 1;
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    transform: scale(1); } }

@-moz-keyframes appear {
  0% {
    opacity: 0;
    -webkit-transform: scale(0);
    -moz-transform: scale(0);
    transform: scale(0); }

  100% {
    opacity: 1;
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    transform: scale(1); } }

@keyframes appear {
  0% {
    opacity: 0;
    -webkit-transform: scale(0);
    -moz-transform: scale(0);
    transform: scale(0); }

  100% {
    opacity: 1;
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    transform: scale(1); } }

.tile-new .tile-inner {
  -webkit-animation: appear 200ms ease 100ms;
  -moz-animation: appear 200ms ease 100ms;
  animation: appear 200ms ease 100ms;
  -webkit-animation-fill-mode: backwards;
  -moz-animation-fill-mode: backwards;
  animation-fill-mode: backwards; }

@-webkit-keyframes pop {
  0% {
    -webkit-transform: scale(0);
    -moz-transform: scale(0);
    transform: scale(0); }

  50% {
    -webkit-transform: scale(1.2);
    -moz-transform: scale(1.2);
    transform: scale(1.2); }

  100% {
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    transform: scale(1); } }

@-moz-keyframes pop {
  0% {
    -webkit-transform: scale(0);
    -moz-transform: scale(0);
    transform: scale(0); }

  50% {
    -webkit-transform: scale(1.2);
    -moz-transform: scale(1.2);
    transform: scale(1.2); }

  100% {
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    transform: scale(1); } }

@keyframes pop {
  0% {
    -webkit-transform: scale(0);
    -moz-transform: scale(0);
    transform: scale(0); }

  50% {
    -webkit-transform: scale(1.2);
    -moz-transform: scale(1.2);
    transform: scale(1.2); }

  100% {
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    transform: scale(1); } }

.tile-merged .tile-inner {
  z-index: 20;
  -webkit-animation: pop 200ms ease 100ms;
  -moz-animation: pop 200ms ease 100ms;
  animation: pop 200ms ease 100ms;
  -webkit-animation-fill-mode: backwards;
  -moz-animation-fill-mode: backwards;
  animation-fill-mode: backwards; }

.game-intro {
  margin-bottom: 0; }

.game-explanation {
  margin-top: 40px; }

.sharing {
  margin-top: 20px;
  text-align: center; }
  .sharing > iframe, .sharing > span, .sharing > form {
    display: inline-block;
    vertical-align: middle; }

/* Keep original media queries for responsiveness */
@media screen and (max-width: 520px) {
  html, body {
    font-size: 15px; }

  body {
    margin: 20px 0;
    padding: 0 20px; }

  h1.title {
    font-size: 27px;
    margin-top: 15px; }

  .container {
    width: 320px;
    margin: 0 auto; }

  .score-container, .best-container {
    margin-top: 0;
    padding: 15px 10px;
    min-width: 40px; }

  .heading {
    margin-bottom: 10px; }

  .game-container {
    width: calc(100vw - 40px);
    height: calc(100vw - 40px);
   }
    .game-container .game-message p {
       font-size: 30px;
       height: 30px;
       line-height: 30px;
       margin-top: calc( ( (100vw - 40px) / 2 ) - 15px);
    }

  .grid-row {
     margin-bottom: calc((100vw - 40px) / 28);
   }
   .grid-row:last-child {
      margin-bottom: 0;
    }

   .grid-cell {
    width: calc(((100vw - 40px) - (5 * ((100vw - 40px) / 28))) / 4);
    height: calc(((100vw - 40px) - (5 * ((100vw - 40px) / 28))) / 4);
    margin-right: calc((100vw - 40px) / 28);
    }
    .grid-cell:last-child {
      margin-right: 0;
    }

  .tile, .tile .tile-inner {
    width: calc(((100vw - 40px) - (5 * ((100vw - 40px) / 28))) / 4 + 1px);
    height: calc(((100vw - 40px) - (5 * ((100vw - 40px) / 28))) / 4 + 1px);
    line-height: calc(((100vw - 40px) - (5 * ((100vw - 40px) / 28))) / 4 + 1px);
    font-size: 25px;
  }
}