/* Macaron Breaker - Cute Styling */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #FFF9F5 0%, #FFE8F0 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

.game-container {
  position: relative;
  width: 800px;
  height: 600px;
  background: #FFF9F5;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 16px;
}

/* UI Overlay */
.ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  pointer-events: none;
}

.ui-overlay > * {
  pointer-events: auto;
}

/* Buttons */
.btn {
  padding: 16px 48px;
  font-size: 20px;
  font-weight: bold;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn:hover,
.btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  outline: 3px solid rgba(255, 179, 217, 0.5);
  outline-offset: 2px;
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
  background: linear-gradient(135deg, #FFB3D9 0%, #FF8FC7 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #FFD4E8 0%, #FFB3D9 100%);
}

.btn-secondary {
  background: linear-gradient(135deg, #C7B3FF 0%, #B08FFF 100%);
  color: white;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #E0D4FF 0%, #C7B3FF 100%);
}

/* Level Select */
.level-cards {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
}

.level-card {
  width: 180px;
  height: 220px;
  background: linear-gradient(135deg, #FFB3D9 0%, #C7B3FF 100%);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
}

.level-card:hover:not(.locked),
.level-card:focus:not(.locked) {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  outline: 3px solid rgba(255, 179, 217, 0.5);
  outline-offset: 2px;
}

.level-card.locked {
  background: linear-gradient(135deg, #D1D5DB 0%, #9CA3AF 100%);
  cursor: not-allowed;
  opacity: 0.6;
}

.level-number {
  font-size: 64px;
  font-weight: bold;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.level-name {
  font-size: 20px;
  font-weight: bold;
  color: white;
  text-align: center;
}

.level-difficulty {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.lock-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  opacity: 0.8;
}

/* Modal */
.modal {
  background: rgba(255, 249, 245, 0.98);
  border-radius: 24px;
  padding: 48px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 500px;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal h2 {
  font-size: 48px;
  color: #FFB3D9;
  margin-bottom: 24px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.score-display {
  font-size: 28px;
  color: #5A4A5A;
  margin: 24px 0;
  font-weight: bold;
}

.score-display span {
  color: #FFB3D9;
  font-size: 36px;
}

.victory-message {
  font-size: 20px;
  color: #8B7B8B;
  margin-bottom: 16px;
}

.button-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 32px;
}

.button-group .btn {
  padding: 12px 32px;
  font-size: 16px;
}

/* Game Hint */
.game-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  color: #8B7B8B;
  text-align: center;
  line-height: 1.6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  animation: hintFadeIn 0.5s ease;
}

@keyframes hintFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 600px) {
  .game-container {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }

  #game-canvas {
    border-radius: 0;
  }

  .level-cards {
    flex-direction: column;
    gap: 16px;
  }

  .level-card {
    width: 280px;
    height: 120px;
    flex-direction: row;
    padding: 16px;
  }

  .level-number {
    font-size: 48px;
  }

  .level-name {
    font-size: 18px;
  }

  .modal {
    padding: 32px;
    max-width: 90%;
  }

  .modal h2 {
    font-size: 36px;
  }

  .button-group {
    flex-direction: column;
  }

  .button-group .btn {
    width: 100%;
  }
}

/* Loading Animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Cute floating animation for background elements */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Add some cute decorative elements */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 179, 217, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(199, 179, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(179, 255, 217, 0.1) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}
