/* ============================================
   publish.css - YMH6366 Agent Page
   匹配 www.yuminghao6366.com 赛博太空风格
   ============================================ */

/* --- Google Font: Space Grotesk --- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  --background: #131313;
  --surface: #1a1a1a;
  --surface-container: #201f1f;
  --surface-container-high: #2a2a2a;
  --surface-container-highest: #353534;
  --on-surface: #e5e2e1;
  --on-surface-variant: #b9cacb;
  --primary: #00dbe7;
  --primary-container: #00f2ff;
  --primary-dim: rgba(0, 219, 231, 0.15);
  --secondary: #ebb2ff;
  --secondary-container: #b600f8;
  --tertiary: #c3c0ff;
  --cyan-glow: rgba(0, 242, 255, 0.3);
  --cyan-border: rgba(0, 242, 255, 0.2);
  --cyan-border-bright: rgba(0, 242, 255, 0.4);
  --text-glow: 0 0 8px rgba(0, 242, 255, 0.5);
  --box-glow: 0 0 15px rgba(0, 242, 255, 0.3);
  --font-main: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- Global Reset --- */
body {
  font-family: var(--font-main) !important;
  background: var(--background) !important;
  color: var(--on-surface) !important;
  line-height: 1.6;
  letter-spacing: 0.01em;
  position: relative;
  min-height: 100vh;
}

/* Grid lines overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0, 242, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 242, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

/* Scan lines overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom, transparent, transparent 50%, rgba(0, 242, 255, 0.015) 50%, rgba(0, 242, 255, 0.015));
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 0;
}

/* --- Navigation Bar --- */
.site-header,
.navbar,
header {
  background: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid var(--cyan-border) !important;
  box-shadow: 0 1px 0 0 rgba(0, 242, 255, 0.1), 0 0 20px rgba(0, 242, 255, 0.05) !important;
}

.site-header .site-name,
.navbar .site-name,
.site-nav-left a {
  color: var(--primary) !important;
  text-shadow: 0 0 8px rgba(0, 242, 255, 0.5) !important;
  font-weight: 700 !important;
}

/* --- Main Content Area --- */
.page-container,
main,
article {
  position: relative;
  z-index: 1;
}

/* --- Glass Panel Effect for Cards/Sections --- */
.markdown-preview-view {
  background: transparent !important;
}

/* --- Headings --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary) !important;
  font-family: var(--font-main) !important;
  text-shadow: var(--text-glow) !important;
  letter-spacing: 0.02em;
}

h1 {
  font-size: 2rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  border-bottom: 1px solid var(--cyan-border) !important;
  padding-bottom: 0.5rem;
  text-shadow: 0 0 12px rgba(0, 242, 255, 0.6) !important;
}

h2 {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  border-left: 3px solid var(--primary) !important;
  padding-left: 12px;
}

h3 {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
}

/* --- Links --- */
a {
  color: var(--primary) !important;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

a:hover {
  text-shadow: var(--text-glow) !important;
  filter: brightness(1.3);
}

.internal-link,
.cm-link {
  color: var(--primary) !important;
}

.external-link {
  color: var(--secondary) !important;
}

/* --- Text --- */
p, li, span, td, th {
  color: var(--on-surface) !important;
}

/* --- Code Blocks --- */
code {
  background: var(--surface-container) !important;
  color: var(--primary) !important;
  border: 1px solid var(--cyan-border) !important;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.9em;
}

pre {
  background: var(--surface-container) !important;
  border: 1px solid var(--cyan-border) !important;
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

pre code {
  background: transparent !important;
  border: none !important;
  padding: 0;
}

/* --- Blockquotes --- */
blockquote {
  background: var(--primary-dim) !important;
  border-left: 3px solid var(--primary) !important;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin: 16px 0;
  color: var(--on-surface) !important;
}

/* --- Tables --- */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
}

th {
  background: var(--surface-container-high) !important;
  color: var(--primary) !important;
  border: 1px solid var(--cyan-border) !important;
  padding: 10px 14px;
  font-weight: 600;
  text-align: left;
}

td {
  background: var(--surface-container) !important;
  border: 1px solid var(--cyan-border) !important;
  padding: 10px 14px;
}

tr:hover td {
  background: var(--surface-container-high) !important;
}

/* --- Lists --- */
ul, ol {
  padding-left: 24px;
}

li::marker {
  color: var(--primary) !important;
}

/* --- Horizontal Rule --- */
hr {
  border: none !important;
  height: 1px !important;
  background: linear-gradient(to right, transparent, var(--primary), transparent) !important;
  margin: 2rem 0;
  box-shadow: 0 0 8px rgba(0, 242, 255, 0.3);
}

/* --- Tags --- */
.tag {
  background: rgba(0, 219, 231, 0.1) !important;
  color: var(--primary) !important;
  border: 1px solid var(--cyan-border) !important;
  border-radius: 9999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* --- Callouts / Admonitions --- */
.callout {
  background: var(--surface-container) !important;
  border: 1px solid var(--cyan-border) !important;
  border-radius: 8px;
  box-shadow: var(--box-glow);
}

.callout-title {
  color: var(--primary) !important;
  font-weight: 600;
}

/* --- Sidebar / File Explorer --- */
.nav-file-title,
.nav-folder-title {
  color: var(--on-surface-variant) !important;
}

.nav-file-title:hover,
.nav-folder-title:hover {
  color: var(--primary) !important;
  background: var(--primary-dim) !important;
}

/* --- Graph View --- */
.graph-view.color-fill {
  color: var(--primary) !important;
}

.graph-view.color-line {
  color: rgba(0, 219, 231, 0.3) !important;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface) !important;
}

::-webkit-scrollbar-thumb {
  background: var(--surface-container-highest) !important;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary) !important;
}

/* --- Selection --- */
::selection {
  background: rgba(0, 219, 231, 0.3);
  color: #fff;
}

/* --- Embed Frame --- */
iframe {
  border: 1px solid var(--cyan-border) !important;
  border-radius: 8px;
}

/* --- Footer --- */
.site-footer,
footer {
  border-top: 1px solid var(--cyan-border) !important;
  color: var(--on-surface-variant) !important;
  font-size: 12px;
}

/* --- Back to Top / Breadcrumb --- */
.breadcrumb {
  color: var(--on-surface-variant) !important;
  font-size: 12px;
  letter-spacing: 0.05em;
}

/* --- Image --- */
img {
  border-radius: 8px;
  border: 1px solid var(--cyan-border);
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 1.5rem !important; }
  h2 { font-size: 1.25rem !important; }
  body { padding: 16px; }
}
