/* ====== Neon Run & Turn ====== */
.gh-run-turn {
  --bg: #0a0f25;
  --panel: rgba(16,22,46,.7);
  --stroke: rgba(255,255,255,.1);
  --text: #e8ecff;
  --muted: #a9b7ff;
  --accent: #ff2b7d;
  --accent2: #00f7ff;
  --success: #17d490;
  --danger: #ff4757;
  --warning: #ffa502;
  --coin: #ffd700;
  --shield: #00f7ff;
  --boost: #ff2b7d;
  --radius: 16px;
  --glow: 0 10px 30px rgba(255,43,125,.3);
  --inner: inset 0 0 0 1px rgba(255,255,255,.08);
  --glass: blur(12px) saturate(140%);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  position: relative;
  overflow: hidden;
}

/* Theme Colors */
.gh-run-turn.theme-cyber { 
  --accent: #ff2b7d; --accent2: #00f7ff;
  --lane1: #ff2b7d; --lane2: #00f7ff; --lane3: #9d4edd;
}
.gh-run-turn.theme-neon { 
  --accent: #6c7cff; --accent2: #33e0ff;
  --lane1: #6c7cff; --lane2: #33e0ff; --lane3: #ff2b7d;
}
.gh-run-turn.theme-space { 
  --accent: #00f7ff; --accent2: #9d4edd;
  --lane1: #00f7ff; --lane2: #9d4edd; --lane3: #ff2b7d;
}
.gh-run-turn.theme-ocean { 
  --accent: #00f7ff; --accent2: #2b97ff;
  --lane1: #00f7ff; --lane2: #2b97ff; --lane3: #17d490;
}
.gh-run-turn.theme-lava { 
  --accent: #ff6b35; --accent2: #ff2b7d;
  --lane1: #ff6b35; --lane2: #ff2b7d; --lane3: #ffeb3b;
}
.gh-run-turn.theme-matrix { 
  --accent: #00ff41; --accent2: #008f11;
  --lane1: #00ff41; --lane2: #008f11; --lane3: #003b00;
}

.gh-run-turn .rt-aurora {
  position: absolute;
  inset: -20% -10% -20% -10%;
  z-index: 0;
  background: 
    radial-gradient(800px 600px at 20% 10%, rgba(255,43,125,.25), transparent 60%),
    radial-gradient(800px 600px at 80% 20%, rgba(0,247,255,.25), transparent 60%),
    radial-gradient(700px 700px at 50% 90%, rgba(23,212,144,.15), transparent 65%),
    linear-gradient(180deg, #0b1126 0%, #0a0f25 100%);
  pointer-events: none;
}

.gh-run-turn .rt-shell {
  position: relative;
  z-index: 1;
  width: min(500px, 96vw);
  margin: 24px auto;
  background: var(--panel);
  backdrop-filter: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--glow), var(--inner);
  padding: 16px;
}

/* Header */
.gh-run-turn .rt-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.gh-run-turn .rt-title {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: .3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: center;
}

.gh-run-turn .rt-meters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.gh-run-turn .rt-meter {
  background: rgba(255,255,255,.07);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 6px 10px;
  min-width: 70px;
  text-align: center;
  box-shadow: var(--inner);
}

.gh-run-turn .rt-meter .label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.gh-run-turn .rt-meter .value {
  display: block;
  font-size: 16px;
  font-weight: 900;
  color: #fff;
}

/* Back Button */
.gh-run-turn .rt-back-section {
  z-index: 5;
}

.gh-run-turn .rt-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  color: var(--muted);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  white-space: nowrap;
}

.gh-run-turn .rt-back-btn:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
  transform: translateY(-1px);
}

/* Stage & Canvas */
.gh-run-turn .rt-stage {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,.3);
  border: 1px solid var(--stroke);
  box-shadow: var(--inner);
}

.gh-run-turn .rt-canvas {
  display: block;
  width: 100%;
  height: 65vh;
  max-height: 600px;
  min-height: 400px;
  background: transparent;
}

/* Overlays */
.gh-run-turn .rt-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgba(5,10,22,.85);
  backdrop-filter: blur(4px);
}

.gh-run-turn .rt-card {
  background: rgba(19,26,56,.95);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  max-width: 320px;
  width: 85%;
  box-shadow: var(--glow), var(--inner);
  backdrop-filter: var(--glass);
}

.gh-run-turn .rt-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gh-run-turn .rt-card p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.4;
}

/* Settings Groups */
.gh-run-turn .rt-settings {
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gh-run-turn .rt-setting-group {
  text-align: left;
}

.gh-run-turn .rt-setting-group label {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 6px;
  font-weight: 600;
}

.gh-run-turn .rt-setting-group select {
  width: 100%;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  color: #fff;
  padding: 10px;
  font-size: 14px;
}

.gh-run-turn .rt-stats {
  color: var(--muted);
  margin: 16px 0;
  display: grid;
  gap: 8px;
}

.gh-run-turn .rt-stats div {
  display: flex;
  justify-content: space-between;
}

.gh-run-turn .rt-card-actions {
  margin-top: 16px;
}

/* Buttons */
.gh-run-turn .rt-btn {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #0a0f25;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 900;
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--glow);
  transition: transform .1s ease, filter .2s ease;
  width: 100%;
}

.gh-run-turn .rt-btn:hover,
.gh-run-turn .rt-btn:focus {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* Power-up Effect */
.gh-run-turn .rt-powerup-effect {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  pointer-events: none;
  background: rgba(0,0,0,.7);
  border-radius: 20px;
  padding: 8px 16px;
  border: 2px solid var(--shield);
}

.gh-run-turn .rt-powerup-text {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--shield);
  font-weight: 900;
  font-size: 14px;
}

.gh-run-turn .rt-powerup-name {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Lane Indicators */
.gh-run-turn .rt-lane-indicators {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 12px 0;
}

.gh-run-turn .rt-lane-indicator {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 2px solid var(--muted);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 14px;
  color: var(--muted);
  transition: all 0.3s ease;
}

.gh-run-turn .rt-lane-indicator.active {
  background: var(--accent);
  border-color: var(--accent2);
  color: #0a0f25;
  transform: scale(1.1);
  box-shadow: 0 0 15px var(--accent);
}

.gh-run-turn .rt-lane-indicator:nth-child(1).active { background: var(--lane1); }
.gh-run-turn .rt-lane-indicator:nth-child(2).active { background: var(--lane2); }
.gh-run-turn .rt-lane-indicator:nth-child(3).active { background: var(--lane3); }

/* Controls */
.gh-run-turn .rt-controls {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.gh-run-turn .rt-tap-hint {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  animation: rt-pulse 2s infinite;
}

@keyframes rt-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.gh-run-turn .rt-actions {
  display: flex;
  gap: 8px;
}

.gh-run-turn .rt-sound,
.gh-run-turn .rt-pause-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: #fff;
  cursor: pointer;
  outline: none;
  display: grid;
  place-items: center;
  box-shadow: var(--inner);
  transition: filter var(--speed), transform .08s;
  font-size: 18px;
}

.gh-run-turn .rt-sound:hover,
.gh-run-turn .rt-pause-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.gh-run-turn .rt-sound .ico {
  width: 20px;
  height: 20px;
  display: block;
}

.gh-run-turn .rt-sound .off {
  display: none;
}

.gh-run-turn .rt-sound.is-muted {
  color: #d2dae9;
  border-color: rgba(255,255,255,.12);
}

.gh-run-turn .rt-sound.is-muted .on {
  display: none;
}

.gh-run-turn .rt-sound.is-muted .off {
  display: block;
}

/* How to Play Section */
.gh-run-turn .rt-howto {
  margin-top: 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--inner);
}

.gh-run-turn .rt-howto-toggle {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--accent2);
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.gh-run-turn .rt-howto-toggle:hover {
  background: rgba(255,255,255,.08);
  color: var(--accent);
}

.gh-run-turn .rt-chevron {
  transition: transform 0.3s ease;
}

.gh-run-turn .rt-howto.active .rt-chevron {
  transform: rotate(180deg);
}

.gh-run-turn .rt-howto-content {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--stroke);
}

.gh-run-turn .rt-howto.active .rt-howto-content {
  display: block;
  animation: rt-slideDown 0.3s ease;
}

@keyframes rt-slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.gh-run-turn .rt-howto-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gh-run-turn .rt-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: rgba(255,255,255,.03);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.05);
}

.gh-run-turn .rt-step-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.gh-run-turn .rt-step strong {
  display: block;
  color: var(--accent2);
  font-size: 14px;
  margin-bottom: 4px;
}

.gh-run-turn .rt-step p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

/* Mobile Optimizations */
@media (max-width: 680px) {
  .gh-run-turn .rt-header {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 10px;
  }
  
  .gh-run-turn .rt-back-section {
    position: absolute;
    top: 12px;
    left: 12px;
  }
  
  .gh-run-turn .rt-meters {
    justify-content: center;
  }
  
  .gh-run-turn .rt-meter {
    min-width: 60px;
    padding: 4px 8px;
  }
  
  .gh-run-turn .rt-canvas {
    height: 60vh;
    min-height: 350px;
  }

  .gh-run-turn .rt-controls {
    flex-direction: column;
    gap: 10px;
  }

  .gh-run-turn .rt-lane-indicators {
    gap: 15px;
  }

  .gh-run-turn .rt-lane-indicator {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .gh-run-turn .rt-shell {
    margin: 12px auto;
    padding: 12px;
  }
  
  .gh-run-turn .rt-title {
    font-size: 24px;
  }
  
  .gh-run-turn .rt-meters {
    gap: 6px;
  }
  
  .gh-run-turn .rt-meter {
    min-width: 55px;
    font-size: 14px;
  }
  
  .gh-run-turn .rt-powerup-text {
    font-size: 12px;
  }
}
/* Touchpad Controls */
.gh-run-turn .rt-touchpad {
  margin-top: 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--inner);
}

.gh-run-turn .rt-touchpad-area {
  position: relative;
  height: 60px;
  background: rgba(255,255,255,.08);
  border-radius: 30px;
  border: 1px solid var(--stroke);
  overflow: hidden;
  cursor: pointer;
  touch-action: pan-x;
}

.gh-run-turn .rt-touchpad-indicator {
  position: absolute;
  top: 50%;
  left: 33.3%;
  transform: translate(-50%, -50%);
  transition: left 0.2s ease;
  z-index: 2;
}

.gh-run-turn .rt-touchpad-handle {
  width: 50px;
  height: 50px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 50%;
  box-shadow: 0 0 20px var(--accent);
  border: 3px solid rgba(255,255,255,0.8);
}

.gh-run-turn .rt-touchpad-lanes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
}

.gh-run-turn .rt-touchpad-lane {
  flex: 1;
  border-right: 1px solid rgba(255,255,255,0.1);
  position: relative;
}

.gh-run-turn .rt-touchpad-lane:last-child {
  border-right: none;
}

.gh-run-turn .rt-touchpad-lane::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
}

.gh-run-turn .rt-touchpad-hint {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
  font-weight: 600;
}

/* Touchpad active states */
.gh-run-turn .rt-touchpad-area:active {
  background: rgba(255,255,255,.12);
}

.gh-run-turn .rt-touchpad-handle:active {
  transform: scale(0.95);
}

/* Mobile optimizations for touchpad */
@media (max-width: 680px) {
  .gh-run-turn .rt-touchpad {
    padding: 12px;
  }
  
  .gh-run-turn .rt-touchpad-area {
    height: 50px;
  }
  
  .gh-run-turn .rt-touchpad-handle {
    width: 44px;
    height: 44px;
  }
}