/* =========================================================
   Blade of the Brush - Game-Specific Styles
   Builds on /games/shared/sumi-e.css
   ========================================================= */

/* --- Game Container --- */
#game-container {
  width: 800px;
  max-width: 95vw;
  aspect-ratio: 16 / 9;
  position: relative;
  margin: 20px auto;
}

/* --- Canvas --- */
#game-canvas {
  width: 100%;
  height: 100%;
  background: var(--paper);
  display: block;
}

/* --- Start Screen --- */
#start-screen .sumi-title {
  font-size: 2.8rem;
  margin-bottom: 4px;
}

#start-screen .sumi-subtitle {
  font-style: italic;
  margin-bottom: 16px;
  opacity: 0.7;
}

.controls-hint {
  font-size: 0.9rem;
  color: var(--ink-wash);
  margin-bottom: 20px;
}

#high-score-display {
  font-size: 0.85rem;
  color: var(--ink-wash);
  margin-top: 8px;
}

/* --- HUD Layout --- */
#hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#hud-left,
#hud-center,
#hud-right {
  display: flex;
  align-items: center;
}

#hud-center {
  flex: 1;
  justify-content: center;
}

/* --- Score Seal (smaller in HUD) --- */
#score-display {
  width: 44px;
  height: 44px;
  font-size: 0.9rem;
}

/* --- Lives Display --- */
#lives-display {
  display: flex;
  gap: 6px;
  align-items: center;
}

.life-pip {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  transition: background 0.3s ease;
}

.life-pip.filled {
  background: var(--vermillion);
  border-color: var(--vermillion);
  box-shadow: 0 0 4px rgba(192, 57, 43, 0.4);
}

.life-pip.lost {
  background: transparent;
  border-color: var(--ink-wash);
}

/* --- Phase Text --- */
#phase-text {
  font-family: 'Noto Serif JP', serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-wash);
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  white-space: nowrap;
}

#phase-text.visible {
  opacity: 1;
}

/* --- Game Over --- */
#game-over .sumi-title {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

#final-score {
  font-size: 1.4rem;
  color: var(--vermillion);
  margin-bottom: 4px;
}

#final-high-score {
  font-size: 0.9rem;
  color: var(--ink-wash);
  margin-bottom: 16px;
}

/* --- Slash Arc Animation (CSS overlay for extra flair) --- */
@keyframes slash-arc {
  0% {
    opacity: 0.9;
    transform: rotate(-45deg) scale(0.5);
  }
  50% {
    opacity: 0.7;
    transform: rotate(15deg) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: rotate(30deg) scale(1.5);
  }
}

.slash-effect {
  position: absolute;
  pointer-events: none;
  animation: slash-arc 0.3s ease-out forwards;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  #game-container {
    margin: 8px auto;
  }

  #start-screen .sumi-title {
    font-size: 1.8rem;
  }

  #start-screen .sumi-subtitle {
    font-size: 0.95rem;
  }

  .controls-hint {
    font-size: 0.75rem;
  }

  #score-display {
    width: 36px;
    height: 36px;
    font-size: 0.75rem;
  }

  .life-pip {
    width: 10px;
    height: 10px;
  }

  #phase-text {
    font-size: 0.7rem;
  }

  #game-over .sumi-title {
    font-size: 1.5rem;
  }

  #final-score {
    font-size: 1.1rem;
  }
}

@media (max-width: 400px) {
  #start-screen .sumi-title {
    font-size: 1.4rem;
  }

  .controls-hint {
    font-size: 0.65rem;
  }
}
