#custom-cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--amber);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  box-shadow:
    0 0 18px var(--amber),
    0 0 36px var(--amber-glow),
    0 0 60px var(--amber-glow);
  mix-blend-mode: screen;
  display: none;
}

#cursor-ring {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(255,176,0,0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition:
    width 0.35s var(--ease-out),
    height 0.35s var(--ease-out),
    border-color 0.35s,
    box-shadow 0.35s;
  display: none;
  box-shadow: 0 0 20px rgba(255,176,0,0.15);
}

@media (hover: hover) and (pointer: fine) {
  body.cursor-custom { cursor: none; }
  body.cursor-custom #custom-cursor { display: block; }
  body.cursor-custom #cursor-ring { display: block; }
  body.cursor-custom a,
  body.cursor-custom button { cursor: none; }
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem var(--pad);
  pointer-events: none;
  transition: padding var(--t-mid) var(--ease-out);
}

.navbar > * { pointer-events: auto; }

.nav-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.8rem 0.8rem 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.15rem;
  background: linear-gradient(145deg, rgba(20,24,34,0.75) 0%, rgba(12,15,22,0.85) 100%);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  box-shadow:
    0 16px 50px rgba(0,0,0,0.5),
    0 0 80px rgba(167,139,250,0.08),
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -6px 16px rgba(0,0,0,0.2);
  transition: background var(--t-mid), border-color var(--t-mid), box-shadow var(--t-mid);
}

.navbar.scrolled .nav-container {
  background: linear-gradient(145deg, rgba(8,10,15,0.92) 0%, rgba(5,6,10,0.95) 100%);
  border-color: var(--line-hi);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.65),
    0 0 100px rgba(255,176,0,0.1),
    0 0 80px rgba(167,139,250,0.08),
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -6px 16px rgba(0,0,0,0.25);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-0);
  white-space: nowrap;
}

.logo-icon {
  color: var(--amber);
  filter: drop-shadow(0 0 12px var(--amber-glow-strong));
  animation: float 4s ease-in-out infinite;
  flex-shrink: 0;
  font-size: 1.3rem;
}

.version-badge {
  background: linear-gradient(145deg, rgba(255,176,0,0.18) 0%, rgba(244,114,182,0.12) 100%);
  color: var(--amber-hi);
  padding: 0.28rem 0.75rem;
  border-radius: var(--r-full);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.6px;
  border: 1px solid var(--line-amber-hi);
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  position: relative;
}

.nav-link {
  position: relative;
  padding: 0.6rem 1.05rem;
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--r-full);
  transition: color var(--t-fast), background var(--t-fast);
  white-space: nowrap;
  z-index: 1;
}

.nav-link:hover { color: var(--text-0); }
.nav-link.active { color: #06070b; font-weight: 600; }

.nav-indicator {
  position: absolute;
  top: 50%;
  left: 0;
  height: calc(100% - 12px);
  background: linear-gradient(90deg, var(--amber), var(--pink));
  border-radius: var(--r-full);
  transform: translateY(-50%);
  transition: left 0.45s var(--ease-spring), width 0.45s var(--ease-spring);
  z-index: 0;
  box-shadow:
    0 0 28px var(--amber-glow-strong),
    0 0 50px rgba(244,114,182,0.3),
    inset 0 1px 0 rgba(255,255,255,0.4);
  pointer-events: none;
}

.mobile-menu-btn {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: var(--r-full);
  background: linear-gradient(145deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid var(--line);
  color: var(--text-1);
  font-size: 1.05rem;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow:
    0 6px 20px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.08);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}

.mobile-menu-btn:hover,
.mobile-menu-btn:active {
  background: var(--amber-glow);
  border-color: var(--line-amber-hi);
  color: var(--amber);
  box-shadow:
    0 8px 24px rgba(0,0,0,0.35),
    0 0 40px var(--amber-glow);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  z-index: 999;
  transition: opacity 0.35s, visibility 0.35s;
}

.nav-overlay.show { opacity: 1; visibility: visible; }

main {
  padding-top: calc(var(--nav-h) + 0.75rem);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.page-header {
  position: relative;
  padding: 2rem var(--pad) 1.75rem;
  text-align: center;
  overflow: hidden;
  animation: fade-up 0.75s var(--ease-out) both;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-amber-hi), transparent);
  opacity: 0.6;
}

.page-header-container {
  max-width: 780px;
  margin: 0 auto;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.page-subtitle {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.4px;
}

.section-head {
  text-align: center;
  margin-bottom: 3rem;
  padding: 0 var(--pad);
}

.section-title {
  margin-bottom: 0.65rem;
  font-family: var(--font-display);
  font-weight: 800;
}

.section-sub {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.footer {
  margin-top: auto;
  padding: 3.5rem var(--pad) 1.75rem;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-hi), transparent);
}

.footer-container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.25rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
}

.footer-logo .logo-icon {
  font-size: 1.2rem;
}

.footer-desc {
  color: var(--text-3);
  font-size: 0.87rem;
  line-height: 1.7;
  margin-bottom: 0.95rem;
  max-width: 360px;
}

.footer-license {
  display: inline-block;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.28rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.footer-col h4 {
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 1.05rem;
  font-weight: 500;
}

.footer-col a {
  display: block;
  color: var(--text-2);
  font-size: 0.87rem;
  padding: 0.35rem 0;
  transition: color var(--t-fast), padding-left var(--t-fast);
}

.footer-col a:hover { color: var(--amber); padding-left: 0.4rem; }

.footer-bottom {
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.77rem;
  color: var(--text-3);
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow:
    0 0 12px var(--green),
    0 0 24px var(--green-glow);
  animation: blink 2s ease infinite;
}

.status-text { color: var(--green); }

.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
  pointer-events: none;
}

.toast {
  padding: 0.8rem 1.6rem;
  background: linear-gradient(145deg, rgba(24,28,39,0.92) 0%, rgba(17,20,28,0.95) 100%);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  color: var(--text-0);
  border: 1px solid var(--line-amber-hi);
  border-radius: var(--r-full);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  box-shadow:
    0 0 50px var(--amber-glow),
    0 18px 50px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.1);
  animation: toast-in 0.35s var(--ease-out);
  white-space: nowrap;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: var(--pad);
}

.modal-overlay.active { display: flex; animation: fade-in 0.3s var(--ease-out); }

.modal {
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  max-height: 85svh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, rgba(24,28,39,0.95) 0%, rgba(17,20,28,0.98) 100%);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid var(--line-hi);
  border-radius: var(--r-xl);
  box-shadow:
    0 0 100px rgba(255,176,0,0.12),
    0 0 80px rgba(167,139,250,0.08),
    0 40px 110px rgba(0,0,0,0.8),
    inset 0 2px 0 rgba(255,255,255,0.12),
    inset 0 -10px 28px rgba(0,0,0,0.3);
  animation: fade-up 0.35s var(--ease-out);
  overflow: hidden;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.15rem;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--amber);
}

.modal-close {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  color: var(--text-2);
  background: linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  transition: var(--t-fast);
}

.modal-close:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(244,63,94,0.1);
  box-shadow:
    0 0 30px var(--red-glow),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  -webkit-overflow-scrolling: touch;
}

.modal-footer {
  padding: 1.05rem 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.modal-btn {
  padding: 0.6rem 1.2rem;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 500;
  background: linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  transition: var(--t-fast);
}

.modal-btn:hover {
  background: rgba(255,255,255,0.07);
  color: var(--text-0);
  border-color: var(--line-hi);
  box-shadow:
    0 6px 20px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.modal-btn.primary {
  background: linear-gradient(145deg, var(--amber) 0%, var(--amber-hi) 100%);
  border-color: transparent;
  color: #06070b;
  font-weight: 600;
  box-shadow:
    0 10px 30px var(--amber-glow-strong),
    inset 0 1px 0 rgba(255,255,255,0.4);
}

.modal-btn.primary:hover {
  box-shadow:
    0 14px 40px var(--amber-glow-strong),
    0 0 60px var(--amber-glow),
    inset 0 1px 0 rgba(255,255,255,0.5);
}

.json-viewer {
  padding: 1.25rem;
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 0.77rem;
  color: var(--text-1);
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
}