/* ORBIT SHIFT - responsive, no external dependencies */

:root {
  --charcoal: #181a20;
  --charcoal-light: #23262e;
  --cyan: #00f0ff;
  --coral: #ff6b6b;
  --lime: #b8ff00;
  --white: #ffffff;
  --hud-bg: rgba(24, 26, 32, 0.72);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--charcoal);
  color: var(--white);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.game {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1e2129 0%, #111318 100%);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(10px, 3vw, 22px);
  gap: 12px;
  pointer-events: none;
  z-index: 10;
}

.hud-left,
.hud-right {
  display: flex;
  align-items: center;
  gap: clamp(10px, 3vw, 22px);
}

.hud-right {
  pointer-events: auto;
}

.stat {
  display: flex;
  flex-direction: column;
  background: var(--hud-bg);
  padding: 6px 12px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  min-width: 56px;
}

.stat .label {
  font-size: 0.68rem;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.65);
}

.stat .value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.35);
}

button.icon {
  width: clamp(38px, 10vw, 52px);
  height: clamp(38px, 10vw, 52px);
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: var(--hud-bg);
  color: var(--white);
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.15s ease, background 0.15s ease;
}

button.icon:hover,
button.icon:focus-visible {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.12);
  outline: none;
}

button.icon:active {
  transform: scale(0.92);
}

.combo {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--lime);
  text-shadow: 0 0 14px rgba(184, 255, 0, 0.45);
  pointer-events: none;
  z-index: 9;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.combo.hidden {
  opacity: 0;
  transform: translateX(-50%) scale(0.9);
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 19, 24, 0.82);
  backdrop-filter: blur(3px);
  z-index: 20;
  padding: clamp(16px, 5vw, 32px);
}

.overlay.hidden {
  display: none;
}

.card {
  width: min(92vw, 420px);
  background: linear-gradient(180deg, var(--charcoal-light) 0%, var(--charcoal) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: clamp(22px, 6vw, 34px);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.card h1 {
  margin: 0 0 6px;
  font-size: 2.875rem;
  font-weight: 900;
  letter-spacing: 0;
  color: var(--white);
  text-shadow: 0 0 18px rgba(0, 240, 255, 0.35);
}

.card h2 {
  margin: 0 0 10px;
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--coral);
  text-shadow: 0 0 16px rgba(255, 107, 107, 0.35);
}

.tagline {
  margin: 0 0 18px;
  font-size: 1.125rem;
  color: var(--lime);
  font-weight: 600;
  letter-spacing: 0;
}

.instructions {
  margin: 0 0 24px;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.result {
  margin: 6px 0;
  font-size: 1.25rem;
  color: var(--white);
}

.result span {
  color: var(--cyan);
  font-weight: 800;
}

button.primary {
  width: 100%;
  margin-top: 10px;
  padding: 14px 22px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--cyan) 0%, #00c2cc 100%);
  color: #081014;
  font-size: 1.125rem;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 240, 255, 0.25);
  transition: transform 0.08s ease, box-shadow 0.15s ease;
}

button.primary:hover,
button.primary:focus-visible {
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.4);
  outline: none;
}

button.primary:active {
  transform: scale(0.97);
}

@media (max-width: 380px) and (max-height: 820px) {
  .hud {
    padding: 10px 12px;
  }
  .stat {
    padding: 5px 9px;
    min-width: 48px;
  }
  .combo {
    top: 16%;
  }
  .stat .value {
    font-size: 1.35rem;
  }
  .card h1 {
    font-size: 2rem;
  }
  .card h2 {
    font-size: 1.75rem;
  }
  .tagline {
    font-size: 1rem;
  }
  .instructions {
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .combo,
  button.icon,
  button.primary {
    transition: none;
  }
}
