/* ghostgps custom styles (supplements Tailwind CDN) */

:root {
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
}

/* Keep the injected header pinned to the top while scrolling.
   The sticky lives on the wrapper so it isn't confined to the
   header's own (collapsed) height. */
#header {
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Floating dock buttons: gentle bobbing to draw attention */
@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.float-bob {
  animation: floatBob 2.6s ease-in-out infinite;
}
.float-bob-delay {
  animation: floatBob 2.6s ease-in-out infinite;
  animation-delay: 0.5s;
}
@media (prefers-reduced-motion: reduce) {
  .float-bob, .float-bob-delay { animation: none; }
}

/* ---- Pokémon GO themed hero decorations (behind content) ---- */
.hero-decor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.hero-decor > * { position: absolute; }

@keyframes pokeFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-22px) rotate(10deg); }
}
@keyframes twinkle {
  0%, 100% { opacity: .15; transform: scale(.7); }
  50% { opacity: .9; transform: scale(1.2); }
}
.pball  { animation: pokeFloat 6s ease-in-out infinite; will-change: transform; }
.spark  { animation: twinkle 3s ease-in-out infinite; color: #67e8f9; }

/* Floating Pokémon characters */
@keyframes charFloat {
  0%, 100% { transform: translateY(0) rotate(-2.5deg); }
  50%      { transform: translateY(-18px) rotate(2.5deg); }
}
.poke-char {
  animation-name: charFloat;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .5));
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

/* ---- Spoof globe (flight-path / attack-map effect) ---- */
.spoof-globe {
  position: absolute;
  left: 50%;
  top: 40%;
  width: min(620px, 92vw);
  height: min(620px, 92vw);
  transform: translate(-50%, -50%);
  z-index: 0;
}
.globe-grid { stroke-opacity: .18; stroke-width: 1; }
.globe-city { fill: #67e8f9; }
.globe-city-ring {
  fill: none;
  stroke: #67e8f9;
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: cityPulse 2.6s ease-out infinite;
}
.globe-home { fill: #f59e0b; }
@keyframes cityPulse {
  0%   { transform: scale(.4); opacity: .8; }
  100% { transform: scale(2.6); opacity: 0; }
}
.arc-line {
  fill: none;
  stroke: #34d399;
  stroke-width: 1.8;
  stroke-linecap: round;
  filter: drop-shadow(0 0 3px rgba(52, 211, 153, .8));
  transition: opacity .6s ease;
}
.arc-head { fill: #d1fae5; filter: drop-shadow(0 0 5px rgba(52, 211, 153, .9)); transition: opacity .6s ease; }
.arc-ping {
  fill: none;
  stroke: #34d399;
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: pingExpand 1.2s ease-out forwards;
}
@keyframes pingExpand {
  0%   { transform: scale(.3); opacity: .9; }
  100% { transform: scale(6); opacity: 0; }
}
.arc-label {
  fill: #ecfeff;
  font-size: 12px;
  font-weight: 600;
  paint-order: stroke;
  stroke: #020617;
  stroke-width: 3px;
  opacity: 0;
  animation: labelPop 1.6s ease-out forwards;
}
@keyframes labelPop {
  0%   { opacity: 0; transform: translateY(4px); }
  20%  { opacity: 1; transform: translateY(0); }
  80%  { opacity: 1; }
  100% { opacity: 0; }
}
.spoof-app { transition: transform .15s ease, box-shadow .15s ease; cursor: pointer; }
.spoof-app:hover { transform: translateY(-3px) scale(1.06); }
.spoof-app:active { transform: scale(.94); }
.spoof-app.fired { animation: appBounce .4s ease; }
@keyframes appBounce {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.18); }
}
@media (prefers-reduced-motion: reduce) {
  .pball, .spark, .globe-city-ring, .poke-char { animation: none; }
}

/* Collapsed dock: keep the icon buttons visible, hide only the labels */
#float-dock.dock-collapsed #float-actions a span {
  display: none;
}
#float-dock.dock-collapsed #float-actions a {
  width: 3rem;
  padding-left: 0;
  padding-right: 0;
  justify-content: center;
  border-radius: 9999px 0 0 9999px;
}

body {
  background-color: #020617; /* slate-950 */
  color: #e2e8f0; /* slate-200 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle glow background for hero sections */
.hero-glow {
  position: relative;
  isolation: isolate;
}
.hero-glow::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(6, 182, 212, 0.18) 0%, transparent 70%),
    radial-gradient(40% 40% at 80% 20%, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* Animated grid backdrop */
.grid-bg {
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Reusable gradient text */
.text-gradient {
  background: linear-gradient(90deg, #22d3ee, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Card hover lift */
.card-hover {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 20px 40px -20px rgba(6, 182, 212, 0.35);
}

/* Fade-in on load */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
  animation: fadeInUp 0.6s ease both;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #334155; }

/* FAQ accordion */
.faq-item[open] summary svg {
  transform: rotate(180deg);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}

/* ============================================================
   Article / blog post typography (.article)
   Lets you write plain <h2>, <p>, <img>, <ul> etc. inside an
   element with class="article" and have it styled automatically.
   ============================================================ */
.article {
  color: #cbd5e1; /* slate-300 */
  font-size: 1.0625rem;
  line-height: 1.8;
}
.article > * + * {
  margin-top: 1.25rem;
}
.article h2 {
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.08), rgba(212, 168, 67, 0.03));
  border-left: 3px solid #d4a843;
  border-radius: 0 0.5rem 0.5rem 0;
  scroll-margin-top: 6rem;
}
.article h3 {
  color: #e2e8f0;
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-left: 3px solid #52525b;
  scroll-margin-top: 6rem;
}
.article p {
  color: #e2e8f0;
}
.article a {
  color: #22d3ee;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article a:hover {
  color: #67e8f9;
}
.article strong {
  color: #ffffff;
  font-weight: 600;
}
.article ul,
.article ol {
  padding-left: 1.5rem;
}
.article ul { list-style: disc; }
.article ol { list-style: decimal; }
.article li { margin-top: 0.5rem; }
.article li::marker { color: #22d3ee; }

/* Images & figures — 居中、不超过文字行宽 */
.article img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 1.5rem auto 0.5rem auto;
}
.article video {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 1.5rem auto 0.5rem auto;
  background: #000;
}
.article iframe {
  display: block;
  max-width: 100%;
  margin: 1.5rem auto 0.5rem auto;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.article figure {
  margin-top: 1.5rem;
}
.article figure img {
  margin-top: 0;
}
.article figcaption {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: #64748b; /* slate-500 */
}

/* Blockquote */
.article blockquote {
  border-left: 3px solid #22d3ee;
  padding-left: 1rem;
  color: #94a3b8;
  font-style: italic;
}

/* Inline code & code blocks */
.article code {
  background: rgba(148, 163, 184, 0.15);
  color: #e2e8f0;
  padding: 0.15em 0.4em;
  border-radius: 0.375rem;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.article pre {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  overflow-x: auto;
}
.article pre code {
  background: none;
  padding: 0;
  color: #e2e8f0;
}

.article h1 {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(59, 130, 246, 0.08));
  border-left: 4px solid #22d3ee;
  border-radius: 0 0.5rem 0.5rem 0;
  scroll-margin-top: 6rem;
}

/* Tables — 科技感金黄色外边框 */
.article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1.5rem 0;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.2), 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 2px solid #facc15;
}
.article table thead {
  border-bottom: 2px solid rgba(250, 204, 21, 0.4);
}
.article table th,
.article table td {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.7rem 1rem;
  text-align: left;
}
.article table th {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.15), rgba(250, 204, 21, 0.05));
  color: #facc15;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.article table td {
  background: rgba(15, 23, 42, 0.6);
  color: #e2e8f0;
}
.article table tbody tr:nth-child(even) td {
  background: rgba(30, 41, 59, 0.5);
}
.article table tbody tr:hover td {
  background: rgba(250, 204, 21, 0.06);
}

/* Callout box: <div class="callout">...</div> (optional tip/note) */
.article .callout {
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
}
.article .callout p { margin-top: 0; }

/* Category filter pills (blog listing) */
.cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(30, 41, 59, 0.8);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
}
.cat-pill:hover {
  border-color: rgba(34, 211, 238, 0.4);
  color: #e2e8f0;
}
.cat-pill.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(37, 99, 235, 0.15));
  border-color: #22d3ee;
  color: #22d3ee;
}

/* Pagination buttons */
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(30, 41, 59, 0.8);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
}
.page-btn:hover:not([disabled]) {
  border-color: rgba(34, 211, 238, 0.5);
  color: #e2e8f0;
  background: rgba(30, 41, 59, 1);
}
.page-btn.active {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: white;
  border-color: transparent;
}
.page-btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Card glow (blog listing) */
.card-glow {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.card-glow:hover {
  transform: translateY(-4px);
}

/* Horizontal rule */
.article hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
}

/* ── Language Switcher ── */
.lang-dropdown {
  animation: langSlideIn .18s ease-out;
}
@keyframes langSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.lang-dropup {
  animation: langSlideUp .18s ease-out;
}
@keyframes langSlideUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.lang-option.lang-active {
  color: #22d3ee;
  background: rgba(6, 182, 212, 0.08);
}
.lang-option.lang-active .lang-code {
  color: #22d3ee;
}
.lang-chevron-open {
  transform: rotate(180deg);
}
.lang-pill {
  transition: border-color .2s, color .2s, background .2s;
}
.lang-pill.lang-active {
  color: #22d3ee;
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(6, 182, 212, 0.08);
}

/* ── New User Popup ── */
.new-user-popup {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 60;
  width: 340px;
  max-width: calc(100vw - 48px);
  padding: 28px 24px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.97) 0%, rgba(30, 41, 59, 0.97) 100%);
  border: 1px solid rgba(34, 211, 238, 0.25);
  box-shadow:
    0 0 40px rgba(6, 182, 212, 0.18),
    0 0 80px rgba(59, 130, 246, 0.1),
    0 20px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: popupSlideIn .5s cubic-bezier(.16,1,.3,1);
  overflow: hidden;
}
/* Sci-fi border glow animation */
.new-user-popup::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  padding: 1px;
  background: linear-gradient(135deg, #22d3ee, #3b82f6, #8b5cf6, #22d3ee);
  background-size: 300% 300%;
  animation: popupBorderGlow 3s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
  pointer-events: none;
}
/* Grid overlay for tech feel */
.new-user-popup::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background-image:
    linear-gradient(to right, rgba(34, 211, 238, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 0;
}
@keyframes popupSlideIn {
  from { opacity: 0; transform: translateX(-20px) translateY(20px); }
  to   { opacity: 1; transform: translateX(0) translateY(0); }
}
@keyframes popupBorderGlow {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.new-user-popup > * { position: relative; z-index: 1; }
/* Close button */
.popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
  z-index: 2;
}
.popup-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}
/* Popup icon */
.popup-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(34, 211, 238, 0.2);
  font-size: 24px;
  margin-bottom: 16px;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.12);
}
/* Popup text */
.popup-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px 0;
  line-height: 1.3;
}
.popup-desc {
  font-size: 0.875rem;
  color: #94a3b8;
  margin: 0 0 18px 0;
  line-height: 1.5;
}
/* CTA button */
.popup-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  border: none;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.35), 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all .25s;
}
.popup-cta:hover {
  background: linear-gradient(135deg, #22d3ee, #60a5fa);
  box-shadow: 0 0 36px rgba(6, 182, 212, 0.5), 0 6px 16px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}
/* Corner tech bracket decorations */
.popup-bracket {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: rgba(34, 211, 238, 0.3);
  border-style: solid;
  pointer-events: none;
  z-index: 1;
}
.popup-bracket.br-tl { top: 8px; left: 8px; border-width: 1px 0 0 1px; border-radius: 4px 0 0 0; }
.popup-bracket.br-tr { top: 8px; right: 8px; border-width: 1px 1px 0 0; border-radius: 0 4px 0 0; }
.popup-bracket.br-bl { bottom: 8px; left: 8px; border-width: 0 0 1px 1px; border-radius: 0 0 0 4px; }
.popup-bracket.br-br { bottom: 8px; right: 8px; border-width: 0 1px 1px 0; border-radius: 0 0 4px 0; }

/* ── Back to Top ── */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 80px;
  z-index: 45;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #94a3b8;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: all .3s;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  color: #22d3ee;
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.2), 0 4px 16px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}
.back-to-top:active {
  transform: scale(.92);
}
