body {
  margin: 0;
  font-family: sans-serif;
  background: url("assets/fon.gif") no-repeat center center fixed;
  background-size: cover;
}

#intro-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

#intro-screen h1 {
  font-family: 'Press Start 2P', cursive;
  font-size: 2.5em;
  color: #fff;
  text-shadow: 
    2px 2px 0 #000,
    -2px 2px 0 #000,
    2px -2px 0 #000,
    -2px -2px 0 #000,
    4px 4px 0 #333,
    -4px 4px 0 #333,
    4px -4px 0 #333,
    -4px -4px 0 #333;
  letter-spacing: 2px;
}

#intro-screen button, #start-btn {
  font-family: 'Press Start 2P', cursive;
  font-size: 1em; /* Daha küçük ve uyumlu */
  padding: 12px 30px;
  cursor: pointer;
  background: linear-gradient(45deg, #ff6b6b, #ff8e53);
  color: #fff;
  border: 3px solid #000;
  border-radius: 8px;
  box-shadow: 0 4px 0 #000, 0 6px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}

#intro-screen button:hover, #start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #000, 0 8px 15px rgba(0, 0, 0, 0.5);
}

#intro-screen button:active, #start-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #000, 0 4px 8px rgba(0, 0, 0, 0.3);
}

.hidden {
  display: none !important;
}

#game-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 30px;
  height: 100vh;
}

#sound-toggle {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 40px;
  cursor: pointer;
}

#game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#game-board {
  display: grid;
  grid-template-columns: repeat(8, 80px);
  grid-template-rows: repeat(8, 80px);
  gap: 4px;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.3);
  padding: 5px;
  border-radius: 10px;
}

.candy {
  width: 80px;
  height: 80px;
  background-size: cover;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: grab;
}

.candy.selected {
  transform: scale(1.15); /* Daha belirgin seçilme */
  box-shadow: 0 0 15px rgba(255, 255, 255, 1), 0 0 20px rgba(255, 255, 0, 0.8); /* Çift parlama */
  z-index: 10;
}

.candy:active {
  cursor: grabbing;
}

.candy.pop {
  animation: pop 0.6s ease-out; /* Daha uzun ve akıcı */
}

@keyframes pop {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.7); opacity: 0.6; box-shadow: 0 0 20px rgba(255, 255, 0, 1), 0 0 30px rgba(255, 0, 0, 0.8); } /* Daha güçlü parlama */
  100% { transform: scale(0); opacity: 0; }
}

#ui-bar {
  display: flex;
  justify-content: space-around; /* Daha dengeli dağılım */
  align-items: center;
  width: 100%;
  max-width: 600px; /* Daha kompakt */
  color: white;
  font-family: 'Press Start 2P', cursive;
  margin-top: 10px;
}

#score, #timer {
  background: linear-gradient(45deg, #333, #555); /* Daha uyumlu arka plan */
  padding: 12px 25px;
  border-radius: 8px;
  border: 2px solid #000;
  text-align: center;
  font-size: 1.1em;
  width: 120px; /* Sabit genişlik */
  box-shadow: 0 4px 0 #000, 0 6px 10px rgba(0, 0, 0, 0.5);
}

#score span {
  font-size: 0.9em;
  display: block;
  margin-bottom: 5px;
}

#timer {
  width: 100px;
}

#start-btn {
  margin: 0; /* Simetri için */
}