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

.tools-parent-container {
    position: relative;
}

.tools-parent-container .container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.tools-parent-container .header {
  padding: 20px;
  margin-bottom: 30px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.tools-parent-container .main-title {
  font-size: 3.5rem;
  margin-bottom: 10px;
  text-shadow: 1px 4px 0 #ff6b6b, 1px 2px 0 #4ecdc4;
  animation: titleGlow 2s infinite alternate;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}
.tools-parent-container .title-emoji {
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}
@keyframes titleGlow {
  from {
    text-shadow: 0px 0px 0 #ff6b6b, 2px 2px 0 #4ecdc4;
  }
  to {
    text-shadow: 0px 0px 0 #ff9999, 3px 3px 0 #7ae0d9, 3px 2px 0 #ff6b6b;
  }
}
.tools-parent-container .subtitle {
  font-size: 1.5rem;
  margin-bottom: 30px;
}
.tools-parent-container .games-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-bottom: 40px;
  width: 100%;
}
.tools-parent-container .game-card {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 20px;
  width: 300px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  backdrop-filter: blur(10px);
  border: 3px solid rgba(255, 255, 255, 0.3);
}
.tools-parent-container .game-card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}
.tools-parent-container .game-icon {
  font-size: 4rem;
  margin-bottom: 15px;
}
.tools-parent-container .game-title {
  font-size: 1.8rem;
  margin-bottom: 10px;
}
.tools-parent-container .game-desc {
  font-size: 1rem;
  margin-bottom: 15px;
}
.tools-parent-container .game-screen {
  display: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 20px;
  margin-top: 20px;
  backdrop-filter: blur(10px);
  border: 3px solid rgba(255, 255, 255, 0.3);
  overflow: auto;
}
.tools-parent-container .game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
      width: 100%;
}
.tools-parent-container .back-btn {
  background: #ff6b6b;
  border: none;
  border-radius: 50px;
  padding: 10px 20px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}
.tools-parent-container .back-btn:hover {
  background: #ff5252;
  transform: scale(1.1);
}
.tools-parent-container .level-selector {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}
.tools-parent-container .level-btn {
  background: rgba(255, 255, 255, 0.3);
  border: none;
  border-radius: 50px;
  padding: 10px 20px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}
.tools-parent-container .level-btn.active {
  background: #4ecdc4;
  transform: scale(1.1);
}
.tools-parent-container .missing-game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.tools-parent-container .boxes-container {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tools-parent-container .box {
  width: 280px;
  min-height: 320px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 4px dashed rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s;
}
.tools-parent-container .box-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #ffd166;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
.tools-parent-container .items-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  width: 100%;
}
.tools-parent-container .item {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.2rem;
  cursor: pointer;
  transition: all 0.3s;
  border: 3px solid transparent;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.tools-parent-container .item:hover {
  transform: scale(1.1);
  border: 3px solid #4ecdc4;
}
.tools-parent-container .item.selected {
  transform: scale(1.15);
  border: 3px solid #ffd166;
  box-shadow: 0 0 15px #ffd166;
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 15px #ffd166;
  }
  50% {
    box-shadow: 0 0 25px #ffd166;
  }
  100% {
    box-shadow: 0 0 15px #ffd166;
  }
}
.tools-parent-container .wrong-box {
  animation: shake 0.5s, blinkRed 0.5s 3;
}
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}
@keyframes blinkRed {
  0%, 100% {
    border-color: rgba(255, 255, 255, 0.4);
  }
  50% {
    border-color: rgba(255, 0, 0, 0.7);
  }
}
.tools-parent-container .pixel-game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.tools-parent-container .reference-container {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.tools-parent-container .reference-image {
  width: 150px;
  height: 150px;
  border: 3px solid white;
  border-radius: 10px;
  background: white;
  display: grid;
  gap: 1px;
  padding: 5px;
}
.tools-parent-container .reference-pixel {
  width: 100%;
  height: 100%;
  border-radius: 2px;
}
.tools-parent-container .pixel-canvas {
  display: grid;
  gap: 2px;
  margin: 0 auto 20px;
  background: rgba(0, 0, 0, 0.2);
  
  border-radius: 10px;
}
.tools-parent-container .pixel {
  width: 30px;
  height: 30px;
  background: white;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.tools-parent-container .pixel:hover {
  transform: scale(1.1);
}
.tools-parent-container .color-palette {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tools-parent-container .color-option {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid white;
  transition: transform 0.2s;
}
.tools-parent-container .color-option:hover {
  transform: scale(1.2);
}
.tools-parent-container .color-option.active {
  transform: scale(1.3);
  box-shadow: 0 0 10px white;
}
.tools-parent-container .hint-btn {
  background: #ffd166;
  color: #333;
}
.tools-parent-container .game-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}
.tools-parent-container .control-btn {
  background: #4ecdc4;
  border: none;
  border-radius: 50px;
  padding: 12px 25px;
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s;
}
.tools-parent-container .control-btn:hover {
  background: #3db8af;
  transform: scale(1.1);
}
.tools-parent-container .instructions {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: left;
}
.tools-parent-container .instructions h3 {
  margin-bottom: 10px;
  color: #4ecdc4;
}
.tools-parent-container .instructions p {
  margin-bottom: 10px;
  line-height: 1.5;
}
.tools-parent-container .message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 20px 40px;
  border-radius: 15px;
  font-size: 1.5rem;
  z-index: 100;
  display: none;
  animation: popIn 0.5s;
}
@keyframes popIn {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}
.tools-parent-container {
  /* Progress indicator */
}
.tools-parent-container .progress {
  font-size: 1.2rem;
  margin-bottom: 10px;
  border: 0;
    box-shadow: none;
}
.tools-parent-container {
  /* Success animations */
}
.tools-parent-container .success-star {
  position: fixed;
  font-size: 4rem;
  z-index: 100;
  animation: starFloat 2s ease-out forwards;
}
@keyframes starFloat {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.5) rotate(180deg);
    opacity: 1;
  }
  100% {
    transform: scale(2) rotate(360deg);
    opacity: 0;
  }
}
.tools-parent-container .blast {
  position: fixed;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, #ffd166, #ff9e6d, #ff6b6b);
  border-radius: 50%;
  z-index: 99;
  animation: blast 1s ease-out forwards;
}
@keyframes blast {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}
.tools-parent-container {
  /* Background animations - Limited */
}
.tools-parent-container .background-animations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.tools-parent-container .cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  z-index: -1;
}
.tools-parent-container .star {
  position: absolute;
  background: white;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  z-index: -1;
}
.tools-parent-container .bubble {
  position: absolute;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  z-index: -1;
}
.tools-parent-container .confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  z-index: 10;
}

div.tool-bg{ 
background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
            background-size: 400% 400%;
            animation: gradientBG 15s ease infinite;
            color: white;
            overflow-x: hidden;

            padding: 20px;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(10deg);
  }
}
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes moveRight {
  from {
    transform: translateX(-100px);
  }
  to {
    transform: translateX(calc(100vw + 100px));
  }
}
@keyframes moveUp {
  from {
    transform: translateY(100vh);
  }
  to {
    transform: translateY(-200px);
  }
}
.tools-parent-container {
  /* Responsive design */
}
@media (max-width: 768px) {
  .tools-parent-container .main-title {
    font-size: 2.5rem;
  }
  .tools-parent-container .games-container {
    flex-direction: column;
    align-items: center;
  }
  .tools-parent-container .game-card {
    width: 100%;
    max-width: 350px;
  }
  .tools-parent-container .boxes-container {
    flex-direction: column;
    align-items: center;
  }
  .tools-parent-container .box {
    width: 100%;
    max-width: 300px;
  }
  .tools-parent-container .item {
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
  }
  .tools-parent-container .pixel {
    width: 25px;
    height: 25px;
  }
  .tools-parent-container .reference-image {
    width: 120px;
    height: 120px;
  }
}
@media (max-width: 480px) {
  .tools-parent-container .main-title {
    font-size: 2rem;
  }
  .tools-parent-container .box {
    width: 100%;
    max-width: 260px;
    min-height: 280px;
  }
  .tools-parent-container .item {
    width: 50px;
    height: 50px;
    font-size: 1.6rem;
  }
  .tools-parent-container .pixel {
    width: 25px;
    height: 25px;
  }
  .tools-parent-container .reference-image {
    width: 100px;
    height: 100px;
  }
  .tools-parent-container .reference-container {
    flex-direction: column;
  }
  .tools-parent-container .game-header {
    flex-direction: column;
  }
}