body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(180deg, #6a1020 0%, #4a0712 100%);
  color: white;
  min-height: 100vh;
}

.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-height: 100vh;
  text-align: center;
}

.hidden { display: none; }

.game-title {
  font-size: 100px;
  font-weight: 900;
  margin: 6px 0 20px;
  position: relative;
  display: inline-block;
  background: linear-gradient(
    90deg,
    #ffb347,
    #ff6a88,
    #9d50bb,
    #ff6a88,
    #ffb347
  );
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shineText 5s linear infinite;
}

@keyframes shineText {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.welcome-title {
  font-size: 48px;
  font-weight: 700;
  color: #ffe7c8;
  margin: 10px 0 14px;
  text-shadow: 0 3px 10px rgba(0,0,0,0.5);
  letter-spacing: 2px;
  animation: glow 2.5s ease-in-out infinite;
}

@keyframes glow {
  0%   { text-shadow: 0 0 6px rgba(255,231,200,0.5), 0 0 12px rgba(255,200,150,0.3); }
  50%  { text-shadow: 0 0 14px rgba(255,231,200,0.8), 0 0 28px rgba(255,200,150,0.6); }
  100% { text-shadow: 0 0 6px rgba(255,231,200,0.5), 0 0 12px rgba(255,200,150,0.3); }
}

.subtitle {
  font-size: 18px;
  color: #ddd;
  margin-bottom: 18px;
}

.highlight {
  font-size: 20px;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 0 0 8px #ffb347, 0 0 12px #ff6a88;
  animation: glowText 2s ease-in-out infinite alternate;
}

@keyframes glowText {
  0% { text-shadow: 0 0 6px #ffd700, 0 0 12px #ffb347; }
  100% { text-shadow: 0 0 16px #ffea00, 0 0 24px #ff6a88; }
}

.levels-title {
  font-size: 44px;
  margin-bottom: 26px;
  color: #ffd6a5;
  text-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.big-btn {
  padding: 18px 48px;
  font-size: 26px;
  border-radius: 14px;
  border: none;
  background: #ffd6a5;
  color: #5b0b1e;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  font-weight: bold;
  animation: textGlow 3s ease-in-out infinite;
}

.small-btn {
  padding: 10px 18px;
  font-size: 16px;
  border-radius: 10px;
  border: none;
  background: #fff;
  color: #3a2a2a;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.levels-grid {
  display: flex;
  gap: 26px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.level-btn {
  width: 200px;
  height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 18px;
  border: none;
  background: linear-gradient(135deg, #ffd6a5, #ff9a9e);
  color: #5b0b1e;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: transform .16s ease;
}

.level-btn.disabled {
  background: #aaa;
  color: #555;
  cursor: not-allowed;
}

.game-area {
  position: relative;
  width: 90%;
  max-width: 600px;
  height: 300px;
  margin: 18px auto;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,214,165,0.2);
  box-shadow: inset 0 6px 20px rgba(0,0,0,0.4);
}

.hud {
  display:flex;
  gap:20px;
  justify-content:center;
  align-items:center;
  margin-top:8px;
}

#scoreText, #timerText, #scoreText2, #timerText2 {
  font-size:18px;
  color:#ffd6a5;
  font-weight:700;
}

/* Estrelas e bolinhas */
.star {
  position: absolute;
  font-size: 40px;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: transform .12s ease;
}
.star:active { transform: scale(.9); }

.color-ball {
  position: absolute;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  z-index: 10;
}
.lose-title {
  font-size: 60px;
  font-weight: 900;
  background: linear-gradient(90deg, #ff4c4c, #ff8080, #ff4c4c);
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shineText 5s linear infinite;
  margin-bottom: 20px;
}
/* Grid do jogo da memória */
.memory-grid {
  display: grid;
  gap: 12px;
  justify-content: center;
  margin: 20px auto;
  max-width: 420px;
}

/* Cartas do jogo da memória */
.memory-card {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #ffd6a5, #ff9a9e);
  color: #5b0b1e;
  font-size: 42px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s ease, background 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.memory-card.flipped {
  background: #fff;
  color: #333;
  transform: scale(1.05);
}
