body {
  margin: 0;
  font-family: 'Hiragino Kaku Gothic ProN', 'メイリオ', Meiryo, sans-serif;
  text-align: center;
  background-color: #f0f8ff;
  overflow: hidden;
  color: #333;
  user-select: none;
}

.screen {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 20px;
  box-sizing: border-box;
  background-color: rgba(240, 248, 255, 0.8);
  backdrop-filter: blur(5px);
}

.active {
  display: flex;
}

.screen-content {
  background-color: white;
  padding: 20px 40px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

button {
  padding: 10px 20px;
  font-size: 1.2em;
  margin: 10px;
  border-radius: 10px;
  border: 2px solid #ffbde6;
  background-color: #ffccff;
  cursor: pointer;
  transition: transform 0.1s;
}

button:hover {
  transform: scale(1.05);
}

canvas {
  border: 3px solid #add8e6;
  background: url("water-background.png") center/cover;
  touch-action: none;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  max-width: 100%;
  max-height: 70vh;
  aspect-ratio: 3 / 4;
}

#game-ui {
  display: flex;
  justify-content: space-around;
  width: 100%;
  max-width: 300px;
  margin-bottom: 10px;
  font-size: 1.2em;
  font-weight: bold;
  color: #005f73;
}

#controls {
  margin-top: 10px;
}

#catHand {
  position: absolute;
  width: 80px;
  height: 80px;
  pointer-events: none;
  transform-origin: 50% 20%;
  z-index: 10;
  filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.3));
}


/* Screens should not show unless active */
.screen {
    display: none;
}

.screen.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameScreen.active {
    display: block;
}

/* End screen as overlay */
#endScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
}

/* Confetti canvas should not inherit backgrounds */
canvas[style*="position: fixed"] {
    background: transparent !important;
    background-image: none !important;
}


/* Position timer and score above canvas */
#game-ui {
    position: relative;
    text-align: center;
    padding: 10px;
    background:  #ffccff;
    margin: 10px auto;
    width: fit-content;
    border-radius: 10px;
    z-index: 10;
}

#game-ui > div {
    display: inline-block;
    margin: 0 15px;
    font-weight: bold;
}
