@import url(fonts/clear-sans.css);
html, body {
  margin: 0;
  padding: 0;
  background: #57407C;
  color: #57407C;
  font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; }

body {
  margin: 40px 0; }

.heading:after {
  content: "";
  display: block;
  margin-bottom:25px;  }

h1.title {
  width: 500px;
  height: 115px;
  font-size: 80px;
  font-weight: bold;
  margin: auto;
  display: block;
  /*float: left;*/
  color: #ffffff; }
  @media screen and (max-width: 520px) {
      h1.title {
        width: 280px;
		height: 64px; } }

@-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; } }
	
.new-game-scores {
  height:56px;
  padding: 30px 15px 0 15px; }
.scores-container {
  float: right;
  height:100%;
  background: #3d2963;
  padding-left: 15px;
  border-radius: 8px;  }
.score, .best {
  position: relative;
  display: inline-block;
  text-align: right;
  padding: 13px 20px 0 10px;
  float:right;  }  
.score-container, .best-container {
  font-size: 21px;
  line-height: 25px;
  font-weight: bold;
  color: #ffffff; }
.score-best-title {
  text-transform: uppercase;
  font-size: 12px;
  line-height: 12px;
  color: #ffffff; }
  .score-container .score-addition, .best-container .score-addition {
    display: none;
	position: absolute;
    right: 30px;
    color: red;
    font-size: 25px;
    line-height: 25px;
    font-weight: bold;
    color: rgba(119, 110, 101, 0.9);
    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; }
	
	.best {opacity: 0.5;}

p {
  margin-top: 0;
  margin-bottom: 20px;
  padding-left: 15px;
  padding-right: 15px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.5); }

a {
  color: #ffffff;
  font-weight: bold;
  text-decoration: underline;
  cursor: pointer; }

strong.important {
  text-transform: uppercase; }
  
strong {
  color: rgba(255, 255, 255, 1); }

hr {
  border: none;
  border-bottom: 1px solid #3d2963;
  margin-top: 20px;
  margin-bottom: 30px;
  margin-left: 15px;
  margin-right: 15px;  }

.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: 20px;
  position: relative;
  padding: 15px;
  cursor: default;
  -webkit-touch-callout: none;
  -ms-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -ms-touch-action: none;
  touch-action: none;
  background: #57407C;
  border-radius: 12px;
  width: 500px;
  height: 500px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box; }
  
 /*//////////// GAME OVER ///////////////////////////////////////////////////*/
 
  .game-container .game-message {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    /*background: url('../img/game-over.gif');*/
    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-size: 60px;
      font-weight: bold;
      height: 60px;
      line-height: 60px;
      margin-top: 222px; }
    .game-container .game-message .lower {
      display: block;}
    
	.game-container .game-message a {
      display: inline-block;
	  width: 500px;
	  height: 137px;
      background: rgba(255, 255, 255, 0.0);
      margin-top: 363px;
      color: #f9f6f2; }
    .game-container .game-message a.keep-playing-button {
        display: none; }
    .game-container .game-message.game-won {
		display: none;
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 100;
		text-align: center;
		-webkit-animation: 	fade-in 300ms ease 1000ms;
		-moz-animation: 	fade-in 300ms ease 1000ms;
		animation: 			fade-in 300ms ease 1000ms;
		-webkit-animation-fill-mode: both;
		-moz-animation-fill-mode: both;
		animation-fill-mode: both; }
      .game-container .game-message.game-won a.keep-playing-button {
        display: 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: 10px;
  background-color: #3d2963; }
  .grid-cell:last-child {
    margin-right: 0; }

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

.tile, .tile .tile-inner {
  width: 107px;
  height: 107px;
  line-height: 116.25px; }
.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: 10px;
    background: #57407C;
    text-align: center;
    font-weight: bold;
    z-index: 10;
    font-size: 55px; }
	@media screen and (max-width: 520px) {
      .tile .tile-inner {
        border-radius: 5px; } }
  
   .tile.tile-2 .tile-inner {
	background: #57407c url('../img/2.gif'); }
	@media screen and (max-width: 520px) {
      .tile.tile-2 .tile-inner {
        background: #57407c url('../img/2_small.gif'); } }
  
  .tile.tile-4 .tile-inner {
    background: #57407c url('../img/4.gif'); }
	@media screen and (max-width: 520px) {
      .tile.tile-4 .tile-inner {
        background: #57407c url('../img/4_small.gif'); } }
		
  .tile.tile-8 .tile-inner {
    background: #57407c url('../img/8.gif'); }
	@media screen and (max-width: 520px) {
      .tile.tile-8 .tile-inner {
        background: #57407c url('../img/8_small.gif'); } }
		
  .tile.tile-16 .tile-inner {
    background: #57407c url('../img/16.gif'); }
	@media screen and (max-width: 520px) {
      .tile.tile-16 .tile-inner {
        background: #57407c url('../img/16_small.gif'); } }
		
  .tile.tile-32 .tile-inner {
    background: #57407c url('../img/32.gif'); }
	@media screen and (max-width: 520px) {
      .tile.tile-32 .tile-inner {
        background: #57407c url('../img/32_small.gif'); } }
		
  .tile.tile-64 .tile-inner {
    background: #57407c url('../img/64.gif'); }
	@media screen and (max-width: 520px) {
      .tile.tile-64 .tile-inner {
        background: #57407c url('../img/64_small.gif'); } }
		
  .tile.tile-128 .tile-inner {
    background: #57407c url('../img/128.gif'); }
    @media screen and (max-width: 520px) {
      .tile.tile-128 .tile-inner {
        background: #57407c url('../img/128_small.gif'); } }
		
  .tile.tile-256 .tile-inner {
    background: #57407c url('../img/256.gif'); }
    @media screen and (max-width: 520px) {
      .tile.tile-256 .tile-inner {
        background: #57407c url('../img/256_small.gif'); } }
		
  .tile.tile-512 .tile-inner {
    background: #57407c url('../img/512.gif'); }
	@media screen and (max-width: 520px) {
      .tile.tile-512 .tile-inner {
        background: #57407c url('../img/512_small.gif'); } }
		
  .tile.tile-1024 .tile-inner {
    background: #57407c url('../img/1024.gif'); }
	@media screen and (max-width: 520px) {
      .tile.tile-1024 .tile-inner {
        background: #57407c url('../img/1024_small.gif'); } }
		
  .tile.tile-2048 .tile-inner {
    background: #57407c; }
  
  .tile.tile-super .tile-inner {
    color: #f9f6f2;
    background: #3c3a32;
    font-size: 30px; }
    @media screen and (max-width: 520px) {
      .tile.tile-super .tile-inner {
        font-size: 10px; } }

@-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; }

.above-game:after {
  content: "";
  display: block;
  clear: both; }

.game-intro {
  padding-left: 15px;
  float: left;
  line-height: 42px;
  margin-bottom: 0; }

.restart-button {
  font-size: 22px;
  float: left;
  width: 150px;
  height: 100%;
  display:block;
  background-color: #3d2963;
  border-radius: 8px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.5);
  line-height: 60px;
  text-align: center;

  -webkit-transition:	color .3s ease, background-color .3s ease;
  -moz-transition:		color .3s ease, background-color .3s ease;
  -o-transition:		color .3s ease, background-color .3s ease;
  transition:			color .3s ease, background-color .3s ease;

  -webkit-transform:	translate3d(0, 0, 0);
  -moz-transform:		translate3d(0, 0, 0);
  -o-transform:			translate3d(0, 0, 0);
  -transform:			translate3d(0, 0, 0);  } 
  
.restart-button:hover {
	background-color: #d3386a;
	color: rgba(255, 255, 255, 1); }

.game-explanation {
  margin-top: 20px; }
  
.game-explanation span {
  display: block;
  float:right;
  margin-top: 18px;
  font-size: 22px;
  line-height: 32px; }
  
.game-credits {
  margin-top: 20px; }
  
.game-credits p{
  padding-top: 8px; }
  
.social {
  float: right;
  padding-right: 15px; }
 
 
.social-twitter{
  background-position: 	0px -40px; }
.social-facebook{
  background-position: -40px -40px; }
.social-behance{
  background-position: -80px -40px; }
.social-vimeo{
  background-position: -120px -40px; }
  


.social-twitter a{
    background-position:	0px 0px; }
.social-facebook a{
    background-position:	-40px 0px; }
.social-behance a{
    background-position:	-80px 0px; }
.social-vimeo a{
    background-position:	-120px 0px; }

li a:hover, 
li a:focus{ 
    opacity: 0; }

div#preload {
	width: 1px;
	height: 1px;
	display: none;
	background: url('../img/2.gif')no-repeat,
				url('../img/4.gif')no-repeat, 
				url('../img/8.gif')no-repeat,
				url('../img/16.gif')no-repeat,
				url('../img/32.gif')no-repeat,
				url('../img/64.gif')no-repeat,
				url('../img/128.gif')no-repeat,
				url('../img/256.gif')no-repeat,
				url('../img/512.gif')no-repeat,
				url('../img/1024.gif')no-repeat,
				url('../img/2048.gif')no-repeat,
				url('../img/game-over.gif')no-repeat; }

				
 /*//////////// VERSION MOBILE ///////////////////////////////////////////////////*/				

 
@media screen and (max-width: 520px) {
  html, body {
    font-size: 12px; }

  img {
	max-width: 280px;
	height: auto; }
	
  body {
    margin: 20px 0;
    padding: 0 20px; }

  h1.title {
    font-size: 27px;
    margin-top: 15px; }
	p {
		padding: 0 10px; }
  .game-explanation img {
	display: none; }
  
  .game-explanation span {
    margin-top: 10px;
    font-size: 18px;
	text-align: center;
	float: none;
    line-height: 24px; }
  
  .container {
    width: 280px;
    margin: 0 auto; }

	
	.new-game-scores {
		height:40px;
		padding: 20px 10px 0 10px; }
	.scores-container {
		height:100%;
		padding-left: 10px;
		border-radius: 5px;  }
	.score, .best {
		position: relative;
		display: inline-block;
		text-align: right;
		padding: 8px 15px 0 10px;
		float:right;  }  
	.score-container, .best-container {
		font-size: 16px;
		line-height: 14px;
		font-weight: bold;
		color: #ffffff; }
	.score-best-title {
		text-transform: uppercase;
		font-size: 12px;
		line-height: 12px;
		color: #ffffff; }
		
	.best {
		display:none; }

  .heading {
    margin-bottom: 10px; }
	
  .heading:after {
    margin-bottom:15px;  }

  .game-intro {
    width: 55%;
    display: block;
    box-sizing: border-box;
    line-height: 1.65; }

	.restart-button {
        font-size: 16px;
		width: 100px;
		height: 100%;
		border-radius: 5px;
		padding: 0 5px;
		line-height: 42px; }

  .game-container {
    margin-top: 15px;
    position: relative;
    padding: 10px;
    cursor: default;
    -webkit-touch-callout: none;
    -ms-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -ms-touch-action: none;
    touch-action: none;
    background: #57407C;
    border-radius: 6px;
    width: 280px;
    height: 280px;
    -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;
      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-size: 60px;
        font-weight: bold;
        height: 60px;
        line-height: 60px;
        margin-top: 222px; }
      .game-container .game-message .lower {
        display: block;
        margin-top: 59px;
		height: 120px;
		width:500px; }
      .game-container .game-message a {
        display: inline-block;
        background: none;
        padding: 0 20px;
        text-decoration: none;
        color: #f9f6f2;
        height: 40px;
		width: 280px;
        line-height: 42px;
        margin-left: 9px; }
        .game-container .game-message a.keep-playing-button {
          display: none; }
      .game-container .game-message.game-won {
        color: #f9f6f2; }
        .game-container .game-message.game-won a.keep-playing-button {
          display: none; }
      .game-container .game-message.game-won, .game-container .game-message.game-over {
        display: block;
		background-size: contain; }

	.social {
		padding-right: 10px; }
		
  .grid-container {
    position: absolute;
    z-index: 1; }

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

  .grid-cell {
    width: 57.5px;
    height: 57.5px;
    margin-right: 10px;
    float: left;
    border-radius: 10px;
    background: #3d2963; }
    .grid-cell:last-child {
      margin-right: 0; }

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

  .tile, .tile .tile-inner {
    width: 58px;
    height: 58px;
    line-height: 67.5px; }
  .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, 67px);
    -moz-transform: translate(0px, 67px);
    transform: translate(0px, 67px); }
  .tile.tile-position-1-3 {
    -webkit-transform: translate(0px, 135px);
    -moz-transform: translate(0px, 135px);
    transform: translate(0px, 135px); }
  .tile.tile-position-1-4 {
    -webkit-transform: translate(0px, 202px);
    -moz-transform: translate(0px, 202px);
    transform: translate(0px, 202px); }
  .tile.tile-position-2-1 {
    -webkit-transform: translate(67px, 0px);
    -moz-transform: translate(67px, 0px);
    transform: translate(67px, 0px); }
  .tile.tile-position-2-2 {
    -webkit-transform: translate(67px, 67px);
    -moz-transform: translate(67px, 67px);
    transform: translate(67px, 67px); }
  .tile.tile-position-2-3 {
    -webkit-transform: translate(67px, 135px);
    -moz-transform: translate(67px, 135px);
    transform: translate(67px, 135px); }
  .tile.tile-position-2-4 {
    -webkit-transform: translate(67px, 202px);
    -moz-transform: translate(67px, 202px);
    transform: translate(67px, 202px); }
  .tile.tile-position-3-1 {
    -webkit-transform: translate(135px, 0px);
    -moz-transform: translate(135px, 0px);
    transform: translate(135px, 0px); }
  .tile.tile-position-3-2 {
    -webkit-transform: translate(135px, 67px);
    -moz-transform: translate(135px, 67px);
    transform: translate(135px, 67px); }
  .tile.tile-position-3-3 {
    -webkit-transform: translate(135px, 135px);
    -moz-transform: translate(135px, 135px);
    transform: translate(135px, 135px); }
  .tile.tile-position-3-4 {
    -webkit-transform: translate(135px, 202px);
    -moz-transform: translate(135px, 202px);
    transform: translate(135px, 202px); }
  .tile.tile-position-4-1 {
    -webkit-transform: translate(202px, 0px);
    -moz-transform: translate(202px, 0px);
    transform: translate(202px, 0px); }
  .tile.tile-position-4-2 {
    -webkit-transform: translate(202px, 67px);
    -moz-transform: translate(202px, 67px);
    transform: translate(202px, 67px); }
  .tile.tile-position-4-3 {
    -webkit-transform: translate(202px, 135px);
    -moz-transform: translate(202px, 135px);
    transform: translate(202px, 135px); }
  .tile.tile-position-4-4 {
    -webkit-transform: translate(202px, 202px);
    -moz-transform: translate(202px, 202px);
    transform: translate(202px, 202px); }

  .tile .tile-inner {
    font-size: 35px; }

  .game-message p {
    font-size: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
    margin-top: 90px !important; }
  .game-message .lower {
    margin-top: 30px !important; } }
