/*
Theme Name: SeqNote
Theme URI: https://seq.ink
Author: Tabbit
Author URI: https://seq.ink
Description: 延时笔记专用深色主题 — GitHub Dark 风格，毛玻璃卡片，渐变强调色，三档响应式
Version: 1.0.3
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: MIT License
License URI: https://opensource.org/licenses/MIT
Text Domain: seqnote
Tags: dark, one-column, custom-menu, featured-images, translation-ready, blog
*/

/* ====== CSS 变量 ====== */
:root {
  --bg: #0d1117;
  --card-bg: rgba(22,27,34,.92);
  --card-hover: rgba(30,37,48,.96);
  --border: rgba(240,246,252,.08);
  --border-accent: rgba(139,92,246,.28);
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-tertiary: rgba(139,148,158,.45);
  --purple: #a78bfa;
  --purple-soft: rgba(139,92,246,.14);
  --blue: #58a6ff;
  --pink: #f778ba;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --max-width: 1180px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 15% 0%, rgba(99,102,241,.07) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 100%, rgba(168,85,247,.05) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--blue); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--purple); }
img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }

::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,.18); }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,.52); }
::selection { background: rgba(139,92,246,.28); color: #fff; }

.skip-link { position: absolute; top: -100%; left: 16px; z-index: 9999;
  padding: 12px 20px; background: var(--purple); color: #fff; border-radius: var(--radius-sm);
  transition: top .2s; }
.skip-link:focus { top: 16px; }

.site-header {
  background: linear-gradient(180deg, rgba(22,27,34,.95), rgba(13,17,23,.92));
  border-bottom: 1px solid var(--border);
  padding: 44px 0 30px; position: relative;
}
.site-header::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,.35), rgba(88,166,255,.22), transparent);
}
.site-branding { text-align: center; padding: 0 20px; }
.site-title { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em;
  line-height: 1.2; margin-bottom: 8px; }
.site-title a {
  background: linear-gradient(135deg, #f778ba, #a78bfa, #79c0ff);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.site-description { color: var(--text-tertiary); font-size: .9rem; }

.main-navigation {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid rgba(240,246,252,.05);
}
.main-navigation ul {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 5px; list-style: none; margin: 0; padding: 0;
}
.main-navigation li { margin: 0; position: relative; }
.main-navigation a {
  display: inline-flex; align-items: center;
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 500; color: #b4bac2;
  transition: all .22s ease; white-space: nowrap;
}
.main-navigation a:hover { background: var(--purple-soft); color: var(--purple); }
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  background: rgba(139,92,246,.18); color: #d2a8ff;
}
.main-navigation ul ul {
  background: rgba(13,17,23,.97); backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.5);
  position: absolute; z-index: 99999; min-width: auto; white-space: nowrap;
  left: 50%; transform: translateX(-50%); top: 100%;
  margin-top: 4px; display: none;
}
.main-navigation ul ul li a { padding: 8px 16px; font-size: .82rem; border-radius: 6px; display: block; }
.main-navigation li:hover > ul { display: block; }

.site-content {
  display: flex; flex-direction: row; gap: 36px;
  max-width: var(--max-width); margin: 0 auto;
  padding: 40px 28px 72px;
}
.content-area { flex: 1; min-width: 0; }
.widget-area { width: 300px; flex-shrink: 0; position: sticky; top: 24px; align-self: flex-start; }
@media (max-width: 900px) {
  .site-content { flex-direction: column; gap: 28px; padding: 28px 20px 56px; }
  .widget-area { width: 100%; position: static; }
}
@media (max-width: 600px) { .site-content { padding: 20px 14px 48px; } }

.post-card, article.post {
  display: block; background: var(--card-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 32px; margin-bottom: 22px;
  transition: all .28s cubic-bezier(.4,0,.2,1);
  position: relative; overflow: hidden;
}
.post-card:hover, article.post:hover {
  border-color: var(--border-accent);
  box-shadow: 0 10px 36px rgba(139,92,246,.11), 0 3px 10px rgba(0,0,0,.22);
  transform: translateY(-3px); background: var(--card-hover);
}
.post-card::before, article.post::before {
  content: ''; position: absolute; top: 0; left: 28px; right: 28px; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(167,139,250,.42), rgba(88,166,255,.26), transparent);
  opacity: 0; transition: opacity .28s ease;
}
.post-card:hover::before, article.post:hover::before { opacity: 1; }

.entry-title { font-size: 1.5rem; font-weight: 700; line-height: 1.36; margin-bottom: 14px; }
.entry-title a { color: var(--text-primary); }
.entry-title a:hover { color: var(--purple); }

.entry-summary, .entry-content {
  color: var(--text-secondary); font-size: .93rem;
  line-height: 1.85; margin-bottom: 16px;
  word-wrap: break-word; overflow-wrap: break-word;
}

.entry-footer {
  display: flex; align-items: center; gap: 18px;
  flex-wrap: wrap; padding-top: 16px; margin-top: 14px;
  border-top: 1px solid var(--border); font-size: .82rem;
}
.entry-footer a { color: rgba(139,148,158,.85); font-size: .82rem; }
.entry-footer a:hover { color: var(--purple); }
.entry-footer .posted-on, .entry-footer time { white-space: nowrap; }

.cat-links a {
  background: rgba(56,139,253,.15); color: #79c0ff;
  padding: 3px 11px; border-radius: 999px;
  font-size: .76rem; font-weight: 500;
}
.cat-links a:hover { background: rgba(56,139,253,.27); color: #a5d6ff; }

.post-card, article.post { animation: fadeUp .5s ease both; }
.post-card:nth-child(1), article.post:nth-child(1) { animation-delay: 0s; }
.post-card:nth-child(2), article.post:nth-child(2) { animation-delay: .07s; }
.post-card:nth-child(3), article.post:nth-child(3) { animation-delay: .14s; }
.post-card:nth-child(4), article.post:nth-child(4) { animation-delay: .21s; }
.post-card:nth-child(5), article.post:nth-child(5) { animation-delay: .28s; }
@keyframes fadeUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }

.single .post { animation: fadeIn .4s ease both; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

.single .entry-content h2 { font-size: 1.65rem; font-weight: 700;
  margin: 36px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.single .entry-content h3 { font-size: 1.3rem; font-weight: 600;
  margin: 28px 0 12px; color: var(--purple); }
.single .entry-content p { margin-bottom: 16px; }

.single .entry-content table {
  width: 100%; border-collapse: collapse; font-size: .85rem;
  display: block; overflow-x: auto;
}
.single .entry-content th, .single .entry-content td {
  padding: 8px 12px; border: 1px solid rgba(240,246,252,.12);
  text-align: left; min-width: 60px; max-width: 280px; word-wrap: break-word;
}
.single .entry-content th { background: rgba(139,92,246,.08); color: #d8b4fe; font-weight: 600; }
.single .entry-content tr:hover { background: rgba(139,92,246,.05); }

.single .entry-content pre {
  background: rgba(0,0,0,.35); border: 1px solid rgba(240,246,252,.08);
  border-radius: var(--radius-sm); padding: 14px 16px;
  margin: 16px 0; overflow-x: auto; font-size: .84rem; line-height: 1.6;
}
.single .entry-content code {
  font-family: "SF Mono","Fira Code","Cascadia Code",Consolas,monospace;
  font-size: .83em; background: rgba(139,92,246,.1);
  color: #c4b5fd; padding: 2px 6px; border-radius: 4px;
}
.single .entry-content pre code { background: none; color: inherit; padding: 0; }

.single .entry-content blockquote {
  border-left: 3px solid var(--purple); padding: 12px 20px; margin: 16px 0;
  background: rgba(139,92,246,.04); color: var(--text-secondary); font-style: italic;
}

.widget {
  background: var(--card-bg); backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 20px; margin-bottom: 18px;
}
.widget-title {
  font-size: .95rem; font-weight: 700; color: var(--text-primary);
  margin: 0 0 14px; padding-bottom: 11px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.widget-title::before {
  content: ''; width: 3px; height: 15px;
  background: linear-gradient(180deg, #a78bfa, #58a6ff);
  border-radius: 2px; flex-shrink: 0;
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid rgba(240,246,252,.04); }
.widget li:last-child { border-bottom: none; }
.widget li a { color: var(--text-secondary); font-size: .86rem;
  display: block; transition: all .22s ease; }
.widget li a:hover { color: var(--purple); transform: translateX(3px); }
.widget li .post-date { font-size: .74rem; color: var(--text-tertiary); }

.widget input[type="search"], .widget input[type="text"] {
  width: 100%; background: rgba(0,0,0,.3);
  border: 1px solid rgba(240,246,252,.09); border-radius: var(--radius-sm);
  padding: 10px 13px; color: var(--text-primary); font-size: .86rem;
  outline: none; transition: all .22s ease;
}
.widget input[type="search"]:focus {
  border-color: rgba(139,92,246,.42);
  box-shadow: 0 0 0 3px rgba(139,92,246,.11);
}
.widget .search-submit {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 8px 16px; cursor: pointer; font-weight: 600;
  font-size: .82rem; margin-top: 10px;
}
.widget_text p {
  color: var(--text-secondary); font-style: italic;
  font-size: .86rem; line-height: 1.72;
  padding-left: 13px; border-left: 2px solid rgba(139,92,246,.26);
}

.comments-area {
  background: var(--card-bg); backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 32px; margin-top: 28px;
}
.comments-title {
  font-size: 1.35rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list > li {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(240,246,252,.06);
  border-radius: var(--radius-md); padding: 18px 20px;
  margin-bottom: 14px; transition: all .2s ease;
}
.comment-list > li:hover { border-color: rgba(139,92,246,.2); background: rgba(139,92,246,.04); }
.fn, .comment-author a { color: var(--purple); font-weight: 600; }
.comment-metadata, .comment-metadata a { color: var(--text-tertiary); font-size: .78rem; }
.comment-content p { color: var(--text-secondary); font-size: .89rem; line-height: 1.7; margin-top: 8px; }

.comment-form textarea, .comment-form input[type="text"],
.comment-form input[type="email"], .comment-form input[type="url"] {
  width: 100%; max-width: 100%;
  background: rgba(0,0,0,.28); border: 1px solid rgba(240,246,252,.09);
  border-radius: var(--radius-sm); padding: 10px 14px;
  color: var(--text-primary); font-size: .87rem;
  outline: none; resize: vertical; transition: all .22s ease;
}
.comment-form textarea:focus, .comment-form input:focus {
  border-color: rgba(139,92,246,.42);
  box-shadow: 0 0 0 3px rgba(139,92,246,.11);
}
.form-submit button, #submit {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 10px 24px; cursor: pointer; font-weight: 600;
  font-size: .88rem; margin-top: 10px; transition: all .22s ease;
}
.form-submit button:hover, #submit:hover {
  transform: translateY(-1px); box-shadow: 0 4px 15px rgba(139,92,246,.3);
}

.pagination, .nav-links {
  display: flex; justify-content: center; gap: 8px;
  margin: 32px 0; flex-wrap: wrap;
}
.pagination a, .nav-links a, .nav-links .current, .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: .86rem; transition: all .2s ease;
}
.pagination a:hover, .nav-links a:hover {
  border-color: var(--purple); color: var(--purple); background: var(--purple-soft);
}
.nav-links .current, .page-numbers.current {
  background: rgba(139,92,246,.18); border-color: rgba(139,92,246,.35); color: #d2a8ff;
}

.site-footer {
  background: rgba(0,0,0,.26); border-top: 1px solid var(--border);
  padding: 32px 0; margin-top: 48px; text-align: center;
  color: var(--text-tertiary); font-size: .82rem;
}
.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--purple); }

.back-to-top {
  position: fixed; bottom: 28px; right: 28px; width: 42px; height: 42px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff; border: none; border-radius: 50%; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all .3s ease; z-index: 999;
  box-shadow: 0 4px 15px rgba(139,92,246,.3);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(139,92,246,.4); }

.error-404 { text-align: center; padding: 80px 20px; }
.error-404 h1 { font-size: 6rem; font-weight: 800;
  background: linear-gradient(135deg, #f778ba, #a78bfa, #79c0ff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 16px; }
.error-404 p { color: var(--text-secondary); font-size: 1.1rem; }

@media (max-width: 900px) {
  .site-header { padding: 36px 0 24px; }
  .site-title { font-size: 1.9rem; }
  .post-card, article.post { padding: 24px; }
  .entry-title { font-size: 1.3rem; }
  .main-navigation a { padding: 7px 14px; font-size: .84rem; }
  .single .entry-content table { font-size: .78rem; }
  .comments-area { padding: 20px 18px; }
}
@media (max-width: 768px) {
  .site-header { padding: 28px 0 20px; }
  .site-title { font-size: 1.65rem; }
  .post-card, article.post { padding: 20px 18px; border-radius: var(--radius-md); }
  .entry-title { font-size: 1.2rem; }
  .main-navigation ul { justify-content: center; }
  .main-navigation a { padding: 6px 12px; font-size: .81rem; }
  .comments-area { padding: 18px 16px; }
}
@media (max-width: 480px) {
  .site-title { font-size: 1.42rem; }
  .site-description { font-size: .82rem; }
  .post-card, article.post { padding: 17px 15px; border-radius: var(--radius-md); }
  .entry-title { font-size: 1.1rem; }
  .main-navigation ul { gap: 2px; justify-content: center; }
  .main-navigation a { padding: 5px 10px; font-size: .77rem; }
  .site-content { padding: 16px 12px 40px; }
  .entry-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .single .entry-content table { font-size: .72rem; }
  .single .entry-content th, .single .entry-content td { padding: 5px 6px; min-width: 36px; max-width: 120px; }
  .comments-area { padding: 16px 14px; }
  .back-to-top { bottom: 16px; right: 16px; width: 38px; height: 38px; }
}
