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

:root {
  --bg-main: #F4F1EB;
  --bg-surface: #EDE9E2;
  --bg-card: #E6E2DA;
  --bg-hover: #DCD8D0;
  --text-primary: #3A3632;
  --text-secondary: #6B635A;
  --text-dim: #9A9088;
  --accent-green: #2E7D5E;
  --accent-amber: #B87322;
  --accent-cyan: #1A7A8A;
  --accent-red: #C44D58;
  --accent-purple: #7B5EA7;
  --border-subtle: #D5D0C8;
  --border-accent: #C5C0B8;
  --glow-green: rgba(46, 125, 94, 0.1);
  --glow-amber: rgba(184, 115, 34, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.85;
  font-size: 1rem;
  position: relative;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.typora-export {
  padding: 0;
}

.typora-export-content {
  max-width: 100%;
  margin: 0;
}

#write {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
  position: relative;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  color: var(--accent-green);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.02em;
  position: relative;
}

h1 {
  font-size: 1.8rem;
  margin: 1.5rem 0 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

h1::before {
  content: '>';
  color: var(--accent-amber);
  font-weight: 400;
  margin-right: 0;
}

h1 img {
  width: 138px;
  height: auto;
  vertical-align: middle;
  background: var(--bg-surface);
  padding: 5px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

h1 span {
  vertical-align: middle;
}

h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
}

h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.8rem;
}

h4 {
  font-size: 0.95rem;
  color: var(--accent-amber);
  margin: 2rem 0 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h4::before {
  content: '# ';
  color: var(--text-dim);
  font-weight: 400;
}

h5 {
  font-size: 1rem;
}

h6 {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

p {
  margin: 0.8rem 0;
  line-height: 1.85;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #15667A;
  text-decoration: underline;
}

a img {
  vertical-align: middle;
  transition: opacity 0.2s ease;
}

a:hover img {
  opacity: 0.85;
}

blockquote {
  margin: 1.5rem 0;
  padding: 1.2rem 1.5rem 1.2rem 2rem;
  background: var(--bg-surface);
  border-left: 3px solid var(--accent-green);
  border-radius: 0 4px 4px 0;
  color: var(--text-secondary);
  position: relative;
  font-style: normal;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-green);
}

blockquote::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0 4px 0 0;
}

blockquote::after {
  content: '● ● ●';
  position: absolute;
  top: 5px;
  left: 12px;
  font-size: 0.55rem;
  color: var(--text-dim);
  letter-spacing: 4px;
  word-spacing: -2px;
}

blockquote span,
blockquote p {
  position: relative;
  z-index: 1;
  margin-top: 0.5rem;
}

blockquote > :first-child {
  margin-top: 1.2rem;
}

blockquote > :last-child {
  margin-bottom: 0;
}

.text {
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--text-secondary);
  margin: 1rem 0;
}

.text span {
  display: inline;
  margin-right: 1rem;
}

.jc {
  margin: 0.5rem 0;
}

.jc a {
  font-size: 1rem !important;
}

hr {
  border: none;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--border-accent) 15%,
    var(--border-accent) 85%,
    transparent 100%
  );
  margin: 2rem 0;
}

img {
  max-width: 100%;
  vertical-align: middle;
}

.terminal-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  position: relative;
  overflow: hidden;
}

.terminal-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-block::after {
  content: '● ● ●';
  position: absolute;
  top: 5px;
  left: 12px;
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 4px;
  word-spacing: -2px;
}

.prompt-line {
  display: block;
  margin-bottom: 0.6rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.7;
}

.prompt-line::before {
  content: '$ ';
  color: var(--accent-green);
  font-weight: 600;
}

.prompt-line .label {
  color: var(--accent-amber);
}

.prompt-line .value {
  color: var(--text-primary);
}

.prompt-line .comment {
  color: var(--text-dim);
  font-style: italic;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  border-radius: 3px;
  margin: 0.2rem 0.3rem 0.2rem 0;
  vertical-align: middle;
}

.tag-green {
  background: rgba(46, 125, 94, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(46, 125, 94, 0.2);
}

.tag-amber {
  background: rgba(184, 115, 34, 0.1);
  color: var(--accent-amber);
  border: 1px solid rgba(184, 115, 34, 0.2);
}

.tag-cyan {
  background: rgba(26, 122, 138, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(26, 122, 138, 0.2);
}

.tag-red {
  background: rgba(196, 77, 88, 0.1);
  color: var(--accent-red);
  border: 1px solid rgba(196, 77, 88, 0.2);
}

.tag-purple {
  background: rgba(123, 94, 167, 0.1);
  color: var(--accent-purple);
  border: 1px solid rgba(123, 94, 167, 0.2);
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.status-dot.online {
  background: var(--accent-green);
  box-shadow: 0 0 5px rgba(46, 125, 94, 0.4);
}

.status-dot.offline {
  background: var(--accent-red);
  box-shadow: 0 0 5px rgba(196, 77, 88, 0.3);
}

.status-dot.idle {
  background: var(--accent-amber);
  box-shadow: 0 0 5px rgba(184, 115, 34, 0.3);
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.cursor-blink {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--accent-green);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1.1s step-end infinite;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeSlideIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  opacity: 0;
}

.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.12s; }
.animate-in:nth-child(3) { animation-delay: 0.22s; }
.animate-in:nth-child(4) { animation-delay: 0.34s; }
.animate-in:nth-child(5) { animation-delay: 0.46s; }
.animate-in:nth-child(6) { animation-delay: 0.58s; }
.animate-in:nth-child(7) { animation-delay: 0.7s; }
.animate-in:nth-child(8) { animation-delay: 0.82s; }

.section-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 2.5rem 0 1.5rem;
  color: var(--text-dim);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-divider::before {
  content: '';
  flex: 0 0 20px;
  height: 1px;
  background: var(--border-accent);
}

.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.glow-line {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-green),
    transparent
  );
  opacity: 0.35;
  margin: 2rem 0;
}

.friend-links {
  margin: 2rem 0;
  padding: 1.2rem 0;
}

.friend-links strong {
  color: var(--accent-amber);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.friend-links strong::before {
  content: '// ';
  color: var(--text-dim);
}

.friend-links a {
  display: inline-block;
  margin: 0.3rem 0.8rem 0.3rem 0;
  font-size: 0.9rem;
  font-family: "JetBrains Mono", monospace;
}

.footer-info {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 2;
  text-align: center;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: 2rem;
}

.footer-info a {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.footer-info a:hover {
  color: var(--accent-cyan);
}

.download-item {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.6rem 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
}

.download-item::before {
  content: '→';
  color: var(--accent-green);
}

.download-item .dl-label {
  color: var(--text-primary);
}

.download-item .dl-version {
  color: var(--accent-red);
  font-size: 0.8rem;
}

.download-item a {
  color: var(--accent-cyan);
}

.qq-group {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.3rem 0.8rem 0.3rem 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.qq-group::before {
  content: '◆';
  color: var(--accent-green);
  font-size: 0.5rem;
}

@media screen and (max-width: 768px) {
  #write {
    padding: 1.5rem 1.2rem 3rem;
  }

  h1 {
    font-size: 1.4rem;
  }

  body {
    font-size: 15px;
  }

  .qq-group {
    display: block;
    margin: 0.4rem 0;
  }
}

.highlight-category {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-red) 0%, #D64A5A 100%);
  color: #FFFFFF;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 1rem;
  margin: 2rem 0 0.5rem;
  box-shadow: 0 3px 10px rgba(196, 77, 88, 0.25);
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.highlight-category::before {
  display: none !important;
}

.highlight-category span {
  display: inline !important;
}

.highlight-category + blockquote {
  border-left: 4px solid var(--accent-red) !important;
  background: linear-gradient(90deg, rgba(196, 77, 88, 0.05) 0%, var(--bg-surface) 100%) !important;
  margin-top: 0.5rem !important;
}

@media print {
  body::before {
    display: none;
  }
}
