/* ==========================================================================
   UI-AESTHETICS & UI-UX-PRO-MAX REFACTOR
   Theme: High-End Industrial Cyberpunk (Restrained & Precise)
   ========================================================================== */

:root {
  --bg-core: #030712;
  --bg-surface: rgba(15, 23, 42, 0.4);
  --bg-surface-hover: rgba(30, 41, 59, 0.6);
  --border-subtle: rgba(56, 189, 248, 0.15);
  --border-focus: rgba(56, 189, 248, 0.6);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-cyan: #22d3ee;
  --accent-fuchsia: #d946ef;
}

body {
  background: var(--bg-core) !important;
  color: var(--text-primary) !important;
  position: relative;
}

/* 1. Controlled Background & Depth */
.pro-max-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.05), transparent 50%),
              radial-gradient(circle at 100% 100%, rgba(217, 70, 239, 0.03), transparent 50%);
}
.pro-max-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

.cyber-rain-pro {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
  mix-blend-mode: screen;
}

/* 2. Precision Cursor Glow */
.cyber-cursor-glow-pro {
  position: fixed;
  top: 0; left: 0;
  width: 600px;
  height: 600px;
  margin-left: -300px;
  margin-top: -300px;
  background: radial-gradient(circle at center, rgba(34, 211, 238, 0.04), transparent 50%);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.3s ease;
  will-change: transform;
}

/* Meteors */
.cyber-meteors-pro {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  opacity: 0.8;
}
.cyber-meteor-pro {
  position: absolute;
  right: -22vw;
  top: 0;
  width: 24vw;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.9) 0%, rgba(34,211,238,0.7) 12%, transparent 100%);
  box-shadow: 0 0 10px rgba(34,211,238,0.15);
  transform: rotate(-24deg);
  opacity: 0;
}
.cyber-meteor-pro::after {
  content: "";
  position: absolute;
  left: -2px;
  top: -1px;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255,255,255,0.8), 0 0 16px rgba(34,211,238,0.4);
}
.cyber-meteor-pro.m1 { top: 10%; animation: meteorA 8s linear infinite 0.2s; }
.cyber-meteor-pro.m2 { top: 23%; width: 16vw; animation: meteorB 11s linear infinite 1.6s; }
.cyber-meteor-pro.m3 { top: 37%; width: 20vw; animation: meteorC 9.2s linear infinite 3.1s; }
.cyber-meteor-pro.m4 { top: 54%; width: 15vw; animation: meteorA 12.5s linear infinite 0.8s; }
.cyber-meteor-pro.m5 { top: 72%; width: 18vw; animation: meteorB 10.2s linear infinite 4.5s; }
.cyber-meteor-pro.m6 { top: 84%; width: 13vw; animation: meteorC 13s linear infinite 2.8s; }

@keyframes meteorA { 0%, 18% { transform: translate3d(0,0,0) rotate(-24deg); opacity: 0; } 22%, 36% { opacity: 0.8; } 52%, 100% { transform: translate3d(-126vw,42vh,0) rotate(-24deg); opacity: 0; } }
@keyframes meteorB { 0%, 24% { transform: translate3d(0,0,0) rotate(-24deg); opacity: 0; } 28%, 42% { opacity: 0.6; } 58%, 100% { transform: translate3d(-112vw,36vh,0) rotate(-24deg); opacity: 0; } }
@keyframes meteorC { 0%, 20% { transform: translate3d(0,0,0) rotate(-24deg); opacity: 0; } 26%, 40% { opacity: 0.5; } 56%, 100% { transform: translate3d(-118vw,40vh,0) rotate(-24deg); opacity: 0; } }

/* 3. Pure Minimalist Structure (Removing the big boxes entirely) */
header, main, footer { position: relative; z-index: 10; }

main article, main section, main .grid>div {
  background: transparent !important;
  border: 1px solid rgba(56, 189, 248, 0.05) !important;
  border-top: 1px solid rgba(56, 189, 248, 0.1) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  position: relative;
  transition: all 0.25s ease;
  overflow: hidden;
  padding: 1.5rem !important;
}

/* 4. Restrained Interaction States */
main article:hover, main .grid>div:hover {
  background: rgba(15, 23, 42, 0.4) !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.5) !important;
  transform: translateY(-2px);
}

/* 5. Typography & Clean Headers */
main h1 {
  text-shadow: none !important;
  color: var(--text-primary) !important;
  font-weight: 600;
  letter-spacing: 0.05em;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
main h2 {
  text-shadow: none !important;
  color: var(--accent-cyan) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  padding-bottom: 8px !important;
}

/* 6. Remove original heavy containers completely */
.bg-gray-900, .bg-gray-900\/60, .bg-gray-900\/90, .bg-gray-900\/95, .bg-gray-800, .bg-gray-800\/85 {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* MOTD box specifically */
#motd-box { 
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  color: var(--accent-cyan) !important;
}

/* Navigation Precision */
nav ul[class*="bg-gray-900"], header nav > ul {
  background: var(--bg-surface) !important;
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle) !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
}
.btn-main {
  clip-path: none !important;
  border-radius: 4px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  transition: all 0.2s ease;
  padding: 6px 12px !important;
  color: var(--text-secondary) !important;
}
.btn-main:hover {
  background: rgba(34, 211, 238, 0.08) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--accent-cyan) !important;
  transform: none !important;
  box-shadow: none !important;
}

/* 7. Clean up */
.cyber-rain, .cyber-hud, .cyber-crosshair, .cyber-horizon, .glitch-layer, .cyber-meteors { display: none !important; }
.glitch-text, .pulse, .animate-holo-shimmer, .animate-pulse, .animate-pulse-fast, .animate-blink { animation: none !important; }

/* 8. Refine top-left brand area */
header {
  padding-top: 1.1rem !important;
  padding-bottom: 1rem !important;
}

header nav {
  align-items: center !important;
  gap: 1rem;
}

header nav > a[href="/blog/"] {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  min-height: 52px;
  padding: 0.8rem 1rem 0.8rem 1.1rem;
  border: 1px solid rgba(34, 211, 238, 0.14);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(8, 15, 28, 0.76), rgba(5, 10, 20, 0.46)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 30px rgba(0,0,0,0.24);
  color: #d8f8ff !important;
  text-shadow: none !important;
  letter-spacing: 0.24em !important;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

header nav > a[href="/blog/"]::before {
  content: "NODE // 01";
  position: absolute;
  top: -0.58rem;
  left: 0.95rem;
  padding: 0.08rem 0.42rem;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  background: rgba(3, 7, 18, 0.92);
  color: rgba(125, 211, 252, 0.72);
  font-family: "Share Tech Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  line-height: 1.2;
}

header nav > a[href="/blog/"]::after {
  content: "";
  position: absolute;
  left: 0.65rem;
  top: 50%;
  width: 3px;
  height: calc(100% - 1.15rem);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.9), rgba(34, 211, 238, 0.18));
  transform: translateY(-50%);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.16);
}

header nav > a[href="/blog/"]:hover {
  border-color: rgba(34, 211, 238, 0.28);
  background: linear-gradient(180deg, rgba(10, 20, 36, 0.9), rgba(6, 13, 24, 0.62)) !important;
  color: #f2feff !important;
  transform: translateY(-1px);
}

nav ul[class*="bg-gray-900"], header nav > ul {
  min-height: 52px;
  padding: 0.45rem 0.55rem !important;
  border-color: rgba(56, 189, 248, 0.12) !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, rgba(7, 13, 24, 0.72), rgba(7, 13, 24, 0.48)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 30px rgba(0,0,0,0.18) !important;
}

.btn-main {
  min-height: 38px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.8rem !important;
  border-radius: 8px !important;
}

/* 9. Rebuild footer into a cleaner low-profile terminal rail */
footer {
  margin-top: 4.5rem !important;
  padding-top: 1.3rem !important;
  padding-bottom: 1.15rem !important;
  background:
    linear-gradient(180deg, rgba(7, 12, 22, 0.78), rgba(5, 9, 18, 0.92)) !important;
  border-top: 1px solid rgba(34, 211, 238, 0.16) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03) !important;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.34), rgba(217, 70, 239, 0.2), transparent);
  pointer-events: none;
}

footer::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 56px;
  background: radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.08), transparent 72%);
  pointer-events: none;
}

footer > .relative.z-10 {
  display: grid !important;
  grid-template-columns: minmax(0, 1.5fr) auto auto;
  align-items: center;
  gap: 1rem 1.5rem;
  max-width: 1120px !important;
}

footer > .relative.z-10 > div:nth-child(1) {
  display: flex !important;
  align-items: center;
  gap: 0.7rem !important;
  margin: 0 !important;
  min-width: 0;
}

footer > .relative.z-10 > div:nth-child(1)::before {
  content: "SYS";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 1.5rem;
  padding: 0 0.5rem;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.06);
  color: rgba(125, 211, 252, 0.72);
  font-family: "Share Tech Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  line-height: 1;
}

footer > .relative.z-10 > div:nth-child(1) > span:first-child {
  font-size: 0.98rem !important;
  color: #d7f8ff !important;
  text-shadow: none !important;
  letter-spacing: 0.16em !important;
}

footer > .relative.z-10 > div:nth-child(1) > span:last-child {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.7rem !important;
  letter-spacing: 0.16em;
  color: rgba(148, 163, 184, 0.76) !important;
  text-transform: uppercase;
}

footer > .relative.z-10 > div:nth-child(2) {
  justify-self: center;
  margin: 0 !important;
  gap: 0.5rem !important;
  flex-wrap: wrap;
}

footer > .relative.z-10 > div:nth-child(2) a,
footer > .relative.z-10 > div:nth-child(3) a {
  min-height: 34px;
  padding: 0.4rem 0.72rem;
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  color: #d6f6ff !important;
  text-decoration: none !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

footer > .relative.z-10 > div:nth-child(2) a:hover,
footer > .relative.z-10 > div:nth-child(3) a:hover {
  border-color: rgba(34, 211, 238, 0.24);
  background: rgba(34, 211, 238, 0.06);
  color: #f4fcff !important;
  transform: translateY(-1px);
}

footer > .relative.z-10 > div:nth-child(2) svg {
  width: 0.92rem;
  height: 0.92rem;
  color: rgba(34, 211, 238, 0.76) !important;
}

footer > .relative.z-10 > div:nth-child(3) {
  justify-self: end;
  align-items: center;
  gap: 0.5rem !important;
  margin: 0 !important;
}

footer > .relative.z-10 > div:nth-child(3) > span {
  font-size: 0.64rem !important;
  letter-spacing: 0.18em !important;
  color: rgba(217, 70, 239, 0.72) !important;
  text-shadow: none !important;
}

footer > .relative.z-10 > div:nth-child(3) a {
  font-size: 0.76rem !important;
  letter-spacing: 0.1em;
  color: rgba(203, 241, 255, 0.86) !important;
  text-shadow: none !important;
}

@media (max-width: 900px) {
  footer > .relative.z-10 {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  footer > .relative.z-10 > div:nth-child(1),
  footer > .relative.z-10 > div:nth-child(2),
  footer > .relative.z-10 > div:nth-child(3) {
    justify-self: center;
  }
}

@media (max-width: 640px) {
  header nav {
    align-items: flex-start !important;
  }

  header nav > a[href="/blog/"] {
    min-height: 48px;
    padding: 0.72rem 0.9rem 0.72rem 1rem;
    font-size: 1.1rem !important;
    letter-spacing: 0.18em !important;
  }

  header nav > a[href="/blog/"]::before {
    left: 0.82rem;
  }

  footer > .relative.z-10 > div:nth-child(1) {
    flex-direction: column;
    gap: 0.4rem !important;
  }
}

/* 10. Remove footer credits / copyright meta */
footer {
  padding-top: 0.7rem !important;
  padding-bottom: 0.7rem !important;
  min-height: 18px;
}

footer > .relative.z-10 {
  display: none !important;
}

footer::before {
  opacity: 0.55;
}

footer::after {
  height: 24px;
  opacity: 0.4;
}

/* === no-underline-except-nav: 除顶部导航(.btn-main)外，去掉正文/页脚文字下划线 === */
main a, footer a { text-decoration: none !important; }
main .underline, footer .underline { text-decoration: none !important; }
main a { border-bottom: none !important; }
