/* CyberOrbit - Neon Theme & Glassmorphism UI */
:root {
  --bg-color: #070814;
  --neon-cyan: #00ffff;
  --neon-pink: #ff007f;
  --neon-purple: #9d4edd;
  --neon-gold: #ffd166;
  --neon-red: #ff3366;
  --hud-bg: rgba(12, 16, 43, 0.75);
  --hud-border: rgba(0, 255, 255, 0.25);
  --text-main: #f0f4fc;
  --text-dim: #7f8ca3;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  touch-action: none;
  overscroll-behavior: none;
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#gameCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* HUD Overlay */
#hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 10;
}

.hud-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.score-display {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(0, 255, 255, 0.6);
}

.score-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--neon-cyan);
}

.stats-row {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 600;
  margin-top: 2px;
}

.stats-item span {
  color: var(--text-main);
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.hud-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--hud-bg);
  border: 1px solid var(--hud-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--neon-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.hud-btn:active {
  transform: scale(0.92);
  background: rgba(0, 255, 255, 0.2);
}

.hud-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Combo Banner */
#combo-container {
  position: absolute;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10;
}

#combo-container.active {
  opacity: 1;
  transform: translateX(-50%) scale(1.1);
}

.combo-text {
  font-size: 26px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #ff007f, #ffd166);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(255, 0, 127, 0.6));
}

.combo-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--neon-gold);
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Modals & Screens */
.screen-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 8, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.screen-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.card-modal {
  width: 90%;
  max-width: 420px;
  background: linear-gradient(135deg, rgba(20, 26, 60, 0.85) 0%, rgba(10, 13, 30, 0.95) 100%);
  border: 1px solid rgba(0, 255, 255, 0.3);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.15), 0 20px 40px rgba(0, 0, 0, 0.6);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  animation: floatUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes floatUp {
  from {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.game-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #00ffff 0%, #ff007f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(0, 255, 255, 0.5));
}

.game-tagline {
  font-size: 13px;
  color: var(--neon-cyan);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 700;
}

.instructions-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  width: 100%;
  font-size: 13px;
  line-height: 1.6;
  color: #c0cce0;
  text-align: left;
}

.instructions-box p {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.instructions-box p:last-child {
  margin-bottom: 0;
}

.key-badge {
  display: inline-block;
  padding: 2px 7px;
  background: rgba(0, 255, 255, 0.15);
  border: 1px solid var(--neon-cyan);
  border-radius: 6px;
  color: var(--neon-cyan);
  font-weight: 700;
  font-size: 11px;
}

.btn-primary {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(90deg, #00f2fe 0%, #4facfe 100%);
  border: none;
  border-radius: 12px;
  color: #070814;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(79, 172, 254, 0.4);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 242, 254, 0.6);
}

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

.btn-secondary {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Results Grid */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.result-item {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.result-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--neon-cyan);
}

.result-val.highlight {
  color: var(--neon-gold);
  text-shadow: 0 0 10px rgba(255, 209, 102, 0.5);
}

.result-lbl {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Touch Control Indicator */
#touch-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  pointer-events: none;
  opacity: 0.65;
  transition: opacity 0.3s ease;
  z-index: 10;
}
