/* StylingText Spider Web Shooter - Full CSS (100% parity with preview) */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;700;800;900&display=swap');

/* Floating Spider Button */
.st-spider-float {
  position: fixed;
  z-index: 99998;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
.st-spider-float.bottom-left { bottom: 24px; left: 24px; }
.st-spider-float.bottom-right { bottom: 24px; right: 24px; }

.st-spider-float-inner {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  padding: 2px;
  box-shadow: 0 10px 25px -5px rgba(56, 189, 248, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: stSpiderPulse 2.4s infinite ease-in-out;
}
.st-spider-float:hover .st-spider-float-inner {
  transform: scale(1.12);
}
.st-spider-emoji {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.st-spider-beacon {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: #38bdf8;
  border: 2px solid #020617;
  border-radius: 50%;
  animation: stSpiderPing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.st-spider-tooltip {
  position: absolute;
  left: 68px;
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 10px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.25s ease;
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}
.st-spider-float:hover .st-spider-tooltip {
  opacity: 1;
  transform: translateX(0);
}

@keyframes stSpiderPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@keyframes stSpiderPing {
  75%, 100% { transform: scale(2); opacity: 0; }
}

/* Modal Popup Window */
.st-spider-modal-hidden { display: none !important; }
.st-spider-modal-visible {
  display: flex !important;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding: 14px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  box-sizing: border-box;
}
.st-spider-modal-visible * { box-sizing: border-box; }

.st-spider-modal-box {
  width: 100%;
  max-width: 880px;
  height: 90vh;
  max-height: 800px;
  background: #020617;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85);
}

/* Modal Header */
.st-spider-modal-header {
  padding: 12px 20px;
  background: #0f172a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1e293b;
}
.st-spider-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.st-spider-header-badge {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.st-spider-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.st-spider-header-btn {
  background: #1e293b;
  border: 1px solid #334155;
  color: #cbd5e1;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.st-spider-header-btn:hover {
  background: #334155;
  color: #ffffff;
}
.st-spider-close {
  font-size: 20px;
  line-height: 1;
}

/* Canvas Area */
.st-spider-canvas-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #020617;
}
#st-spider-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

/* HUD Overlay */
.st-spider-hud {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 10;
}
.st-hud-left, .st-hud-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.st-hud-chip {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 12px;
  padding: 5px 12px;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
}
.st-hud-label {
  font-size: 9px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
}
.st-hud-value {
  font-size: 18px;
  font-weight: 900;
  font-family: monospace;
  line-height: 1.1;
}
.text-cyan { color: #38bdf8; }
.text-amber { color: #f59e0b; }
.text-rose { color: #f43f5e; }

.st-hud-combo {
  background: rgba(131, 24, 67, 0.85);
  border: 1px solid rgba(244, 63, 94, 0.6);
  border-radius: 12px;
  padding: 4px 10px;
  display: flex;
  flex-direction: column;
  animation: stSpiderPulse 1s infinite;
}
.st-combo-label { font-size: 8px; color: #fbcfe8; font-weight: 800; }
.st-combo-val { font-size: 16px; color: #fda4af; font-weight: 900; font-family: monospace; }

.st-hud-shield {
  background: rgba(6, 78, 59, 0.85);
  border: 1px solid rgba(34, 197, 94, 0.6);
  color: #86efac;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 10px;
}
.st-hud-powerup {
  background: rgba(12, 74, 110, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.6);
  color: #bae6fd;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 10px;
  animation: stSpiderPulse 1.2s infinite;
}

/* Screen Overlays (Welcome / Pause / Game Over) */
.st-spider-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 20;
}
.st-spider-overlay-card {
  max-width: 580px;
  width: 100%;
  text-align: center;
  color: #ffffff;
}

.st-welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.st-badge-dot {
  width: 6px;
  height: 6px;
  background: #38bdf8;
  border-radius: 50%;
  animation: stSpiderPing 1.5s infinite;
}
.st-welcome-icon-box {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 12px auto;
  box-shadow: 0 15px 30px -5px rgba(56, 189, 248, 0.35);
}
.st-welcome-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 0 0 8px 0;
  color: #ffffff;
}
.st-welcome-desc {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0 0 18px 0;
}
.st-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  text-align: left;
  margin-bottom: 20px;
}
.st-info-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 14px;
}
.st-info-card-header {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}
.st-info-list {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  list-style: none;
}
.st-info-list li { margin-bottom: 4px; }
.kbd {
  background: #1e293b;
  border: 1px solid #334155;
  color: #ffffff;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: monospace;
}
.st-powerup-mini-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  font-size: 11px;
  color: #cbd5e1;
}
.p-tag {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 6px;
  font-weight: 900;
  margin-right: 4px;
}
.p-blue { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.p-pink { background: rgba(236, 72, 153, 0.2); color: #ec4899; }
.p-green { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.p-yellow { background: rgba(234, 179, 8, 0.2); color: #eab308; }

.st-spider-btn-gradient {
  width: 100%;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #020617;
  border: none;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 900;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(56, 189, 248, 0.4);
  transition: transform 0.15s ease;
}
.st-spider-btn-gradient:hover {
  transform: scale(1.02);
}
.st-spider-btn-secondary {
  width: 100%;
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #334155;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.st-spider-btn-secondary:hover {
  background: #334155;
  color: #ffffff;
}
.st-welcome-footnote {
  font-size: 11px;
  color: #64748b;
  margin-top: 10px;
  font-family: monospace;
}

/* Pause & Game Over Specifics */
.st-pause-icon { font-size: 40px; margin-bottom: 8px; }
.st-gameover-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 12px auto;
}
.st-gameover-title {
  font-size: 30px;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 4px 0;
}
.st-gameover-sub {
  color: #f43f5e;
  font-size: 13px;
  margin: 0 0 18px 0;
}
.st-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.st-stat-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 12px;
}
.st-stat-label { font-size: 11px; color: #94a3b8; display: block; margin-bottom: 4px; }
.st-stat-val { font-size: 24px; font-weight: 900; font-family: monospace; }
.st-new-record-pill {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fcd34d;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 16px;
  animation: stSpiderPulse 1.2s infinite;
}

/* Desktop Tip on Bottom */
.st-spider-desktop-tip {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.7);
  padding: 4px 14px;
  border-radius: 20px;
  color: #94a3b8;
  font-size: 11px;
  font-family: monospace;
  display: flex;
  gap: 8px;
  pointer-events: none;
  white-space: nowrap;
}

/* Mobile Controls */
.st-spider-mobile-controls {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
  z-index: 15;
}
.st-mobile-move-pads {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}
.st-touch-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #334155;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}
.st-touch-btn:active {
  background: #0284c7;
}
.st-joystick-base {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid rgba(56, 189, 248, 0.4);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  touch-action: none;
}
.st-joystick-thumb {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.5);
  pointer-events: none;
}

/* Offline Modal */
.st-spider-offline-hidden { display: none !important; }
.st-spider-offline-visible {
  display: flex !important;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #020617;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
.st-spider-offline-card {
  max-width: 440px;
  width: 100%;
  text-align: center;
  background: #0f172a;
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: 26px;
  padding: 36px 24px;
  color: #ffffff;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.85);
}
.st-offline-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin: 0 auto 16px auto;
}
.st-spider-offline-card h2 {
  font-size: 24px;
  font-weight: 900;
  margin: 0 0 8px 0;
}
.st-spider-offline-card p {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 22px 0;
}

@media (max-width: 640px) {
  .st-info-grid { grid-template-columns: 1fr; }
  .st-welcome-title { font-size: 22px; }
  .st-welcome-desc { font-size: 12px; }
}

/* ===== v2.0 enhancements ===== */
.st-welcome-stats {
  font-size: 13px;
  color: #94a3b8;
  margin: 12px 0 18px;
}
.st-welcome-stats b { color: #fbbf24; }
.st-welcome-hint {
  font-size: 12px;
  color: #64748b;
  margin-top: 10px;
}
.st-go-badge {
  display: inline-block;
  background: rgba(244,63,94,0.15);
  border: 1px solid rgba(244,63,94,0.4);
  color: #fb7185;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.st-go-score {
  font-size: 48px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 16px;
  font-family: monospace;
  letter-spacing: -1px;
}
.st-go-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.st-go-stats > div {
  background: rgba(15,23,42,0.9);
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}
.st-go-stats span {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 2px;
}
.st-go-stats b {
  font-size: 20px;
  font-weight: 800;
  color: #e2e8f0;
  font-family: monospace;
}
.st-spider-btn-outline {
  display: inline-block;
  margin-top: 10px;
  background: transparent;
  border: 1px solid #334155;
  color: #94a3b8;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 22px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.st-spider-btn-outline:hover {
  border-color: #64748b;
  color: #e2e8f0;
}
.st-pause-title {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 8px;
}
.st-hud-chip .st-hud-value {
  min-width: 28px;
  display: inline-block;
}
