/* =========================================================
   The Crown's Ink - 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 {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--paper);
}

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

#hud-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

/* --- Rank Seal (smaller in HUD) --- */
#rank-seal {
  width: 40px;
  height: 40px;
  font-size: 0.9rem;
}

#rank-text {
  font-size: 0.9rem;
  color: var(--ink);
  font-family: 'Noto Serif JP', serif;
  font-weight: 700;
}

/* --- Territory Percentage --- */
#territory-pct {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: 'Noto Serif JP', serif;
  color: var(--ink);
}

/* --- Lives Display --- */
#lives-display {
  font-size: 1.2rem;
  color: var(--vermillion);
  letter-spacing: 2px;
}

/* --- Game Over --- */
#game-over-title {
  margin-bottom: 16px;
}

#game-over-text {
  font-size: 1rem;
  margin-bottom: 8px;
}

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

/* --- Power-up Toast --- */
#power-up-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(245, 240, 232, 0.92);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 12px 24px;
  font-family: 'Noto Serif JP', serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#power-up-toast.visible {
  opacity: 1;
}

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

  #hud {
    padding: 6px 10px;
  }

  #rank-seal {
    width: 32px;
    height: 32px;
    font-size: 0.7rem;
  }

  #rank-text {
    font-size: 0.75rem;
  }

  #territory-pct {
    font-size: 0.95rem;
  }

  #lives-display {
    font-size: 0.95rem;
  }

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

  #game-over-text {
    font-size: 0.85rem;
  }

  #final-rank {
    font-size: 0.8rem;
  }
}

@media (max-width: 400px) {
  #rank-seal {
    width: 28px;
    height: 28px;
    font-size: 0.6rem;
  }

  #rank-text {
    font-size: 0.65rem;
  }

  #territory-pct {
    font-size: 0.85rem;
  }

  #lives-display {
    font-size: 0.85rem;
  }
}
