@import url(fonts/comic-sans.css);
@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');

@font-face {
  font-family: 'Comic Sans Bold';
  src: url('../fonts/ComicSansMS-Bold.woff') format('woff'),
       url('../fonts/ComicSansMS-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  color: #000;
  font-family: 'Comic Sans', 'Comic Sans', Chalkboard, Helvetica, Arial, sans-serif;
  font-size: 18px;
  -webkit-animation: background-gradient-change linear 6s infinite alternate;
  -moz-animation: background-gradient-change linear 6s infinite alternate;
  animation: background-gradient-change linear 6s infinite alternate;
}

.container {
  overflow: hidden;
  width: 500px;
  margin: 0 auto;
  position: relative;
  padding: 10px 0;
}

.game-container {
  overflow: hidden;
}

body {
  margin: 0;
  padding: 0;
}

.heading {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
}

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

h1.title {
  font-family: 'Pacifico', cursive;
  font-size: 60px;
  font-weight: bold;
  background: linear-gradient(45deg, 
    #FF69B4, /* Pink */
    #FF1493, /* Deep Pink */
    #FF69B4, /* Pink */
    #C71585  /* Medium Violet Red */
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 
    3px 3px 6px rgba(0,0,0,0.2),
    -3px -3px 6px rgba(255,255,255,0.3);
  animation: 
    title-shimmer 3s infinite alternate,
    gradient-shift 6s ease infinite;
  letter-spacing: 4px;
  text-transform: none;
  margin: 0;
  display: inline-block;
  position: relative;
  text-align: center;
}

h1.title::after {
  content: '🧁';
  position: absolute;
  right: 130px;
  top: -25px;
  font-size: 50px;
  animation: bounce 1s ease-in-out infinite;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@media screen and (max-width: 480px) {
  .container {
    padding: 5px 0;
  }
  
  .heading {
    margin-bottom: 10px;
  }
  
  h1.title {
    font-size: 40px;
  }
  
  h1.title::after {
    font-size: 35px;
    right: -40px;
    top: -3px;
  }
}
  
  #twitter-widget-0 {
    width: 100px !important;    
    position: relative;
  }
  
  .COINWIDGETCOM_CONTAINER {
  position: relative;
  bottom: 5px;
  }
  
  .footer > div{
    display:inline-block !important;
    width: auto !important;
    overflow:hidden;
  }
  
  .footer{
/*    width:188px;*/
    width:265px;
    margin-left: auto;
    margin-right: auto;
    text-align:center;}

@-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; } }
    
  @-webkit-keyframes fade-in-out {
    0% {
      opacity: 0; }
      
    50% {
      opacity: 1; }

    100% {
      opacity: 0; } }

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

    100% {
      opacity: 0; } }

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

    100% {
      opacity: 0; } }
      
  @-webkit-keyframes hover-change {
      0%   {color: cyan;}
      25%  {color: magenta;}
      50%  {color: yellow;}
      100% {color: white;} }

  @-moz-keyframes hover-change {
      0%   {color: cyan;}
      25%  {color: magenta;}
      50%  {color: yellow;}
      100% {color: white;} }
      
  @keyframes hover-change {
      0%   {color: cyan;}
      25%  {color: magenta;}
      50%  {color: yellow;}
      100% {color: white;} }
      
  @-webkit-keyframes background-gradient-change {
      0%   {background: #cff;}
      33%  {background: #fcf;}
      66%  {background: #ffc;}
      100%   {background: #cff;}}

  @-moz-keyframes background-gradient-change {
      0%   {background: #dff;}
      33%  {background: #fdf;}
      66%  {background: #ffd;}
      100%   {background: #dff;}}
      
  @keyframes background-gradient-change {
      0%   {background: #dff;}
      33%  {background: #fdf;}
      66%  {background: #ffd;}
      100%   {background: #dff;}}      
      
  a:hover {
         -webkit-animation: hover-change linear 0.1s infinite;
         -moz-animation: hover-change linear 0.1s infinite;
         animation: hover-change linear 0.1s infinite;
       }      

.scores-container,
.score-container,
.best-container,
.score-label,
.best-label,
.score-points,
.best-points,
.score-addition {
  display: none;
}
  
.game-container .cupcake-says {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;}
  .game-container .cupcake-says p {
    position:fixed;
    font-size: 60px;
    font-weight: bold;
    height: 60px;
    line-height: 60px;
    -webkit-animation: fade-in-out 600ms ease-in;
    -moz-animation: fade-in-out 600ms ease-in;
    animation: fade-in-out 600ms ease-in;
    -webkit-animation-fill-mode: both;
    -moz-animation-fill-mode: both;
    animation-fill-mode: both; }
    

  .info-container, .key-container {
    position: relative;
    cursor: pointer;
    display: inline-block;
    margin-right: 10px;
    background: linear-gradient(135deg, #FF69B4, #C71585);
    padding: 10px 15px;
    height: 10px;
    line-height: 10px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 8px;
    color: white;
    margin-top: 8px;
    width: 36px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
  }

  .info-container:hover, .key-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #FF1493, #DB7093);
  }

  .info-container a, .key-container a {
    color: white;
    text-decoration: none;
    font-family: 'Comic Sans Bold', 'Comic Sans MS', cursive;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .hide-info, .hide-key {
    display: none;
  }
    
.game-container .info, .game-container .key {
    display: none;
    position: absolute;
  overflow-y: auto;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
  background: rgba(255,255,255,0.98);
  z-index: 200;
    border-radius: 6px;
    text-align: center;
  padding: 20px;
}

.game-container .info h2, .game-container .key h2 {
  color: #C71585;
  font-family: 'Pacifico', cursive;
  font-size: 28px;
  margin-bottom: 20px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.game-container .info p {
  position: relative;
  font-size: 16px;
  padding: 12px 20px;
    font-weight: bold;
  margin: 10px 0;
  line-height: 1.6;
  color: #776e65;
}

.game-container .info a {
  color: #C71585;
  text-decoration: none;
    transition: all 0.3s ease;
}

.game-container .info a:hover {
  color: #FF1493;
  text-decoration: underline;
}

.game-container .key .cupcake-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  padding: 10px;
}

.game-container .key p {
  display: flex;
  align-items: center;
  gap: 10px;
      font-size: 16px;
  font-weight: bold;
  color: #776e65;
}

.game-container .key img {
  transition: transform 0.3s ease;
}

.game-container .key img:hover {
  transform: scale(1.1);
}

.score-container:hover, .best-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  background: #D81B93;
}
  .score-container:after, .best-container:after {
    position: absolute;
    width: 100%;
    top: 10px;
    left: 0;
    text-transform: uppercase;
    font-size: 12px;
    line-height: 13px;
    text-align: center;
    color: #000; }
  .score-container .score-addition, .best-container .score-addition {
    position: absolute;
    right: 30px;
    font-size: 20px;
    line-height: 20px;
    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; }

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

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

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

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

strong.important {
  text-transform: uppercase; }

hr {
  border: none;
  border-bottom: 1px solid #d8d4d0;
  margin-top: 20px;
  margin-bottom: 30px; }

.game-container {
  overflow: visible;
}

@-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 {
  position: relative;
  padding: 15px;
  cursor: default;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  background: linear-gradient(135deg, #DB7093, #C71585);
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  width: 500px;
  height: 500px;
  box-sizing: border-box;
  margin: 20px auto;
}

.game-container .game-message {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: 100;
  text-align: center;
  display: none;
  border-radius: 12px;
}

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

    .game-container .game-message a {
      display: inline-block;
      background: #f0f;
      border-radius: 3px;
      padding: 0 20px;
      text-decoration: none;
      color: #f9f6f2;
      height: 40px;
      line-height: 42px;
      margin-left: 9px;
      animation: message-appear 0.5s ease-out 0.3s backwards; }
      .game-container .game-message a.keep-playing-button {
        display: none; }
    .game-container .game-message.game-won {
      background: rgba(199, 21, 133, 0.9);
      animation: message-appear 0.5s ease-out;
      color: white; }
      .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: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.15s ease-in-out;
}

.grid-cell:last-child {
  margin-right: 0;
}

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

.tile, .tile .tile-inner {
  width: 106.25px;
  height: 106.25px;
  line-height: 0;
  -webkit-transform: translate3d(0, 0, 0);  
}

.tile {
  position: absolute;
  transition: all 0.15s ease-in-out;
  border-radius: 8px;
  background-color: transparent;
}

.tile .tile-inner {
  border-radius: 8px;
  width: 100%;
  height: 100%;
  line-height: 0;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-size: 100% !important;
  background-color: transparent !important;
  color: transparent !important;
  text-indent: -9999px;
  font-size: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Desktop tile styles */
  .tile.tile-2 .tile-inner {
  background: url('../img/114/cupcake-vanilla-114.gif') center center no-repeat !important;
  background-size: 100% !important;
}

  .tile.tile-4 .tile-inner {
  background: url('../img/114/cupcake-chocolate-114.gif') center center no-repeat !important;
  background-size: 100% !important;
}

  .tile.tile-8 .tile-inner {
  background: url('../img/114/cupcake-strawberry-114.gif') center center no-repeat !important;
  background-size: 100% !important;
}

  .tile.tile-16 .tile-inner {
  background: url('../img/114/cupcake-mint-114.gif') center center no-repeat !important;
  background-size: 100% !important;
}

  .tile.tile-32 .tile-inner {
  background: url('../img/114/cupcake-blueberry-114.gif') center center no-repeat !important;
  background-size: 100% !important;
}

  .tile.tile-64 .tile-inner {
  background: url('../img/114/cupcake-raspberry-114.gif') center center no-repeat !important;
  background-size: 100% !important;
}

  .tile.tile-128 .tile-inner {
  background: url('../img/114/cupcake-caramel-114.gif') center center no-repeat !important;
  background-size: 100% !important;
}

      .tile.tile-256 .tile-inner {
  background: url('../img/114/cupcake-lemon-114.gif') center center no-repeat !important;
  background-size: 100% !important;
}

      .tile.tile-512 .tile-inner {
  background: url('../img/114/cupcake-cherry-114.gif') center center no-repeat !important;
  background-size: 100% !important;
}

  .tile.tile-1024 .tile-inner {
  background: url('../img/114/cupcake-sprinkles-114.gif') center center no-repeat !important;
  background-size: 100% !important;
}

      .tile.tile-2048 .tile-inner {
  background: url('../img/114/cupcake-deluxe-114.gif') center center no-repeat !important;
  background-size: 100% !important;
}

  .tile.tile-super .tile-inner {
  background: url('../img/114/cupcake-deluxe-114.gif') center center no-repeat !important;
  background-size: 100% !important;
}

/* Grid spacing for desktop */
.tile.tile-position-1-1 { transform: translate(0px, 0px); }
.tile.tile-position-1-2 { transform: translate(0px, 121.25px); }
.tile.tile-position-1-3 { transform: translate(0px, 242.5px); }
.tile.tile-position-1-4 { transform: translate(0px, 363.75px); }
.tile.tile-position-2-1 { transform: translate(121.25px, 0px); }
.tile.tile-position-2-2 { transform: translate(121.25px, 121.25px); }
.tile.tile-position-2-3 { transform: translate(121.25px, 242.5px); }
.tile.tile-position-2-4 { transform: translate(121.25px, 363.75px); }
.tile.tile-position-3-1 { transform: translate(242.5px, 0px); }
.tile.tile-position-3-2 { transform: translate(242.5px, 121.25px); }
.tile.tile-position-3-3 { transform: translate(242.5px, 242.5px); }
.tile.tile-position-3-4 { transform: translate(242.5px, 363.75px); }
.tile.tile-position-4-1 { transform: translate(363.75px, 0px); }
.tile.tile-position-4-2 { transform: translate(363.75px, 121.25px); }
.tile.tile-position-4-3 { transform: translate(363.75px, 242.5px); }
.tile.tile-position-4-4 { transform: translate(363.75px, 363.75px); }

/* Mobile styles */
    @media screen and (max-width: 480px) {
  .tile, .tile .tile-inner {
    width: 57.5px;
    height: 57.5px;
    line-height: 0;
  }

  .grid-cell {
    width: 57.5px;
    height: 57.5px;
    margin-right: 10px;
  }

  /* Mobile tile positioning */
  .tile.tile-position-1-1 { transform: translate(0px, 0px); }
  .tile.tile-position-1-2 { transform: translate(0px, 67.5px); }
  .tile.tile-position-1-3 { transform: translate(0px, 135px); }
  .tile.tile-position-1-4 { transform: translate(0px, 202.5px); }
  .tile.tile-position-2-1 { transform: translate(67.5px, 0px); }
  .tile.tile-position-2-2 { transform: translate(67.5px, 67.5px); }
  .tile.tile-position-2-3 { transform: translate(67.5px, 135px); }
  .tile.tile-position-2-4 { transform: translate(67.5px, 202.5px); }
  .tile.tile-position-3-1 { transform: translate(135px, 0px); }
  .tile.tile-position-3-2 { transform: translate(135px, 67.5px); }
  .tile.tile-position-3-3 { transform: translate(135px, 135px); }
  .tile.tile-position-3-4 { transform: translate(135px, 202.5px); }
  .tile.tile-position-4-1 { transform: translate(202.5px, 0px); }
  .tile.tile-position-4-2 { transform: translate(202.5px, 67.5px); }
  .tile.tile-position-4-3 { transform: translate(202.5px, 135px); }
  .tile.tile-position-4-4 { transform: translate(202.5px, 202.5px); }

  .game-container {
    width: 280px;
    height: 280px;
    padding: 10px;
  }

  .info-container, .key-container {
    padding: 8px 12px;
    font-size: 9px;
    width: 32px;
    height: 9px;
    line-height: 9px;
  }

  .game-container .info, .game-container .key {
    padding: 15px;
  }
  
  .game-container .info h2, .game-container .key h2 {
    font-size: 24px;
    margin-bottom: 15px;
  }

  .game-container .info p {
    font-size: 14px;
    padding: 8px 15px;
  }

  .game-container .key img {
    width: 45px;
    height: 45px;
  }

  .game-container .key p {
    font-size: 14px;
    gap: 8px;
  }
}

/* Animation styles */
.tile-new .tile-inner {
  animation: appear 200ms ease 100ms;
  animation-fill-mode: backwards;
}

.tile.tile-merged .tile-inner {
  animation: pop 200ms ease 100ms;
  animation-fill-mode: backwards;
}

@keyframes appear {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pop {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* Update game intro styles */
.game-intro {
  text-align: center;
  margin: 15px auto 25px;
  font-family: 'Pacifico', cursive;
  font-size: 27px;
  line-height: 1.3;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.intro-text, .intro-highlight {
  display: inline-block;
  animation: fadeIn 0.8s ease-out;
}

.intro-text {
  color: #776e65;
}

.intro-highlight {
  color: #C71585;
  position: relative;
  animation: popIn 0.8s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  padding: 0 5px;
}

.intro-highlight::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #FF69B4, #C71585);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s ease;
}

.intro-highlight:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

@media screen and (max-width: 480px) {
  .game-intro {
    font-size: 19px;
    margin: 10px auto 20px;
    gap: 5px;
  }
  
  .intro-highlight {
    padding: 0 3px;
  }
}

.game-explanation, .shout-out {
  margin-top: 0px;
  text-align: center;
  font-size: 14px;}

.button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 20px 0;
  width: 100%;
}

.game-button, .score-display, .best-display {
  background: linear-gradient(135deg, #FF69B4, #C71585);
  border: none;
  border-radius: 8px;
  padding: 8px 15px;
  color: white;
  font-family: 'Comic Sans Bold', 'Comic Sans MS', cursive;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 80px;
  text-align: center;
}

.game-button:hover, .score-display:hover, .best-display:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #FF1493, #DB7093);
}

.game-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.score-display, .best-display {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 10px;
  min-width: 45px;
}

.score-text, .best-text {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: bold;
  color: #C71585;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-shadow: none;
}

.score-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 2px;
  letter-spacing: 0.5px;
}

.score-value, .best-value {
  color: white;
  font-size: 14px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Score addition animation */
.score-addition {
      position: absolute;
  right: 30px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 18px;
  font-weight: bold;
      z-index: 100;
  animation: move-up 600ms ease-in;
  animation-fill-mode: both;
}

@keyframes move-up {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-25px);
  }
}

/* Mobile Styles */
      @media screen and (max-width: 480px) {
  .button-container {
    gap: 12px;
    margin: 15px 0;
  }

  .game-button {
    padding: 12px 20px;
    font-size: 16px;
  }

  .score-display, .best-display {
    padding: 4px 8px;
    min-width: 40px;
  }

  .score-label {
    font-size: 9px;
  }

  .score-value, .best-value {
    font-size: 12px;
  }

  .score-text, .best-text {
    font-size: 8px;
    top: -14px;
  }
}
    
/* Update the info button style to match other buttons */
.info-button, .blocks-button {
  min-width: 80px !important;
  padding: 8px 15px !important;
  font-size: 14px !important;
  text-transform: capitalize;
  letter-spacing: 0.5px;
}

/* Remove the old info container styles */
.info-container, .key-container {
  display: none !important;
}

/* Mobile adjustments */
@media screen and (max-width: 480px) {
  .info-button, .blocks-button {
    min-width: 50px !important;
    padding: 6px 10px !important;
    font-size: 10px !important;
  }

  /* Adjust button container gap for better spacing */
  .button-container {
    gap: 10px;  /* Reduced gap for mobile to fit all buttons */
  }
}
    
/* Add initial display states */
.grid-container, .tile-container {
  display: block !important;
}

/* Ensure proper stacking context */
  .game-container {
  position: relative;
  z-index: 1;
}

/* Make sure info and key content is visible */
.game-container .info *, .game-container .key * {
  z-index: 201; /* Higher than parent */
}
    
/* Update modal styles */
.info-modal {
      display: none;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(3px);
  z-index: 999999 !important; /* Increased z-index */
  overflow-y: auto;
}

.info-content {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  background: white !important;
  padding: 30px !important;
  border-radius: 20px !important;
  width: 90% !important;
  max-width: 500px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
  z-index: 1000000 !important; /* Increased z-index */
  margin: 20px auto !important;
}

/* Ensure button is clickable */
.info-button {
  position: relative;
      z-index: 100;
  cursor: pointer;
}

/* Hide old elements */
.info, .info-container, .key-container {
  display: none !important;
}

/* Force modal on top */
body.modal-open .info-modal {
  display: block !important;
}

.info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.info-header h2 {
        color: #C71585;
  font-family: 'Pacifico', cursive;
  font-size: 32px;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.close-button {
  background: none;
  border: none;
  font-size: 36px;
  color: #776e65;
  cursor: pointer;
  padding: 0 10px;
        transition: all 0.3s ease;
}

.close-button:hover {
  color: #C71585;
  transform: scale(1.1);
}

.instruction-section, .credits-section {
  margin-bottom: 30px;
}

.instruction-section h3, .credits-section h3 {
  color: #C71585;
  font-size: 24px;
  margin-bottom: 20px;
  font-family: 'Comic Sans Bold', 'Comic Sans MS', cursive;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin: 25px 0;
}

.control-item {
  text-align: center;
}

.control-item span {
        display: inline-block;
  width: 50px;
  height: 50px;
  line-height: 50px;
  background: linear-gradient(135deg, #FF69B4, #C71585);
        color: white;
  border-radius: 12px;
  font-size: 24px;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}

.control-item:hover span {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.info-body p {
  font-size: 18px;
  line-height: 1.6;
  color: #776e65;
  margin: 15px 0;
}

/* Mobile adjustments */
@media screen and (max-width: 480px) {
  .info-content {
    padding: 20px;
  }

  .info-header h2 {
    font-size: 24px;
  }

  .instruction-section h3, .credits-section h3 {
    font-size: 20px;
  }

  .controls {
    gap: 15px;
  }

  .control-item span {
    width: 40px;
        height: 40px;
    line-height: 40px;
    font-size: 20px;
  }

  .info-body p {
    font-size: 16px;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -45%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Add these styles for the blocks modal */
.blocks-modal {
      display: none;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(3px);
  z-index: 999999 !important;
  overflow-y: auto;
}

.blocks-content {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  background: white !important;
  padding: 30px !important;
  border-radius: 20px !important;
  width: 90% !important;
  max-width: 600px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
  z-index: 1000000 !important;
  margin: 20px auto !important;
}

.blocks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.blocks-header h2 {
        color: #C71585;
  font-family: 'Pacifico', cursive;
  font-size: 32px;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.close-button-blocks {
  background: none;
  border: none;
  font-size: 36px;
  color: #776e65;
  cursor: pointer;
  padding: 0 10px;
        transition: all 0.3s ease;
}

.close-button-blocks:hover {
  color: #C71585;
  transform: scale(1.1);
}

.cupcake-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cupcake-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cupcake-row p {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  color: #776e65;
  margin: 0;
}

.cupcake-row img {
  transition: transform 0.3s ease;
}

.cupcake-row img:hover {
  transform: scale(1.1);
}

@media screen and (max-width: 480px) {
  .blocks-content {
    padding: 20px !important;
  }

  .blocks-header h2 {
    font-size: 24px;
  }

  .cupcake-row {
    gap: 10px;
  }

  .cupcake-row p {
    font-size: 14px;
  }

  .cupcake-row img {
    width: 45px;
    height: 45px;
  }
}
    
/* Update footer styles */
.footer {
  position: relative;
  width: auto;
  max-width: 600px;
  margin: 40px auto 20px;
  padding: 20px;
  text-align: center;
  background: linear-gradient(
    to right,
    rgba(255, 105, 180, 0.1),
    rgba(199, 21, 133, 0.1)
  );
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.footer-content {
  margin: 0 auto;
}

.footer-text {
  color: #776e65;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 15px;
  font-family: 'Comic Sans', 'Comic Sans MS', Chalkboard, Helvetica, Arial, sans-serif;
}

.footer-links {
  padding: 10px 0;
  border-top: 2px solid rgba(199, 21, 133, 0.1);
}

.footer-links a {
  color: #C71585;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
      position: relative;
  padding: 0 5px;
}

.footer-links a:hover {
  color: #FF1493;
}

.footer-links a::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(to right, #FF69B4, #C71585);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.footer-links a:hover::after {
  transform: scaleX(1);
}

.separator {
  color: #776e65;
  margin: 0 5px;
  opacity: 0.5;
    }

      @media screen and (max-width: 480px) {
  .footer {
    margin: 30px auto 15px;
    padding: 15px;
  }

  .footer-text {
    font-size: 14px;
  }

  .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .footer-links a {
      font-size: 12px;
  }

  .separator {
      display: none;
  }
}
    
/* Update Floating Dock Styles for vertical layout */
.floating-dock {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
      background: rgba(255, 255, 255, 0.95);
  padding: 10px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(199, 21, 133, 0.2);
  display: flex;
  flex-direction: column;  /* Changed to column */
  gap: 10px;
  z-index: 1000;
  backdrop-filter: blur(5px);
  border: 2px solid rgba(255, 105, 180, 0.1);
  transition: all 0.3s ease;
}

.dock-button {
  width: 40px;
        height: 40px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #FF69B4, #C71585);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
        transition: all 0.3s ease;
      position: relative;
}

.dock-button:hover {
  transform: translateX(-3px);  /* Changed from translateY to translateX */
  box-shadow: -4px 0 12px rgba(199, 21, 133, 0.3);
}

.dock-button:active {
  transform: translateX(0);
}

.dock-tooltip {
    position: absolute;
  left: auto;  /* Reset left positioning */
  right: 100%;  /* Position tooltip to the left of buttons */
  top: 50%;
  bottom: auto;  /* Reset bottom positioning */
  transform: translateY(-50%);  /* Center vertically */
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
      font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  margin-right: 10px;  /* Space between tooltip and button */
}

.dock-button:hover .dock-tooltip {
  opacity: 1;
}

@media screen and (max-width: 480px) {
  .floating-dock {
    right: 10px;
    padding: 8px;
  }
}
    
/* Dark Mode Styles */
body.dark-mode {
  background: #1a1a1a !important;
  -webkit-animation: none !important;
  -moz-animation: none !important;
  animation: none !important;
}

body.dark-mode .container {
  background: #2d2d2d;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Keep game container and other elements with original styling */
body.dark-mode .game-container {
  background: linear-gradient(135deg, #FF69B4, #C71585);
}

body.dark-mode .footer {
  background: #2d2d2d;  /* Solid dark background instead of rgba */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 105, 180, 0.1);
}

body.dark-mode .footer-links {
  border-top: 2px solid rgba(255, 105, 180, 0.1);  /* Update border color for dark mode */
}

body.dark-mode .separator {
  color: #f0f0f0;
  opacity: 0.3;  /* Reduced opacity for dark mode */
}

body.dark-mode .footer-text {
  color: #f0f0f0;
}

body.dark-mode .footer-links a {
  color: #FF69B4;  /* Brighter pink for better contrast */
}

body.dark-mode .footer-links a:hover {
  color: #FF1493;
}

body.dark-mode .floating-dock {
  background: rgba(45, 45, 45, 0.95);
  border-color: rgba(255, 105, 180, 0.2);
}

body.dark-mode .intro-text {
  color: #f0f0f0;
}

body.dark-mode .game-explanation {
  color: #f0f0f0;
}

/* Modal styles for dark mode */
body.dark-mode .info-modal,
body.dark-mode .blocks-modal {
  background: rgba(0, 0, 0, 0.8);
}

body.dark-mode .info-content,
body.dark-mode .blocks-content {
  background: #2d2d2d !important;
}

body.dark-mode .info-body p,
body.dark-mode .cupcake-row p {
  color: #f0f0f0;
}

/* Update cupcake glow effect for dark mode */
body.dark-mode h1.title {
  /* Keep original title gradient and effects */
  background: linear-gradient(45deg, 
    #FF69B4, /* Pink */
    #FF1493, /* Deep Pink */
    #FF69B4, /* Pink */
    #C71585  /* Medium Violet Red */
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 
    3px 3px 6px rgba(0,0,0,0.2),
    -3px -3px 6px rgba(255,255,255,0.3);
}

body.dark-mode h1.title::after {
  content: '🧁';
  -webkit-text-fill-color: initial; /* Reset text fill for emoji */
  background: none; /* Remove gradient from emoji */
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8))
          drop-shadow(0 0 10px rgba(255, 255, 255, 0.5))
          drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
  text-shadow: 
    0 0 10px rgba(255, 255, 255, 0.8),
    0 0 20px rgba(255, 255, 255, 0.4),
    0 0 30px rgba(255, 255, 255, 0.2),
    /* Outline effect */
    -1px -1px 0 rgba(255, 255, 255, 0.7),
    1px -1px 0 rgba(255, 255, 255, 0.7),
    -1px 1px 0 rgba(255, 255, 255, 0.7),
    1px 1px 0 rgba(255, 255, 255, 0.7);
  animation: 
    bounce 1s ease-in-out infinite,
    glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8))
            drop-shadow(0 0 10px rgba(255, 255, 255, 0.5))
            drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
  }
  to {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9))
            drop-shadow(0 0 15px rgba(255, 255, 255, 0.6))
            drop-shadow(0 0 20px rgba(255, 255, 255, 0.4));
  }
}
    
/* Updated Ad Container Styles */
.ad-container {
    max-width: 500px;
    margin: 30px auto;
    text-align: center;
    overflow: hidden;
    min-height: 90px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.98));
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 6px 20px rgba(199, 21, 133, 0.1);
    border: 2px solid rgba(255, 105, 180, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.ad-label {
      font-size: 12px;
  color: #776e65;
  opacity: 0.7;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ad-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(199, 21, 133, 0.15);
}

@media screen and (max-width: 480px) {
    .ad-container {
        margin: 20px auto;
        min-height: 50px;
        padding: 12px;
        max-width: 90%;
    }
    
    .ad-label {
        font-size: 10px;
        margin-bottom: 6px;
    }
}

/* Dark mode support for ad container */
body.dark-mode .ad-container {
  background: linear-gradient(to right, rgba(45, 45, 45, 0.95), rgba(45, 45, 45, 0.98));
  border-color: rgba(255, 105, 180, 0.2);
}

body.dark-mode .ad-label {
  color: #f0f0f0;
  opacity: 0.5;
}
    
