/* Shared styling for game host areas */
.game-host {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 24px auto;
  border-radius: 12px;
  overflow: hidden;
  background: #0d1117;
  border: 1px solid var(--border-light);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

[data-theme="light"] .game-host {
  background: #e8ecf3;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.game-host canvas {
  display: block;
  width: 100%;
  height: auto;
}

/* HUD overlay */
.game-hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 16px;
  pointer-events: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
  background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 100%);
  z-index: 10;
}

[data-theme="light"] .game-hud {
  color: rgba(0,0,0,0.85);
  background: linear-gradient(to bottom, rgba(255,255,255,0.6) 0%, transparent 100%);
}

.hud-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hud-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.hud-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #7cb3f1;
}

.hud-value--green { color: #00d68f; }
.hud-value--amber { color: #f5a623; }
.hud-value--red   { color: #ff6b6b; }

/* Full-cover overlay */
.game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 17, 23, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  z-index: 20;
  font-family: 'Inter', sans-serif;
}

[data-theme="light"] .game-overlay {
  background: rgba(244, 247, 250, 0.92);
}

.game-overlay h2 {
  font-family: 'Playfair Display', Georgia, serif;
  color: #7cb3f1;
  font-size: 2rem;
  margin-bottom: 16px;
}

[data-theme="light"] .game-overlay h2 {
  color: #2a7de9;
}

.game-overlay p {
  color: #b7c0c9;
  margin-bottom: 8px;
  text-align: center;
}

[data-theme="light"] .game-overlay p {
  color: #576c7f;
}

.game-overlay .final-score {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #5b8fd9 0%, #00d68f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 8px 0 16px;
}

.btn-play {
  margin-top: 16px;
  padding: 14px 40px;
  background: linear-gradient(135deg, #5b8fd9 0%, #00d68f 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease;
  font-family: 'Inter', sans-serif;
}

.btn-play:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

.btn-play:active {
  transform: scale(0.98);
}

.btn-secondary {
  margin-top: 10px;
  padding: 10px 24px;
  background: transparent;
  color: #7cb3f1;
  border: 1px solid #3a4254;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease;
}

.btn-secondary:hover {
  border-color: #7cb3f1;
}

[data-theme="light"] .btn-secondary {
  color: #2a7de9;
  border-color: #e0e6ed;
}

/* Health bar */
.health-bar-wrap {
  width: 120px;
  height: 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}

.health-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: #00d68f;
  transition: width 0.1s linear, background 0.3s ease;
}

.health-bar-fill--low { background: #f5a623; }
.health-bar-fill--critical { background: #ff6b6b; }

/* Combo flash */
@keyframes combo-flash {
  0%   { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(1);   opacity: 0.8; }
}

.combo-flash {
  animation: combo-flash 0.25s ease-out forwards;
}

/* Timer bar */
.timer-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  margin: 12px 0;
}

.timer-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--neural-gradient);
  transition: width 0.1s linear;
}

/* Responsive */
@media (max-width: 768px) {
  .game-host {
    border-radius: 0;
    margin: 12px 0;
  }
  .game-overlay h2 { font-size: 1.5rem; }
  .btn-play { padding: 12px 28px; font-size: 1rem; }
  .game-hud { padding: 8px 12px; font-size: 0.8rem; }
}
