body.default{
  margin: 0;
  padding: 0;                  
  background: var(--bg);  
  color: var(--text);
  font-family: 'Orbitron', 'Courier New', monospace;
  min-height: 100vh; 
  display: flex;
  flex-direction: column;
  align-items: center;
  /* background: radial-gradient(circle at top left, #16213e 0%, var(--bg) 60%); */ 
  background-image:
  linear-gradient(
    rgba(0, 255, 170, 0.12) 0.08rem,
    transparent 0.08rem
  ),
  linear-gradient(
    90deg,
    rgba(0, 255, 170, 0.12) 0.08rem,
    transparent 0.08rem
  );
background-size: 2.5rem 2.5rem;
  
}

:root {
    --bg: #0d0d1a;
    --card: #1a1a2e;
    --text: #e0e0ff;
    --accent: #00ffff;   
    --purple: #9d4edd;
    --red: #ff2e63;
    --green: #39ff14;
  }

 *{
  padding:0;
  margin:0;
  box-sizing:border-box ;
}
  /* =========== Loading Animation========== */
  .loading-screen{
      position:fixed;
      top:0;
      left:0;
      width:100%;
      height:100%;
      background:#000000;
      display:flex;
      flex-direction:column;
      align-items:center;
      justify-content:center;
      z-index:99999;
      color:#08D549;
      font-family:'Orbitron',sans-serif;
  }
  /* From Uiverse.io by Nawsome */ 
.banter-loader {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  margin-left: -36px;
  margin-top: -36px;
  background:#000;
}

.banter-loader__box {
  float: left;
  position: relative;
  width: 20px;
  height: 20px;
  margin-right: 6px;
}

.banter-loader__box:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    #000000,
    #08d549
  );
}

.banter-loader__box:nth-child(3n) {
  margin-right: 0;
  margin-bottom: 6px;
}

.banter-loader__box:nth-child(1):before, .banter-loader__box:nth-child(4):before {
  margin-left: 26px;
}

.banter-loader__box:nth-child(3):before {
  margin-top: 52px;
}

.banter-loader__box:last-child {
  margin-bottom: 0;
}

@keyframes moveBox-1 {
  9.0909090909% {
    transform: translate(-26px, 0);
  }

  18.1818181818% {
    transform: translate(0px, 0);
  }

  27.2727272727% {
    transform: translate(0px, 0);
  }

  36.3636363636% {
    transform: translate(26px, 0);
  }

  45.4545454545% {
    transform: translate(26px, 26px);
  }

  54.5454545455% {
    transform: translate(26px, 26px);
  }

  63.6363636364% {
    transform: translate(26px, 26px);
  }

  72.7272727273% {
    transform: translate(26px, 0px);
  }

  81.8181818182% {
    transform: translate(0px, 0px);
  }

  90.9090909091% {
    transform: translate(-26px, 0px);
  }

  100% {
    transform: translate(0px, 0px);
  }
}

.banter-loader__box:nth-child(1) {
  animation: moveBox-1 4s infinite;
}

@keyframes moveBox-2 {
  9.0909090909% {
    transform: translate(0, 0);
  }

  18.1818181818% {
    transform: translate(26px, 0);
  }

  27.2727272727% {
    transform: translate(0px, 0);
  }

  36.3636363636% {
    transform: translate(26px, 0);
  }

  45.4545454545% {
    transform: translate(26px, 26px);
  }

  54.5454545455% {
    transform: translate(26px, 26px);
  }

  63.6363636364% {
    transform: translate(26px, 26px);
  }

  72.7272727273% {
    transform: translate(26px, 26px);
  }

  81.8181818182% {
    transform: translate(0px, 26px);
  }

  90.9090909091% {
    transform: translate(0px, 26px);
  }

  100% {
    transform: translate(0px, 0px);
  }
}

.banter-loader__box:nth-child(2) {
  animation: moveBox-2 4s infinite;
}

@keyframes moveBox-3 {
  9.0909090909% {
    transform: translate(-26px, 0);
  }

  18.1818181818% {
    transform: translate(-26px, 0);
  }

  27.2727272727% {
    transform: translate(0px, 0);
  }

  36.3636363636% {
    transform: translate(-26px, 0);
  }

  45.4545454545% {
    transform: translate(-26px, 0);
  }

  54.5454545455% {
    transform: translate(-26px, 0);
  }

  63.6363636364% {
    transform: translate(-26px, 0);
  }

  72.7272727273% {
    transform: translate(-26px, 0);
  }

  81.8181818182% {
    transform: translate(-26px, -26px);
  }

  90.9090909091% {
    transform: translate(0px, -26px);
  }

  100% {
    transform: translate(0px, 0px);
  }
}

.banter-loader__box:nth-child(3) {
  animation: moveBox-3 4s infinite;
}

@keyframes moveBox-4 {
  9.0909090909% {
    transform: translate(-26px, 0);
  }

  18.1818181818% {
    transform: translate(-26px, 0);
  }

  27.2727272727% {
    transform: translate(-26px, -26px);
  }

  36.3636363636% {
    transform: translate(0px, -26px);
  }

  45.4545454545% {
    transform: translate(0px, 0px);
  }

  54.5454545455% {
    transform: translate(0px, -26px);
  }

  63.6363636364% {
    transform: translate(0px, -26px);
  }

  72.7272727273% {
    transform: translate(0px, -26px);
  }

  81.8181818182% {
    transform: translate(-26px, -26px);
  }

  90.9090909091% {
    transform: translate(-26px, 0px);
  }

  100% {
    transform: translate(0px, 0px);
  }
}

.banter-loader__box:nth-child(4) {
  animation: moveBox-4 4s infinite;
}

@keyframes moveBox-5 {
  9.0909090909% {
    transform: translate(0, 0);
  }

  18.1818181818% {
    transform: translate(0, 0);
  }

  27.2727272727% {
    transform: translate(0, 0);
  }

  36.3636363636% {
    transform: translate(26px, 0);
  }

  45.4545454545% {
    transform: translate(26px, 0);
  }

  54.5454545455% {
    transform: translate(26px, 0);
  }

  63.6363636364% {
    transform: translate(26px, 0);
  }

  72.7272727273% {
    transform: translate(26px, 0);
  }

  81.8181818182% {
    transform: translate(26px, -26px);
  }

  90.9090909091% {
    transform: translate(0px, -26px);
  }

  100% {
    transform: translate(0px, 0px);
  }
}

.banter-loader__box:nth-child(5) {
  animation: moveBox-5 4s infinite;
}

@keyframes moveBox-6 {
  9.0909090909% {
    transform: translate(0, 0);
  }

  18.1818181818% {
    transform: translate(-26px, 0);
  }

  27.2727272727% {
    transform: translate(-26px, 0);
  }

  36.3636363636% {
    transform: translate(0px, 0);
  }

  45.4545454545% {
    transform: translate(0px, 0);
  }

  54.5454545455% {
    transform: translate(0px, 0);
  }

  63.6363636364% {
    transform: translate(0px, 0);
  }

  72.7272727273% {
    transform: translate(0px, 26px);
  }

  81.8181818182% {
    transform: translate(-26px, 26px);
  }

  90.9090909091% {
    transform: translate(-26px, 0px);
  }

  100% {
    transform: translate(0px, 0px);
  }
}

.banter-loader__box:nth-child(6) {
  animation: moveBox-6 4s infinite;
}

@keyframes moveBox-7 {
  9.0909090909% {
    transform: translate(26px, 0);
  }

  18.1818181818% {
    transform: translate(26px, 0);
  }

  27.2727272727% {
    transform: translate(26px, 0);
  }

  36.3636363636% {
    transform: translate(0px, 0);
  }

  45.4545454545% {
    transform: translate(0px, -26px);
  }

  54.5454545455% {
    transform: translate(26px, -26px);
  }

  63.6363636364% {
    transform: translate(0px, -26px);
  }

  72.7272727273% {
    transform: translate(0px, -26px);
  }

  81.8181818182% {
    transform: translate(0px, 0px);
  }

  90.9090909091% {
    transform: translate(26px, 0px);
  }

  100% {
    transform: translate(0px, 0px);
  }
}

.banter-loader__box:nth-child(7) {
  animation: moveBox-7 4s infinite;
}

@keyframes moveBox-8 {
  9.0909090909% {
    transform: translate(0, 0);
  }

  18.1818181818% {
    transform: translate(-26px, 0);
  }

  27.2727272727% {
    transform: translate(-26px, -26px);
  }

  36.3636363636% {
    transform: translate(0px, -26px);
  }

  45.4545454545% {
    transform: translate(0px, -26px);
  }

  54.5454545455% {
    transform: translate(0px, -26px);
  }

  63.6363636364% {
    transform: translate(0px, -26px);
  }

  72.7272727273% {
    transform: translate(0px, -26px);
  }

  81.8181818182% {
    transform: translate(26px, -26px);
  }

  90.9090909091% {
    transform: translate(26px, 0px);
  }

  100% {
    transform: translate(0px, 0px);
  }
}

.banter-loader__box:nth-child(8) {
  animation: moveBox-8 4s infinite;
}

@keyframes moveBox-9 {
  9.0909090909% {
    transform: translate(-26px, 0);
  }

  18.1818181818% {
    transform: translate(-26px, 0);
  }

  27.2727272727% {
    transform: translate(0px, 0);
  }

  36.3636363636% {
    transform: translate(-26px, 0);
  }

  45.4545454545% {
    transform: translate(0px, 0);
  }

  54.5454545455% {
    transform: translate(0px, 0);
  }

  63.6363636364% {
    transform: translate(-26px, 0);
  }

  72.7272727273% {
    transform: translate(-26px, 0);
  }

  81.8181818182% {
    transform: translate(-52px, 0);
  }

  90.9090909091% {
    transform: translate(-26px, 0);
  }

  100% {
    transform: translate(0px, 0);
  }
}

.banter-loader__box:nth-child(9) {
  animation: moveBox-9 4s infinite;
}
  /* ============ Menu Styling ============*/
  .sound-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 34px;
  border-radius: 40px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #00ffff;
  color: #00ffff;
  font-size: 0.95rem;
  letter-spacing: 2px;
  text-align: center;
  box-shadow: 0 0 18px rgba(0, 255, 255, 0.4);
}

.sound-menu summary::-webkit-details-marker {
  display: none;
}

.sound-options {
  margin-top: 14px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(0, 255, 255, 0.25);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.15);
}

.sound-option {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 12px 18px;
  background: transparent;
  border: 1px solid rgba(0, 255, 255, 0.35);
  border-radius: 30px;
  color: #00ffff;
  font-size: 0.75rem;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sound-option:hover {
  background: #00ffff;
  color: #000;
  box-shadow: 0 0 18px #00ffff;
}

.sound-option.active {
  border-color: #39ff14;
  color: #39ff14;
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.6);
}
   /* HEADER */
  .header {
    position: fixed;
    top: -20px;
    width: 100%;
    height: 70px;
    background: rgba(10,10,30,0.9);
    border-bottom: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* padding: 0 20px;  */
    padding: 1.5rem; 
    z-index: 1000;
    backdrop-filter: blur(10px);
  }
  .logo { font-size: 1.5rem; background: linear-gradient(90deg, #00ffff, #16832d); -webkit-background-clip: text; color: transparent; }
  .level-info { font-size: 1.1rem; color: var(--accent); }

  /* HAMBURGER BUTTON */
  #hamburger {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-size: 1.8rem;
    padding: 8px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
  }
  #hamburger:hover { background: var(--accent); color: black; }

  /* MENU OVERLAY */
  .menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,20,0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
    z-index: 9999;
  }
  .menu-overlay.active { opacity: 1; pointer-events: all; }

  .menu {
    background: var(--card);
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    border: 3px solid var(--accent);
    padding: 30px 20px; 
    text-align: center;
    box-shadow: 0 0 80px var(--accent);
    max-height: 90vh;
    overflow-y: auto;
  }
  .menu h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #00ffff, #16832d);
    -webkit-background-clip: text;
    color: transparent;
  }

  /* USER INFO */
  .user-info {
    background: rgba(0,255,255,0.1);
    padding: 15px;
    border-radius: 15px;
    margin: 20px 0;
    border: 1px solid var(--accent);
  }
  .signin-btn {
    background: var(--accent);
    color: black;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
  }

  /* DIFFICULTY LIST */
  .difficulty-list {
    margin: 30px 0;
  }
  .diff-item {
    background: rgba(255,255,255,0.05);
    padding: 15px;
    margin: 10px 0;
    border-radius: 15px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
  }
  .diff-item.active {
    border-color: var(--accent);
    background: rgba(0,255,255,0.15);
    box-shadow: 0 0 30px var(--accent);
  }
  .diff-item:hover { transform: translateY(-5px); }

  .menu-btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    border-radius: 15px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
  }
  a.menu-btn{
      text-decoration: none;
  }
  .menu-btn:hover {
    background: var(--accent);
    color: black;
  }
  
  

.diff-btn {
  padding: 12px 20px;
  background: transparent;
  border: 2px solid rgba(0, 255, 255, 0.4);
  color: #00ffff;
  font-family: 'Orbitron', monospace;
  font-weight: bold;
  font-size: 0.9rem;
  letter-spacing: 2px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.4s ease;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
  min-width: 130px;
}

.diff-btn:hover {
  background: rgba(0, 255, 255, 0.15);
  border-color: #00ffff;
  box-shadow: 0 0 25px #00ffff;
  transform: translateY(-3px);
}

.diff-btn.active {
  background: linear-gradient(45deg, #00ffff, #0099ff);
  color: black;
  border-color: #00ffff;
  box-shadow: 0 0 30px #00ffff, 0 0 50px rgba(0, 255, 255, 0.6);
  transform: scale(1.05);
}

/* Level Display */
#level-display {
  margin: 10px 0;
  font-size: 1.4rem;
  color: #00ffff;
  text-shadow: 0 0 15px #00ffff;
  font-weight: bold;
}

#level-display span {
  color: #39ff14;
  text-shadow: 0 0 20px #39ff14;
}

/* Make header subtitle glow */
.subtitle {
  font-size: 1rem;
  opacity: 0.8;
  letter-spacing: 4px;
  background: linear-gradient(90deg, #00ffff, #ff00ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-top: 8px;
}


  
  .header {
    margin: 20px 0 30px;
    text-align: center;
  }
  h1 {
    font-size: 3.5rem;
    background: linear-gradient(90deg, var(--accent), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    letter-spacing: 4px;
  }
  .subtitle {
    font-size: 1rem;
    opacity: 0.7;
    margin-top: 8px;
    letter-spacing: 3px;
  }

  .scoreboard {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }
  .score-box {
    background: var(--card);
    padding: 15px 30px;
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    min-width: 140px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
  }
  .score-box h3 {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
  }
  .score-box .value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent);
  }

  /* Gems Panel — dim and mysterious until earned */
  .gems-panel {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 30px 0;
    flex-wrap: wrap;
  }
  .gem {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    background: rgba(255,255,255,0.03);
    border: 2px solid rgba(255,255,255,0.1);
    box-shadow: 
      inset 0 0 20px rgba(0,0,0,0.6),
      0 0 15px rgba(0, 255, 255, 0.05);
    transition: all 0.4s ease;
    position: relative;
    cursor: not-allowed;
  }
  .gem.dim {
    opacity: 0.2;
    filter: grayscale(100%);
  }
  .gem.active {
    opacity: 1;
    filter: none;
    border-color: var(--accent);
    box-shadow: 
      0 0 30px var(--accent),
      inset 0 0 20px rgba(0, 255, 255, 0.2);
    transform: scale(1.1);
  }
  .gem-label {
    font-size: 0.7rem;
    margin-top: 6px;
    opacity: 0.6;
    letter-spacing: 1px;
  }
  .gem-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--red);
    color: white;
    font-size: 0.8rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
  }
  .gem.has-count .gem-count { opacity: 1; }
  /* tile merge animations */
  .tile.new {
  animation: popIn 0.2s ease-out forwards;
}

.tile.merge {
  animation: mergePop 0.25s ease-out forwards;
}

@keyframes popIn {
  0% {
    transform: scale(0) rotate(0deg);
  }
  50% {
    transform: scale(1.2) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes mergePop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.4);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  }
}

/* Gem Drop Animation */
.gem-drop {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  font-size: 40px;
  animation: gemDrop 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  text-shadow: 0 0 20px currentColor;
}

@keyframes gemDrop {
  0% {
    transform: scale(0) rotate(180deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.3) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) translateY(0) rotate(360deg);
    opacity: 0;
  }
}



  /* Grid Container */
  .grid-container {
    width: 420px;
    max-width: 95vw;
    margin: 20px auto;
    padding: 15px;
    background: var(--card);
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: 
      0 0 40px rgba(0, 255, 255, 0.15),
      inset 0 0 30px rgba(0, 0, 0, 0.5);
  }
  /* Testing */
  .pink {
    width: 420px;
    max-width: 95vw;
    margin: 20px auto;
    padding: 15px;
    background: pink;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: 
      0 0 40px rgba(0, 255, 255, 0.15),
      inset 0 0 30px rgba(0, 0, 0, 0.5);
  }
  
  #grid {
    width: 100%;
    aspect-ratio: 1;
     background: #0f0f1a; 
   /*  background: #f4aaff; */
    border-radius: 15px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 12px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
  }
  .tile {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 2.5rem;
    color: var(--text);
    transition: all 0.2s ease;
    position: relative;
  transform: translateY(0);
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  /* Mobile friendly */
  @media (max-width: 480px) {
    h1 { font-size: 2.5rem; }
    .scoreboard { gap: 20px; }
    .score-box { padding: 12px 20px; }
    .gem { width: 70px; height: 70px; font-size: 30px; }
    .grid-container { padding: 10px; }
  }
  
  
  /* ===================================== */
/* NEON 2048 — FULL VISUAL OVERHAUL     */
/* ===================================== */

:root {
  --bg: #0d0d1a;
  --card: #1a1a2e;
  --text: #e0e0ff;
  --accent: #00ffff;
  --purple: #9d4edd;
  --red: #ff2e63;
  --green: #39ff14;
  --gold: #ffd700;
}

/* TILE COLORS — Each number has its own vibe */
.tile { 
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 2.8rem;
  color: white;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.tile-1     { background: #333; color: #888; }
.tile-2     { background: #eee4da; color: #776e65; }
.tile-4     { background: #ede0c8; color: #776e65; }
.tile-8     { background: #f2b179; color: white; }
.tile-16    { background: #f59563; color: white; }
.tile-32    { background: #f67c5f; color: white; }
.tile-64    { background: #f65e3b; color: white; }
.tile-128   { background: #edcf72; color: white; font-size: 2.2rem; box-shadow: 0 0 30px #edcf72; }
.tile-256   { background: #edcc61; color: white; font-size: 2.2rem; box-shadow: 0 0 35px #edcc61; }
.tile-512   { background: #edc850; color: white; font-size: 2.2rem; box-shadow: 0 0 40px #edc850; }
.tile-1024  { background: #edc53f; color: white; font-size: 1.8rem; box-shadow: 0 0 50px #edc53f; }
.tile-2048  { background: #edc22e; color: white; font-size: 1.8rem; box-shadow: 0 0 60px #edc22e, 0 0 100px #edc22e; animation: pulse-glow 2s infinite; }
.tile-4096  { background: #ff6b6b; color: white; font-size: 1.6rem; box-shadow: 0 0 80px #ff6b6b; animation: pulse-glow 1.5s infinite; }

/* ANIMATIONS */
.tile.new {
  animation: popIn 0.25s ease-out;
}
.tile.merge {
  animation: mergePop 0.3s ease-out;
}
@keyframes popIn {
  0% { transform: scale(0) rotate(30deg); opacity: 0; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes mergePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.5); box-shadow: 0 0 50px gold; }
  100% { transform: scale(1); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 60px #edc22e; }
  50% { box-shadow: 0 0 100px #edc22e, 0 0 140px #ff00aa; }
}

/* SWITCHER SELECTION — Electric Border */
.tile.selected {
  z-index: 10;
  border: 4px solid #00ffff !important;
  box-shadow: 
    0 0 30px #00ffff,
    0 0 60px #00ffff,
    inset 0 0 30px rgba(0, 255, 255, 0.4) !important;
  animation: electricPulse 1.5s infinite;
  transform: scale(1.08);
}
@keyframes electricPulse {
  0%, 100% { box-shadow: 0 0 30px #00ffff; }
  50% { box-shadow: 0 0 50px #00ffff, 0 0 80px #00ffff; }
}

/* GRIDER — Implosion + Shatter */
.grider-effect {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: radial-gradient(circle, transparent 40%, #ff3300 100%);
  animation: griderBoom 0.6s ease-out forwards;
  pointer-events: none;
}
@keyframes griderBoom {
  0% { transform: scale(0.3); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.8; }
  100% { transform: scale(2); opacity: 0; }
}

/* BOMB — Full Row Shockwave */
.bomb-shockwave {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  background: #ff2e63;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  animation: shockwave 0.8s ease-out forwards;
}
@keyframes shockwave {
  0% { 
    width: 20px; height: 20px; 
    box-shadow: 0 0 0 0 rgba(255, 46, 99, 0.7);
  }
  70% { 
    box-shadow: 0 0 0 200px rgba(255, 46, 99, 0);
  }
  100% { 
    box-shadow: 0 0 0 0 rgba(255, 46, 99, 0);
  }
}

/* Gem Drop — Already perfect, just enhanced */
.gem-drop {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  font-size: 50px;
  animation: gemDrop 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  text-shadow: 0 0 30px currentColor;
  filter: drop-shadow(0 0 20px currentColor);
}


/* HARD MODE — DOOMED CELL + COUNTDOWN TIMER */
.tile.doomed {
  animation: pulseRed 1.5s infinite;
  border: 5px solid #ff0044 !important;
  box-shadow: 
    0 0 40px #ff0044,
    0 0 80px #ff0044,
    inset 0 0 30px rgba(255, 0, 68, 0.6) !important;
  z-index: 10;
}

@keyframes pulseRed {
  0%, 100% { box-shadow: 0 0 40px #ff0044; }
  50%      { box-shadow: 0 0 80px #ff0044, 0 0 120px #ff0044; }
}

/* CIRCULAR COUNTDOWN TIMER — EPIC & VISIBLE */
.attack-timer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 140px;
  z-index: 9999;
  pointer-events: none;
}

.timer-ring {
  width: 100%;
  height: 100%;
  border: 10px solid transparent;
  border-top-color: #ff0044;
  border-radius: 50%;
  animation: spinRing 10s linear forwards;
  box-shadow: 0 0 50px #ff0044;
}

.timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  font-weight: bold;
  color: #ff0044;
  text-shadow: 0 0 30px #ff0044;
}

@keyframes spinRing {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* -200 FLYING TEXT */
@keyframes flyUp {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-150px); opacity: 0; }
}
  
  
  /* ======= sign in CSS ======== 
  
  .user-info {
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(0, 255, 255, 0.05);
  border: 1px solid #00ffff33;
  border-radius: 15px;
}

.signin-btn {
  padding: 14px 20px;
  background: #00ffff;
  color: #000;
  border: none;
  border-radius: 50px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 20px #00ffff;
  transition: all 0.3s;
  font-size: 1rem;
}

.signin-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px #00ffff;
}

#user-display img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #00ffff;
  box-shadow: 0 0 20px #00ffff;
}
  
 
*/


/* ======== Modals for Email and Username =======*/

.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.modal-content {
  background: #0d0d1a;
  padding: 30px;
  border-radius: 20px;
  border: 2px solid #00ffff;
  box-shadow: 0 0 40px #00ffff;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.modal-content h2 {
  color: #00ffff;
  margin-bottom: 20px;
  font-size: 2rem;
}

.modal-content input {
  width: 100%;
  padding: 15px;
  margin: 10px 0;
  background: #000;
  border: 1px solid #00ffff;
  color: #e0e0ff;
  border-radius: 10px;
  font-size: 1rem;
}

.modal-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.modal-buttons button {
  flex: 1;
  padding: 15px;
  background: #00ffff; 
  color: #000;
  border: none;
  border-radius: 50px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 20px #00ffff;
}

#username-cancel-btn {
  background: #ff0044;
}

/* ==== Shake Animation if Username is Taken ==== */

.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
  20%, 40%, 60%, 80% { transform: translateX(10px); }
}


 /* Spinner styling */
/* From Uiverse.io by david-mohseni */ 
.spinner {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 10px;
  display: none;
}

.spinner div {
  width: 8%;
  height: 24%;
  background: rgb(128, 128, 128);
  position: absolute;
  left: 50%;
  top: 30%;
  opacity: 0;
  border-radius: 50px;
  box-shadow: 0 0 3px rgba(0,0,0,0.2);
  animation: fade458 1s linear infinite;
}

@keyframes fade458 {
  from {
    opacity: 1;
  }

  to {
    opacity: 0.25;
  }
}

.spinner .bar1 {
  transform: rotate(0deg) translate(0, -130%);
  animation-delay: 0s;
}

.spinner .bar2 {
  transform: rotate(30deg) translate(0, -130%);
  animation-delay: -1.1s;
}

.spinner .bar3 {
  transform: rotate(60deg) translate(0, -130%);
  animation-delay: -1s;
}

.spinner .bar4 {
  transform: rotate(90deg) translate(0, -130%);
  animation-delay: -0.9s;
}

.spinner .bar5 {
  transform: rotate(120deg) translate(0, -130%);
  animation-delay: -0.8s;
}

.spinner .bar6 {
  transform: rotate(150deg) translate(0, -130%);
  animation-delay: -0.7s;
}

.spinner .bar7 {
  transform: rotate(180deg) translate(0, -130%);
  animation-delay: -0.6s;
}

.spinner .bar8 {
  transform: rotate(210deg) translate(0, -130%);
  animation-delay: -0.5s;
}

.spinner .bar9 {
  transform: rotate(240deg) translate(0, -130%);
  animation-delay: -0.4s;
}

.spinner .bar10 {
  transform: rotate(270deg) translate(0, -130%);
  animation-delay: -0.3s;
}

.spinner .bar11 {
  transform: rotate(300deg) translate(0, -130%);
  animation-delay: -0.2s;
}

.spinner .bar12 {
  transform: rotate(330deg) translate(0, -130%);
  animation-delay: -0.1s;
}


.site-footer {
  margin-top: 90px;
  width:100%;
  padding: 55px 20px;
   background: radial-gradient(
    circle at top,
    rgba(0, 255, 255, 0.06),
    rgba(0, 0, 0, 0.95) 60%
  ); 
  border-top: 1px solid rgba(0, 255, 255, 0.25);
  font-family: 'Orbitron', sans-serif;
  color: #00ffff;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  font-size: 1.1rem;
  letter-spacing: 1.5px;
}

.brand-name {
  color: #16832d;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.footer-tagline {
  margin-top: 8px;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(0, 255, 255, 0.65);
}

.footer-socials {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 26px;
}

.footer-socials a {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(0, 255, 255, 0.7);
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid rgba(0, 255, 255, 0.25);
  border-radius: 20px;
  transition: all 0.25s ease;
}

.footer-socials a:hover {
  color: #000;
  background: #00ffff;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

.footer-credit {
  margin-top: 28px;
  font-size: 0.7rem;
  letter-spacing: 1px;
  color: rgba(0, 255, 255, 0.45);
}

.footer-credit span {
  color: rgba(0, 255, 255, 0.8);
}


/* ===============================
   🌸 PINK CINDERELLA THEME
================================ */

.theme-cinderella .tile-1 {
  background: #2b1b24;
  color: #f6c1da;
}

.theme-cinderella .tile-2 {
  background: #fde2ec;
  color: #8a3a62;
}

.theme-cinderella .tile-4 {
  background: #fbc1d9;
  color: #7a2952;
}

.theme-cinderella .tile-8 {
  background: #f9a1c4;
  color: #fff;
}

.theme-cinderella .tile-16 {
  background: #f57bb0;
  color: #fff;
}

.theme-cinderella .tile-32 {
  background: #f1539a;
  color: #fff;
}

.theme-cinderella .tile-64 {
  background: #ec2f86;
  color: #fff;
}

/* Glow starts here ✨ */
.theme-cinderella .tile-128 {
  background: #ff7ac8;
  color: #fff;
  font-size: 2.2rem;
  box-shadow: 0 0 25px #ff7ac8;
}

.theme-cinderella .tile-256 {
  background: #ff4fb3;
  color: #fff;
  font-size: 2.2rem;
  box-shadow: 0 0 35px #ff4fb3;
}

.theme-cinderella .tile-512 {
  background: #ff299e;
  color: #fff;
  font-size: 2.2rem;
  box-shadow: 0 0 45px #ff299e;
}

.theme-cinderella .tile-1024 {
  background: #ff008c;
  color: #fff;
  font-size: 1.8rem;
  box-shadow: 0 0 60px #ff008c;
}

/* 👑 Princess final boss */
.theme-cinderella .tile-2048 {
  background: linear-gradient(135deg, #ff69c6, #ff1493);
  color: #fff;
  font-size: 1.8rem;
  box-shadow:
    0 0 60px #ff69c6,
    0 0 100px #ff1493;
  animation: cinderella-glow 2s infinite;
}

.theme-cinderella .tile-4096 {
  background: linear-gradient(135deg, #ff1493, #c8006e);
  color: #fff;
  font-size: 1.6rem;
  box-shadow:
    0 0 80px #ff1493,
    0 0 140px #c8006e;
  animation: cinderella-glow 1.4s infinite;
}

/* ✨ Magical glow animation */
@keyframes cinderella-glow {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Dialog Box */
.dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: #1a1a2e;
  color: #ffffff;
  padding: 22px 24px;
  width: min(90%, 420px);
  border-radius: 12px;
  border: 2px solid #39ff14;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
  opacity: 0;
}

/* Visible state */
.dialog.show {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Title */
.dialog h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #39ff14;
}

/* Text */
.dialog p {
  line-height: 1.5;
  opacity: 0.9;
}

/* Actions */
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

/* Buttons (same theme) */
.btn {
  font: inherit;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
}

.btn.cancel {
  background: transparent;
  color: #ffffff;
  border: 1px solid #555;
}

.btn.cancel:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn.confirm {
  background: #39ff14;
  color: #1a1a2e;
  font-weight: 600;
}

.btn.confirm:hover {
  filter: brightness(1.1);
}

/* From Uiverse.io by cssbuttons-io */ 
.button {
  align-items: center;
  background-image: linear-gradient(144deg, #39ff14, #39ff14 50%, #00ffff);
  border: 0;
  border-radius: 8px;
  box-shadow: rgba(151, 65, 252, 0.2) 0 15px 30px -5px;
  box-sizing: border-box;
  color: #ffffff;
  display: flex;
  font-size: 18px;
  justify-content: center;
  line-height: 1em;
  max-width: 100%;
  min-width: 140px;
  padding: 3px;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s;
}

.button:active,
.button:hover {
  outline: 0;
  color: #000;
}

.button span {
  background-color: rgb(5, 6, 45);
  padding: 16px 24px;
  border-radius: 6px;
  width: 100%;
  height: 100%;
  transition: 300ms;
}

.button:hover span {
  background: none;
}

.button:active {
  transform: scale(0.9);
}

















