/* New Year 2048 主题样式 - 自动生成 */

html body[data-theme="newyear-2048"] {
  background: rgba(25, 25, 35, 1) !important;
  min-height: 100vh;
}


    .tile.tile-2 .tile-inner {
      background-image: url('/games/newyear-2048/assets/images/tiles/2.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: transparent;
    }
      
    .tile.tile-4 .tile-inner {
      background-image: url('/games/newyear-2048/assets/images/tiles/4.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: transparent;
    }
      
    .tile.tile-8 .tile-inner {
      background-image: url('/games/newyear-2048/assets/images/tiles/8.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: transparent;
    }
      
    .tile.tile-16 .tile-inner {
      background-image: url('/games/newyear-2048/assets/images/tiles/16.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: transparent;
    }
      
    .tile.tile-32 .tile-inner {
      background-image: url('/games/newyear-2048/assets/images/tiles/32.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: transparent;
    }
      
    .tile.tile-64 .tile-inner {
      background-image: url('/games/newyear-2048/assets/images/tiles/64.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: transparent;
    }
      
    .tile.tile-128 .tile-inner {
      background-image: url('/games/newyear-2048/assets/images/tiles/128.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: transparent;
    }
      
    .tile.tile-256 .tile-inner {
      background-image: url('/games/newyear-2048/assets/images/tiles/256.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: transparent;
    }
      
    .tile.tile-512 .tile-inner {
      background-image: url('/games/newyear-2048/assets/images/tiles/512.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: transparent;
    }
      
    .tile.tile-1024 .tile-inner {
      background-image: url('/games/newyear-2048/assets/images/tiles/1024.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: transparent;
    }
      
    .tile.tile-2048 .tile-inner {
      background-image: url('/games/newyear-2048/assets/images/tiles/2048.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: transparent;
    }
      
    .mini-tile-2 {
      background: #ecf0f1;
      background-color: #ecf0f1;
      background-image: url('/games/newyear-2048/assets/images/tiles/2.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: #2c3e50;
      font-size: 16px;
    }
      
    .mini-tile-4 {
      background: #bdc3c7;
      background-color: #bdc3c7;
      background-image: url('/games/newyear-2048/assets/images/tiles/4.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: #2c3e50;
      font-size: 16px;
    }
      
    .mini-tile-8 {
      background: #e67e22;
      background-color: #e67e22;
      background-image: url('/games/newyear-2048/assets/images/tiles/8.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: #ecf0f1;
      font-size: 16px;
    }
      
    .mini-tile-16 {
      background: #e74c3c;
      background-color: #e74c3c;
      background-image: url('/games/newyear-2048/assets/images/tiles/16.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: #ecf0f1;
      font-size: 16px;
    }
      
    .mini-tile-32 {
      background: #9b59b6;
      background-color: #9b59b6;
      background-image: url('/games/newyear-2048/assets/images/tiles/32.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: #ecf0f1;
      font-size: 16px;
    }
      
    .mini-tile-64 {
      background: #8e44ad;
      background-color: #8e44ad;
      background-image: url('/games/newyear-2048/assets/images/tiles/64.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: #ecf0f1;
      font-size: 16px;
    }
      
    .mini-tile-128 {
      background: #f1c40f;
      background-color: #f1c40f;
      background-image: url('/games/newyear-2048/assets/images/tiles/128.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: #2c3e50;
      font-size: 14px;
    }
      
    .mini-tile-256 {
      background: #f39c12;
      background-color: #f39c12;
      background-image: url('/games/newyear-2048/assets/images/tiles/256.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: #2c3e50;
      font-size: 14px;
    }
      
    .mini-tile-512 {
      background: #d35400;
      background-color: #d35400;
      background-image: url('/games/newyear-2048/assets/images/tiles/512.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: #ecf0f1;
      font-size: 14px;
    }
      
    .mini-tile-1024 {
      background: #c0392b;
      background-color: #c0392b;
      background-image: url('/games/newyear-2048/assets/images/tiles/1024.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: #ecf0f1;
      font-size: 12px;
    }
      
    .mini-tile-2048 {
      background: #27ae60;
      background-color: #27ae60;
      background-image: url('/games/newyear-2048/assets/images/tiles/2048.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      color: #ecf0f1;
      font-size: 12px;
    }
      
/* 游戏组件样式 - 主题配置 */
html body[data-theme="newyear-2048"] {
  --text-color: #ecf0f1;
  --guide-text: #ecf0f1;
  --button-bg: #e74c3c;
  color: #ecf0f1;
}

.restart-button, .keep-playing-button, .retry-button {
  background: #e74c3c !important;
  color: #ecf0f1 !important;
}

.important, .game-explanation .important {
  color: #f39c12;
}

.game-container .game-message p,
.game-container .game-message.game-won p {
  color: #f39c12 !important;
}

.grid-cell {
  background: rgba(52, 73, 94, 0.4);
}

.tile {
  /* 移除背景色，避免在DOM操作时显示错误的背景色 */
  border-radius: 3px;
}

.tile-inner {
  color: #ecf0f1;
}
    

/* 数字方块颜色样式 */
.tile.tile-2 .tile-inner {
  background: #ecf0f1 !important;
  background-color: #ecf0f1 !important;
  color: #2c3e50 !important;
  opacity: 1 !important;
}
.tile.tile-4 .tile-inner {
  background: #bdc3c7 !important;
  background-color: #bdc3c7 !important;
  color: #2c3e50 !important;
  opacity: 1 !important;
}
.tile.tile-8 .tile-inner {
  background: #e67e22 !important;
  background-color: #e67e22 !important;
  color: #ecf0f1 !important;
  opacity: 1 !important;
}
.tile.tile-16 .tile-inner {
  background: #e74c3c !important;
  background-color: #e74c3c !important;
  color: #ecf0f1 !important;
  opacity: 1 !important;
}
.tile.tile-32 .tile-inner {
  background: #9b59b6 !important;
  background-color: #9b59b6 !important;
  color: #ecf0f1 !important;
  opacity: 1 !important;
}
.tile.tile-64 .tile-inner {
  background: #8e44ad !important;
  background-color: #8e44ad !important;
  color: #ecf0f1 !important;
  opacity: 1 !important;
}
.tile.tile-128 .tile-inner {
  background: #f1c40f !important;
  background-color: #f1c40f !important;
  color: #2c3e50 !important;
  opacity: 1 !important;
}
.tile.tile-256 .tile-inner {
  background: #f39c12 !important;
  background-color: #f39c12 !important;
  color: #2c3e50 !important;
  opacity: 1 !important;
}
.tile.tile-512 .tile-inner {
  background: #d35400 !important;
  background-color: #d35400 !important;
  color: #ecf0f1 !important;
  opacity: 1 !important;
}
.tile.tile-1024 .tile-inner {
  background: #c0392b !important;
  background-color: #c0392b !important;
  color: #ecf0f1 !important;
  opacity: 1 !important;
}
.tile.tile-2048 .tile-inner {
  background: #27ae60 !important;
  background-color: #27ae60 !important;
  color: #ecf0f1 !important;
  opacity: 1 !important;
}
/* 游戏指南和更多主题区域的背景色 */
.tile-guide,
.more-themes {
  background: rgba(255, 255, 255, 0.1) !important;
}

.game-intro {
  color: #ecf0f1;
}

.game-explanation {
  color: #ecf0f1;
}

/* 游戏说明相关颜色 */
.tile-description {
  color: #ecf0f1;
}

.tile-description strong {
  color: #f39c12;
}

.ultimate-goal {
  color: #ecf0f1;
}
    
/* 终极合并结果(2048)的突出显示 */
.mini-tile-2048.merge-result {
  transform: scale(1.05) !important;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4), 0 0 8px rgba(255, 215, 0, 0.3) !important;
  border: 1px solid #FFD700 !important;
}

/* 终极合并结果的小星星也要更突出 */
.mini-tile-2048.merge-result::before,
.mini-tile-2048.merge-result::after {
  font-size: 16px !important;
  /* animation: sparkle-ultimate 2s ease-in-out infinite !important; */ /* 暂时注释掉小星星动画 */
  filter: drop-shadow(0 0 5px #FFD700) !important;
}

@keyframes sparkle-ultimate {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1) rotate(0deg);
  }
  25% {
    opacity: 1;
    transform: scale(1.3) rotate(90deg);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1) rotate(180deg);
  }
  75% {
    opacity: 1;
    transform: scale(1.2) rotate(270deg);
  }
}

/* 简化的小星星样式 - 确保在图片上方显示 */
.mini-tile.merge-result::after {
  content: '✨';
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 14px;
  /* animation: sparkle 1.5s ease-in-out infinite; */ /* 暂时注释掉小星星动画 */
  z-index: 1000;
  pointer-events: none; /* 确保不影响鼠标事件 */
  background: none;
}

/* 图片主题下的小星星要更明显 */
[data-theme="newyear-2048"] .mini-tile.merge-result::after {
  color: #FFD700;
  text-shadow: 0 0 5px rgba(255, 215, 0, 1);
  font-weight: bold;
  background: none;
  background-image: none !important;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* 终极2048合并结果的特殊小星星 */
[data-theme="newyear-2048"] .mini-tile-2048.merge-result::after {
  font-size: 14px;
  color: #FFD700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 1);
  font-weight: bold;
  /* animation: sparkle-ultimate 2s ease-in-out infinite; */ /* 暂时注释掉小星星动画 */
  width: 20px;
  height: 20px;
}

@keyframes sparkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* 分数增加动画文字颜色 */
[data-theme="newyear-2048"] .score-addition {
  color: rgba(236, 240, 241, 0.7) !important;
}
    