/*
Theme Name: DevPress CN
Theme URI: https://example.com/devpress-cn
Author: Arena.ai
Author URI: https://example.com
Description: 一个适合编程技术博客的 WordPress 主题，简洁、响应式，支持代码高亮风格展示。
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: devpress-cn
*/

:root {
  --bg: #0b1020;
  --panel: #121a2b;
  --panel-soft: #182238;
  --text: #e6edf3;
  --muted: #94a3b8;
  --line: #243041;
  --brand: #38bdf8;
  --brand-2: #22c55e;
  --white: #ffffff;
  --danger: #ef4444;
  --shadow: 0 10px 30px rgba(0,0,0,0.25);
  --radius: 16px;
  --radius-sm: 10px;
  --content-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #0b1020 0%, #0f172a 100%);
  color: var(--text);
  line-height: 1.75;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  opacity: 0.9;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

pre,
code,
kbd,
samp {
  font-family: "Fira Code", "JetBrains Mono", Consolas, Monaco, monospace;
}

pre {
  background: #0a0f1c;
  color: #dbeafe;
  border: 1px solid #23304a;
  border-radius: 14px;
  padding: 18px;
  overflow-x: auto;
}

code {
  background: rgba(56, 189, 248, 0.12);
  padding: 0.15em 0.45em;
  border-radius: 8px;
}

pre code {
  background: transparent;
  padding: 0;
}

.container {
  width: min(var(--content-width), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 99;
  backdrop-filter: blur(14px);
  background: rgba(11, 16, 32, 0.8);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.site-title a {
  color: var(--white);
}

.site-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  color: #dbeafe;
  font-weight: 600;
}

.hero {
  padding: 72px 0 34px;
}

.hero-box {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(34, 197, 94, 0.12));
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 42px;
}

.hero-box h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.15;
}

.hero-box p {
  margin: 0 0 20px;
  color: #d7e2ee;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #08111f;
  cursor: pointer;
}

.button-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 24px 0 64px;
}

.content-area,
.widget-area,
.post-card,
.single-post,
.page-card,
.archive-header,
.not-found,
.comment-respond,
.comments-area {
  background: rgba(18, 26, 43, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.posts-grid {
  display: grid;
  gap: 24px;
}

.post-card {
  overflow: hidden;
}

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

.post-card .entry-title,
.single-post .entry-title,
.page-card .entry-title {
  margin: 0 0 14px;
  line-height: 1.3;
}

.entry-title a {
  color: var(--white);
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.entry-summary,
.entry-content {
  color: #d6deea;
}

.tax-list,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tax-list a,
.tag-list a,
.widget_tag_cloud a,
.post-categories a {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  color: #bfe9ff;
  font-size: 0.88rem;
}

.single-post,
.page-card,
.archive-header,
.not-found,
.comments-area,
.comment-respond {
  padding: 28px;
}

.post-thumbnail img {
  width: 100%;
  display: block;
  border-radius: 0;
}

.widget-area {
  padding: 24px;
  align-self: start;
  position: sticky;
  top: 92px;
}

.widget {
  margin-bottom: 26px;
}

.widget:last-child {
  margin-bottom: 0;
}

.widget-title {
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget li {
  padding: 8px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.16);
}

.widget li:last-child {
  border-bottom: 0;
}

.search-form {
  display: flex;
  gap: 10px;
}

.search-field,
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
  width: 100%;
  background: #0a1323;
  border: 1px solid #23304a;
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
}

textarea {
  min-height: 140px;
}

.pagination,
.posts-navigation,
.post-navigation {
  margin-top: 24px;
}

.nav-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.page-numbers,
.nav-links a,
.nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 10px 14px;
  background: rgba(18, 26, 43, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  color: var(--text);
}

.page-numbers.current {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #07111f;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 28px 0 40px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment-list li {
  padding: 16px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.comment-author {
  font-weight: 700;
}

blockquote {
  margin: 24px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--brand);
  background: rgba(56, 189, 248, 0.08);
  border-radius: 0 12px 12px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
}

table th,
table td {
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.archive-title,
.page-title {
  margin: 0 0 10px;
}

.screen-reader-text {
  position: absolute;
  left: -9999px;
}

@media (max-width: 960px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .widget-area {
    position: static;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-navigation ul {
    flex-wrap: wrap;
  }

  .hero-box {
    padding: 28px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--content-width), calc(100% - 20px));
  }

  .hero {
    padding-top: 40px;
  }

  .single-post,
  .page-card,
  .archive-header,
  .not-found,
  .comments-area,
  .comment-respond,
  .widget-area,
  .post-card-content {
    padding: 20px;
  }
}


.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #dbeafe;
  margin-bottom: 18px;
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.stat-card,
.feature-card,
.post-outline-card,
.author-box,
.related-posts,
.related-card {
  background: rgba(9, 14, 28, 0.48);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
}

.stat-card {
  padding: 18px 20px;
}

.stat-card strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 4px;
}

.stat-card span {
  color: var(--muted);
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 10px;
}

.feature-card {
  padding: 24px;
}

.feature-card h3 {
  margin: 0 0 10px;
}

.feature-card p {
  margin: 0;
  color: #cad7e4;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(56,189,248,0.22), rgba(34,197,94,0.2));
  margin-bottom: 16px;
  font-size: 1.2rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 30px auto 0;
}

.section-heading h2 {
  margin: 6px 0;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.section-kicker {
  display: inline-block;
  color: var(--brand);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.post-card {
  position: relative;
}

.post-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #07111f;
  font-size: 0.84rem;
  font-weight: 800;
}

.entry-meta-pills span {
  padding: 6px 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.read-more-link {
  color: #dff6ff;
  font-weight: 700;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs a {
  color: #c8e8ff;
}

.breadcrumbs .sep {
  opacity: 0.5;
}

.single .content-area,
.page .content-area {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.single-entry-header {
  margin-bottom: 8px;
}

.single-cover {
  margin: 22px 0 0;
  overflow: hidden;
  border-radius: 18px;
}

.post-outline-card {
  margin: 26px 0;
  padding: 22px;
}

.outline-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.outline-card-head h2 {
  margin: 0;
  font-size: 1.08rem;
}

.outline-card-head span {
  color: var(--muted);
  font-size: 0.9rem;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.toc-item a {
  display: block;
  color: #cdd8e6;
  padding: 8px 10px;
  border-radius: 10px;
  transition: 0.2s ease;
}

.toc-item a:hover,
.toc-item a.is-active {
  background: rgba(56, 189, 248, 0.12);
  color: #e9f9ff;
}

.toc-item.depth-h3 a {
  padding-left: 24px;
}

.toc-item.depth-h4 a {
  padding-left: 38px;
}

.toc-empty {
  margin: 0;
  color: var(--muted);
}

.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
  scroll-margin-top: 100px;
}

.single-post .entry-content h2 {
  margin-top: 2.2em;
  margin-bottom: 0.8em;
  font-size: 1.7rem;
}

.single-post .entry-content h3 {
  margin-top: 1.8em;
  margin-bottom: 0.7em;
  font-size: 1.35rem;
}

.single-post .entry-content h4 {
  margin-top: 1.5em;
  margin-bottom: 0.6em;
  font-size: 1.15rem;
}

.single-post-footer {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.meta-block + .meta-block {
  margin-top: 18px;
}

.author-box {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 24px;
  margin-top: 28px;
}

.author-avatar img {
  border-radius: 50%;
}

.author-label {
  color: var(--brand);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.84rem;
}

.author-content h3 {
  margin: 8px 0 10px;
}

.author-content p {
  margin: 0 0 14px;
  color: #d1deea;
}

.related-posts {
  padding: 24px;
  margin-top: 24px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.related-card {
  padding: 20px;
}

.related-card h3 {
  margin: 0 0 10px;
  line-height: 1.45;
}

.related-card p {
  color: #cfdae7;
  margin: 0 0 12px;
}

.code-toolbar {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #23304a;
  background: #0a0f1c;
  margin: 22px 0;
}

.code-toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.code-lang-label {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: #bfe9ff;
  font-size: 0.82rem;
  font-weight: 800;
}

.code-copy-btn {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255,255,255,0.04);
  color: #dbeafe;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
}

.code-toolbar pre {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.code-toolbar code {
  background: transparent;
}

@media (max-width: 960px) {
  .feature-strip,
  .hero-stats,
  .related-posts-grid {
    grid-template-columns: 1fr;
  }

  .author-box {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .outline-card-head,
  .post-card-footer,
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-badge {
    font-size: 0.82rem;
  }

  .stat-card strong {
    font-size: 1.45rem;
  }
}
