@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700&family=Noto+Sans+SC:wght@400;600;700&display=swap');

.hub-nav-bar {
  position: fixed;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 10px;
  z-index: 10002;
  pointer-events: auto;
  font-family: 'Orbitron', 'Noto Sans SC', system-ui, sans-serif;
}

.hub-nav-bar .hub-home-btn,
.hub-nav-bar .hub-help-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  border: 1px solid rgba(0, 255, 255, 0.35) !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.82)) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #e2f8ff !important;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35), 0 0 20px rgba(0, 255, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, filter 0.25s ease;
  text-decoration: none;
  user-select: none;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  line-height: 1.2;
}

.hub-nav-bar .hub-home-btn:hover,
.hub-nav-bar .hub-help-btn:hover {
  transform: translateY(-3px) scale(1.04);
  border-color: rgba(168, 85, 247, 0.65) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 28px rgba(168, 85, 247, 0.35);
  filter: brightness(1.08);
}

.hub-nav-bar .hub-home-btn:active,
.hub-nav-bar .hub-help-btn:active,
.hub-nav-bar .hub-home-btn.hub-pressed,
.hub-nav-bar .hub-help-btn.hub-pressed {
  transform: translateY(-4px) scale(1.06);
  border-color: rgba(168, 85, 247, 0.85) !important;
  filter: brightness(1.12);
  box-shadow: 0 6px 22px rgba(0, 212, 255, 0.35);
}

.hub-timer,
#ptb {
  position: fixed;
  top: 52px;
  right: 10px;
  z-index: 10002;
  display: none;
  pointer-events: none;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 220, 50, 0.4);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.85));
  backdrop-filter: blur(12px);
  color: #fde68a;
  font-family: 'Orbitron', 'Noto Sans SC', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  max-width: 38vw;
  white-space: nowrap;
}

.hub-timer-chip,
.hub-timer-val {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.hub-timer-label { display: none; }

@media (max-width: 600px) {
  .hub-nav-bar { top: 10px; left: 10px; flex-wrap: wrap; max-width: calc(100% - 20px); }
  .hub-nav-bar .hub-home-btn, .hub-nav-bar .hub-help-btn { padding: 8px 14px !important; font-size: 12px; }
  .hub-timer, #ptb {
    top: auto;
    bottom: 12px;
    right: 10px;
    left: auto;
    padding: 5px 10px;
    font-size: 10px;
    max-width: 34vw;
  }
}

@media (max-width: 600px) and (orientation: portrait) {
  .hub-timer, #ptb {
    top: 48px;
    bottom: auto;
    right: 8px;
    padding: 4px 9px;
    font-size: 9px;
    max-width: 30vw;
    opacity: 0.92;
  }
}

.hub-help-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
}

.hub-help-modal.hub-open {
  display: flex;
  pointer-events: auto;
}

.hub-help-card {
  pointer-events: auto;
  max-width: 420px;
  width: 100%;
  padding: 24px 28px;
  border-radius: 20px;
  border: 1px solid rgba(0, 255, 255, 0.35);
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.95));
  color: #e2f8ff;
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hub-help-card h2 {
  margin: 0 0 14px;
  font-size: 1.15rem;
  color: #67e8f9;
  letter-spacing: 0.04em;
}

.hub-help-card ul {
  margin: 0 0 18px;
  padding-left: 1.25rem;
  line-height: 1.55;
  font-size: 0.9rem;
}

.hub-help-close {
  display: block;
  width: 100%;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 255, 0.5);
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(123, 47, 255, 0.25));
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hub-help-close:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: rgba(168, 85, 247, 0.75);
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.35), rgba(168, 85, 247, 0.35));
  color: #e0f7ff;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.35);
}

.hub-help-close:active,
.hub-help-close.hub-pressed {
  transform: translateY(-5px) scale(1.06);
  border-color: #a855f7;
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  color: #061018;
  box-shadow: 0 8px 28px rgba(0, 212, 255, 0.55);
}

#pto {
  z-index: 9990 !important;
}

.hub-ok-btn.hub-pressed,
button.hub-pressed {
  transform: translateY(-3px) scale(1.04);
  filter: brightness(1.12);
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.3);
}

/* v515sz34 — game menus must stay clickable after page-level CSS resets */
#overlay,
#menuOverlay,
.menu-panel,
.menu-card,
.menuPanel {
  pointer-events: auto !important;
}

#overlay button,
#menuOverlay button,
.menu-panel button,
.menu-card button,
.menuPanel button,
button.btn,
button.btn-main,
button.btn-sub,
button.btn-game,
button.hub-ok-btn,
button.menuBtn,
button.lane-btn,
.hub-pressable {
  box-sizing: border-box !important;
  min-height: 44px !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}

#overlay .btn,
button.hub-ok-btn.btn {
  padding: 12px 26px !important;
}

#overlay .btn-main,
.menu-panel .btn-main,
.menu-card .btn-main,
.menuPanel .btn-main,
button.btn-main {
  padding: 14px 18px !important;
  min-height: 52px !important;
}

button.menuBtn {
  padding: 15px 18px !important;
  min-height: 48px !important;
}

/* hub shockwave — ring expands from click to button edge; sparks ride the wavefront */
.hub-ripple-root {
  position: relative;
}

.hub-shock-mount {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: inherit;
  z-index: 12;
}

.hub-shock-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: inherit;
  z-index: 8;
}

.hub-shock-origin {
  position: absolute;
  width: 0;
  height: 0;
  transform: scale(0);
  animation: hubShockGrow 0.88s cubic-bezier(0.12, 0.82, 0.22, 1) forwards;
  will-change: transform;
}

.hub-shock-fill {
  position: absolute;
  left: calc(var(--max-r) * -1);
  top: calc(var(--max-r) * -1);
  width: calc(var(--max-r) * 2);
  height: calc(var(--max-r) * 2);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 255, 255, 0.28) 0%,
    rgba(0, 212, 255, 0.2) 38%,
    rgba(168, 85, 247, 0.1) 62%,
    transparent 74%);
  opacity: 0.85;
  animation: hubShockFillFade 0.88s ease-out forwards;
}

.hub-shock-ring {
  position: absolute;
  left: calc(var(--max-r) * -1);
  top: calc(var(--max-r) * -1);
  width: calc(var(--max-r) * 2);
  height: calc(var(--max-r) * 2);
  border-radius: 50%;
  border: 2.5px solid rgba(130, 245, 255, 0.95);
  box-shadow:
    0 0 12px rgba(0, 212, 255, 0.8),
    0 0 24px rgba(168, 85, 247, 0.45),
    inset 0 0 10px rgba(255, 255, 255, 0.2);
  animation: hubShockRingFade 0.88s ease-out forwards;
}

.hub-shock-ring-echo {
  position: absolute;
  left: calc(var(--max-r) * -1);
  top: calc(var(--max-r) * -1);
  width: calc(var(--max-r) * 2);
  height: calc(var(--max-r) * 2);
  border-radius: 50%;
  border: 1.5px solid rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.35);
  animation: hubShockRingFade 0.88s ease-out 0.08s forwards;
  opacity: 0;
}

.hub-shock-spark {
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px #67e8f9, 0 0 10px #a855f7;
  transform: rotate(var(--ang)) translateX(var(--max-r));
  opacity: 0;
  animation: hubShockSparkFade 0.88s ease-out forwards;
}

@keyframes hubShockGrow {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

@keyframes hubShockFillFade {
  0% { opacity: 0.9; }
  45% { opacity: 0.4; }
  100% { opacity: 0; }
}

@keyframes hubShockRingFade {
  0% { opacity: 1; border-width: 3px; }
  60% { opacity: 0.5; }
  100% { opacity: 0; border-width: 1px; }
}

@keyframes hubShockSparkFade {
  0%, 6% { opacity: 0; }
  14%, 70% { opacity: 1; }
  100% { opacity: 0; }
}

.game-card.hub-pressed,
.hub-pressable.hub-pressed,
button.hub-pressed,
.btn.hub-pressed,
.tab.hub-pressed,
.tier-card.hub-pressed {
  transform: translateY(1px) scale(0.98);
  filter: brightness(1.08);
}

.game-folder-card.hub-pressable,
.game-card.hub-pressable {
  min-height: unset !important;
}

.ai-send.hub-pressed {
  transform: none !important;
  filter: none !important;
}

@keyframes zshPaperIn{
  0%{opacity:0;transform:translate3d(-110vw,3%,0) rotate(-16deg) skewX(-8deg);filter:blur(2px)}
  32%{opacity:1;transform:translate3d(-22vw,-2%,0) rotate(8deg) skewX(4deg);filter:blur(.4px)}
  58%{transform:translate3d(4vw,1%,0) rotate(-3deg)}
  80%{transform:translate3d(-1.2vw,0,0) rotate(1deg)}
  100%{opacity:1;transform:none;filter:none}
}
@keyframes zshShardFly{
  0%{opacity:1;transform:translate3d(0,0,0) rotate(0) scale(1)}
  100%{opacity:0;transform:translate3d(var(--dx),var(--dy),0) rotate(var(--rot)) scale(.28)}
}
.zsh-wind-paper{animation:zshPaperIn 1s cubic-bezier(.16,.78,.22,1) both;transform-origin:20% 55%}
.zsh-wind-paper.zsh-wind-out{opacity:0!important;visibility:hidden!important;animation:none!important}
.zsh-wind-shards{position:fixed;inset:0;pointer-events:none;z-index:2147483000}
.zsh-wind-shard{position:fixed;overflow:hidden;will-change:transform,opacity;animation:zshShardFly 1s ease-in forwards}
.zsh-wind-host.zsh-wind-closing{pointer-events:none!important}
#overlay.hide,#overlay.zsh-wind-closing,#notice.hide,#notice.zsh-wind-closing,#modal.hide,#modal.zsh-wind-closing{pointer-events:none!important}
