:root {
  --primary-color: #ffcccc;
  --secondary-color: #ccffcc;
  --accent-color: #ccccff;
  --text-color: #333333;
  --background-color: #f8f8f8;
  --button-color: #ff9999;
  --button-hover-color: #ff6666;
  --font-main: 'Comic Sans MS', cursive, sans-serif;
  --font-heading: 'Impact', sans-serif;
}

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

body {
  font-family: var(--font-main);
  color: var(--text-color);
  background-color: var(--background-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#game-container {
  width: 100%;
  max-width: 600px;
  height: 100vh;
  max-height: 1000px;
  position: relative;
  overflow: hidden;
  background-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.ui-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ui-element {
  position: absolute;
  pointer-events: auto;
  background-color: var(--secondary-color);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.ui-element:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.button {
  background-color: var(--button-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: var(--button-hover-color);
}

.title {
  font-family: var(--font-heading);
  font-size: 36px;
  color: var(--accent-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
}

.subtitle {
  font-size: 20px;
  color: var(--text-color);
  margin-bottom: 30px;
}

.area-indicator {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background-color: rgba(255, 255, 255, 0.7);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 14px;
}

.score-display {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: rgba(255, 255, 255, 0.7);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 18px;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  max-width: 80%;
  max-height: 80%;
  overflow-y: auto;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 600px) {
  .title {
    font-size: 28px;
  }

  .subtitle {
    font-size: 16px;
  }

  .button {
    padding: 8px 16px;
    font-size: 14px;
  }
}
