:root {
  --accent-color: #10b981;
  --bg-dark: #0f172a;
  --card-bg: rgba(30, 41, 59, 0.7);
  --card-border: rgba(255, 255, 255, 0.05);
  --text-main: #f8fafc;
  --text-dim: #94a3b8;
  --tag-bg: rgba(16, 185, 129, 0.1);
  --tag-color: #10b981;
}

.light-theme {
  --bg-dark: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-border: rgba(0, 0, 0, 0.05);
  --text-main: #1e293b;
  --text-dim: #64748b;
  --tag-bg: rgba(16, 185, 129, 0.1);
  --tag-color: #059669;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.post-page-main {
  margin-top: 100px;
  padding: 0 20px 80px;
  max-width: 1400px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.post-header {
  text-align: left;
  margin-bottom: 40px;
}

.post-category {
  font-size: 16px;
  color: var(--text-dim);
}

.post-category::before {
  content: '📂';
  font-size: 14px;
  margin-right: 6px;
  flex-shrink: 0;
}

.post-title {
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.25;
  color: var(--text-main);
}

.post-meta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 16px;
  color: var(--text-dim);
  margin-top: 16px;
}

.post-meta > * {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-meta > *:not(:last-child)::after {
  content: '·';
  color: var(--text-dim);
  opacity: 0.4;
  margin-left: 20px;
  font-size: 18px;
  font-weight: 300;
}

.post-date::before {
  content: '📅';
  font-size: 14px;
}

.post-read-time::before {
  content: '⏱';
  font-size: 14px;
}

.post-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 32px 48px;
  border-radius: 16px;
}

.post-content h2 {
  font-size: 24px;
  font-weight: 800;
  margin-top: 32px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--tag-bg);
}

.post-content h2:first-child {
  margin-top: 0;
}

.post-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 12px;
}

.post-content p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.post-content code {
  background: transparent;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'Fira Code', 'Monaco', monospace;
  font-size: 14px;
  color: var(--text-main);
}

.post-content pre {
  background: transparent;
  border-radius: 12px;
  padding: 20px;
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--card-border);
}

.post-content pre code {
  background: transparent;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-main);
}

.post-content ul,
.post-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.post-content li {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.post-content strong {
  color: var(--text-main);
  font-weight: 600;
}

.post-content a {
  color: var(--accent-color);
  text-decoration: none;
}

.post-content a:hover {
  text-decoration: underline;
}

.table-container {
  overflow-x: auto;
  margin: 16px 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  overflow: hidden;
}

.post-content th,
.post-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border);
  text-align: left;
  font-size: 15px;
}

.post-content th {
  background: rgba(16, 185, 129, 0.1);
  color: var(--text-main);
  font-weight: 600;
}

.post-content tr:last-child td {
  border-bottom: none;
}

.tip-box {
  background: rgba(16, 185, 129, 0.1);
  border-left: 4px solid var(--accent-color);
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  margin: 16px 0;
}

.tip-box p {
  margin: 0;
  font-size: 15px;
}

.light-theme .post-content table {
  background: rgba(0, 0, 0, 0.03);
}

.light-theme .tip-box {
  background: rgba(16, 185, 129, 0.08);
}

.danger-box {
  background: rgba(239, 68, 68, 0.1);
  border-left: 4px solid #ef4444;
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  margin: 16px 0;
}

.danger-box p {
  margin: 0;
  font-size: 15px;
  color: #fca5a5;
}

.light-theme .danger-box {
  background: rgba(239, 68, 68, 0.08);
}

.light-theme .danger-box p {
  color: #dc2626;
}

.tool-card {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  padding: 24px;
  margin: 20px 0;
  border: 1px solid var(--card-border);
}

.tool-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--tag-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.tool-info h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.tool-info p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-dim);
}

.tool-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.tool-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tool-feature {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

.light-theme .tool-card {
  background: rgba(0, 0, 0, 0.03);
}

.light-theme .tool-feature {
  background: rgba(0, 0, 0, 0.05);
}

.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-color);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: gap 0.2s;
}

.tool-link:hover {
  gap: 10px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--card-border);
}

.post-tag {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
}

.post-tag:hover {
  background: var(--tag-bg);
  color: var(--tag-color);
  border-color: var(--tag-color);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.back-link:hover {
  gap: 10px;
  color: var(--accent-color);
}

.light-theme .post-content code {
  background: transparent;
  color: var(--text-main);
}

.light-theme .post-content pre {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .post-content pre code {
  color: var(--text-main);
}

.light-theme .post-tag {
  background: rgba(0, 0, 0, 0.03);
}

@media (max-width: 900px) {
  .post-page-main {
    margin-top: 90px;
    padding: 0 16px 80px;
  }

  .post-content {
    padding: 28px 24px;
  }
}

@media (max-width: 640px) {
  .post-page-main {
    margin-top: 80px;
    padding: 0 12px 60px;
  }

  .post-content {
    padding: 20px 16px;
    border-radius: 12px;
  }

  .post-title {
    font-size: clamp(24px, 5vw, 36px);
  }

  .post-header {
    margin-bottom: 24px;
  }

  .post-content h2 {
    font-size: 20px;
  }

  .post-content h3 {
    font-size: 18px;
  }

  .post-content p,
  .post-content li {
    font-size: 14px;
  }

  .post-meta {
    font-size: 13px;
    gap: 16px;
  }

  .post-meta > *:not(:last-child)::after {
    margin-left: 12px;
  }
}