:root {
  --bg: #0f1115;
  --bg-soft: #161a22;
  --card: #1b2029;
  --card-hover: #222836;
  --border: #2a3140;
  --text: #e6e9ef;
  --text-dim: #9aa3b2;
  --accent: #5b9cff;
  --accent-soft: rgba(91, 156, 255, 0.12);
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ===== Hero 16:9 ===== */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 70vh;
  overflow: hidden;
  background: linear-gradient(135deg, #1a2130 0%, #0f1115 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity .6s ease, transform .8s ease;
  transform: scale(1.02);
}
.hero:hover .hero-bg { transform: scale(1.05); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,17,21,.94) 0%, rgba(15,17,21,.55) 40%, rgba(15,17,21,.25) 100%);
}
.hero-content {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0 32px 44px;
  max-width: 1180px;
  margin: 0 auto;
}
.hero-content h1 {
  font-size: clamp(26px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  text-shadow: 0 2px 20px rgba(0,0,0,.6);
}
.hero-content p {
  font-size: clamp(14px, 2.2vw, 19px);
  color: #c8d0dd;
  text-shadow: 0 1px 12px rgba(0,0,0,.6);
}
.hero-btn {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  transition: transform .2s, box-shadow .2s;
}
.hero-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(91,156,255,.4); }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,17,21,.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { font-weight: 700; font-size: 16px; color: var(--accent); }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-link {
  padding: 7px 15px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-dim);
  transition: all .2s;
}
.nav-link:hover { color: var(--text); background: var(--bg-soft); }
.nav-link.active { color: var(--accent); background: var(--accent-soft); }
.nav-admin {
  margin-left: 8px;
  padding: 7px 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-dim);
}
.nav-admin:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Tagbar ===== */
.tagbar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-chip {
  padding: 5px 13px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all .2s;
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent); }
.tag-chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.tag-chip small { opacity: .55; margin-left: 3px; }

/* ===== Toolbar ===== */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 18px;
}
#totalInfo { font-size: 13px; color: var(--text-dim); }
#search {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 15px;
  color: var(--text);
  font-size: 14px;
  width: 260px;
  outline: none;
  transition: border-color .2s;
}
#search:focus { border-color: var(--accent); }

/* ===== Post List ===== */
.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding-bottom: 60px;
}
.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .22s, border-color .22s, box-shadow .22s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.post-cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--bg-soft);
}
.post-cover-wrap {
  position: relative;
  background: var(--bg-soft);
}
.post-kind-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 3px 10px;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .3px;
}
.post-kind-badge.article { background: rgba(91,156,255,.85); }
.post-kind-badge.image { background: rgba(80,200,140,.85); }
.post-kind-badge.video { background: rgba(230,90,120,.85); }
.post-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: rgba(255,255,255,.9);
  text-shadow: 0 2px 14px rgba(0,0,0,.6);
  pointer-events: none;
}
.post-info { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.post-title {
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 6px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-summary {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.post-meta {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}
.post-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 9px; }
.post-tag {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--bg-soft);
  border-radius: 5px;
  color: var(--text-dim);
}

/* ===== Empty ===== */
.empty { text-align: center; padding: 80px 20px; color: var(--text-dim); }
.empty p { font-size: 17px; margin-bottom: 8px; }
.empty a { color: var(--accent); }

/* ===== About ===== */
.about { padding: 50px 0; border-top: 1px solid var(--border); margin-top: 20px; }
.about h2 { font-size: 22px; margin-bottom: 16px; }
.about-body { color: var(--text-dim); font-size: 15px; white-space: pre-wrap; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); padding: 34px 0; text-align: center; }
.footer p { font-size: 13px; color: var(--text-dim); }
.footer-sub { margin-top: 6px; opacity: .55; font-size: 12px; }

/* ===== Modal ===== */
.modal { position: fixed; inset: 0; z-index: 1000; display: none; }
.modal.show { display: block; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(4px);
  animation: fade .2s;
}
.modal-box {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(900px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 34px 38px 40px;
  animation: pop .25s;
}
@keyframes fade { from { opacity: 0 } }
@keyframes pop { from { opacity: 0; transform: translate(-50%,-46%) scale(.97) } }
.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  width: 32px; height: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 15px;
  cursor: pointer;
  transition: all .2s;
}
.modal-close:hover { color: #fff; border-color: var(--accent); }
.modal-body h1 { font-size: 27px; margin-bottom: 14px; line-height: 1.35; }
.detail-meta { font-size: 13px; color: var(--text-dim); margin-bottom: 22px; }
.detail-content { font-size: 15.5px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; }
.detail-media { margin: 22px 0; display: grid; gap: 14px; }
.detail-media img, .detail-media video {
  width: 100%;
  border-radius: 12px;
  display: block;
  background: #000;
}
.detail-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 10px; }
.detail-gallery img { aspect-ratio: 1; object-fit: cover; cursor: pointer; transition: transform .2s; }
.detail-gallery img:hover { transform: scale(1.03); }

/* ===== Responsive ===== */
@media (max-width: 720px) {
  .hero-content { padding: 0 20px 26px; }
  .container, .nav-inner { padding: 0 16px; }
  .tagbar { padding: 14px 16px 0; }
  .post-list { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
  #search { width: 100%; }
  .modal-box { padding: 26px 20px 30px; }
  .nav-link { padding: 7px 11px; font-size: 13px; }
}
