/* CocoDuck Cloud 技术博客 (cocoduck.blog) Tech Pulse Neon Magenta & Deep Electric Violet Theme */
:root {
  --bg-dark: #080310;
  --bg-surface: #140924;
  --bg-card: rgba(32, 16, 58, 0.85);
  --bg-card-hover: rgba(48, 24, 88, 0.95);
  --border: rgba(236, 72, 153, 0.22);
  --border-glow: rgba(236, 72, 153, 0.55);
  --primary: #EC4899;
  --primary-glow: #F472B6;
  --primary-gradient: linear-gradient(135deg, #F472B6 0%, #EC4899 50%, #A855F7 100%);
  --secondary: #A855F7;
  --accent-purple: #8B5CF6;
  --text-main: #FDF4FF;
  --text-muted: #E9D5FF;
  --text-sub: #D8B4FE;
  --text-dim: #9E82B8;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --max-width: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 18% 22%, rgba(236, 72, 153, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 82% 78%, rgba(168, 85, 247, 0.12) 0%, transparent 45%);
  color: var(--text-muted);
  font-family: var(--font-family);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* Navbar */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: rgba(8, 3, 16, 0.88);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #FFF; font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.brand img { width: 36px; height: 36px; display: block; border-radius: 8px; filter: drop-shadow(0 2px 8px rgba(236, 72, 153, 0.4)); }
.brand span { background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-menu { display: flex; align-items: center; gap: 24px; list-style: none; }
.nav-link { color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 600; transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--primary-glow); }
.nav-cta {
  background: var(--primary-gradient); color: #FFF !important; font-weight: 800;
  padding: 8px 20px; border-radius: 8px; text-decoration: none; font-size: 13px;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35); transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5); }

/* Blog Hero */
.blog-hero { padding: 70px 0 40px; text-align: center; }
.blog-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 999px;
  background: rgba(236, 72, 153, 0.12); border: 1px solid var(--border);
  color: var(--primary-glow); font-size: 13px; font-weight: 700; margin-bottom: 24px;
}
.blog-hero h1 { font-size: 44px; font-weight: 900; letter-spacing: -1px; line-height: 1.25; margin-bottom: 18px; color: #FFF; }
.blog-hero h1 span { background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.blog-desc { font-size: 17px; color: var(--text-muted); max-width: 800px; margin: 0 auto 32px; line-height: 1.8; }

/* Featured Post Card */
.featured-card {
  background: linear-gradient(135deg, rgba(32, 16, 58, 0.9), rgba(48, 24, 88, 0.9));
  border: 1px solid var(--border-glow); border-radius: 18px; padding: 36px;
  margin-bottom: 50px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: center;
}
.featured-tag { display: inline-block; font-size: 12px; font-weight: 800; color: var(--primary-glow); padding: 4px 10px; border-radius: 6px; background: rgba(236, 72, 153, 0.15); margin-bottom: 12px; text-transform: uppercase; }
.featured-title { font-size: 26px; font-weight: 900; color: #FFF; margin-bottom: 14px; line-height: 1.35; }
.featured-desc { font-size: 15px; color: var(--text-muted); line-height: 1.7; margin-bottom: 20px; }
.featured-meta { font-size: 13px; color: var(--text-dim); display: flex; gap: 16px; align-items: center; }
.btn-read {
  background: var(--primary-gradient); color: #FFF; font-weight: 800; font-size: 14px;
  padding: 10px 22px; border-radius: 8px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  transition: transform 0.2s; box-shadow: 0 4px 14px rgba(236, 72, 153, 0.3);
}
.btn-read:hover { transform: translateY(-2px); }

/* Grid of Articles */
.section { padding: 40px 0; }
.section-head { margin-bottom: 32px; }
.section-tag { font-size: 12px; font-weight: 800; color: var(--primary); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 8px; }
.section-title { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; color: #FFF; }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  padding: 24px; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; color: inherit;
}
.post-card:hover { transform: translateY(-4px); border-color: var(--border-glow); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.post-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px; background: rgba(168, 85, 247, 0.2); color: var(--text-sub); margin-bottom: 12px; }
.post-card h3 { font-size: 18px; font-weight: 700; color: #FFF; margin-bottom: 10px; line-height: 1.4; }
.post-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 18px; flex-grow: 1; }
.post-footer { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-dim); border-top: 1px solid rgba(255, 255, 255, 0.06); padding-top: 12px; }
.post-link { color: var(--primary-glow); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }

/* Article Detail */
.article-wrap { max-width: 860px; margin: 0 auto; padding: 40px 24px 80px; }
.breadcrumb { font-size: 13px; color: var(--text-dim); margin-bottom: 24px; display: flex; gap: 8px; align-items: center; }
.breadcrumb a { color: var(--primary-glow); text-decoration: none; }
.article-header { border-bottom: 1px solid var(--border); padding-bottom: 24px; margin-bottom: 32px; }
.article-title { font-size: 32px; font-weight: 900; line-height: 1.3; color: #FFF; }
.article-meta { display: flex; gap: 16px; font-size: 13px; color: var(--text-dim); margin-top: 12px; }
.article-body { font-size: 16px; line-height: 1.85; color: var(--text-muted); }
.article-body h2 { font-size: 22px; font-weight: 800; color: #FFF; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.article-body h3 { font-size: 18px; font-weight: 700; color: var(--primary-glow); margin: 24px 0 12px; }
.article-body p { margin-bottom: 20px; }
.article-body ul, .article-body ol { margin: 0 0 20px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body pre { background: #040108; border: 1px solid var(--border); border-radius: 8px; padding: 16px; overflow-x: auto; font-family: Consolas, monospace; font-size: 13px; color: #E9D5FF; margin: 20px 0; }
.article-body code { font-family: Consolas, monospace; background: rgba(236, 72, 153, 0.15); color: var(--primary-glow); padding: 2px 6px; border-radius: 4px; font-size: 14px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; }
.article-body th, .article-body td { border: 1px solid var(--border); padding: 12px 16px; text-align: left; }
.article-body th { background: rgba(236, 72, 153, 0.15); color: #FFF; font-weight: 700; }
.article-body tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }

/* Action Box */
.blog-cta-box {
  background: linear-gradient(135deg, rgba(32, 16, 58, 0.95), rgba(48, 24, 88, 0.95));
  border: 1px solid var(--border-glow); border-radius: 12px; padding: 24px; margin: 36px 0; text-align: center;
}
.blog-cta-box h4 { font-size: 18px; font-weight: 800; color: #FFF; margin-bottom: 8px; }
.blog-cta-box p { font-size: 14px; color: var(--text-dim); margin-bottom: 18px; }

/* Footer */
footer {
  background: #040108; border-top: 1px solid var(--border);
  padding: 60px 0 30px; margin-top: 60px; font-size: 14px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-about h4 { font-size: 18px; font-weight: 800; color: #FFF; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.footer-about p { color: var(--text-dim); line-height: 1.7; font-size: 13px; }
.footer-col h5 { font-size: 14px; font-weight: 700; color: #FFF; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 13px; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary-glow); }

.friendly-links-section {
  padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.08); margin-bottom: 24px;
}
.friendly-links-section h5 { font-size: 13px; font-weight: 700; color: var(--text-dim); margin-bottom: 12px; }
.links-flex { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.06); padding-top: 24px; text-align: center; color: var(--text-dim); font-size: 12px; }

@media (max-width: 900px) {
  .blog-grid { grid-template-columns: 1fr; }
  .featured-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .nav-menu { display: none; }
}
