:root {
  --bg: #07090d;
  --panel: #11151d;
  --panel-2: #161c27;
  --line: rgba(133, 226, 255, .16);
  --text: #eef6f8;
  --muted: #92a5ae;
  --cyan: #00e5ff;
  --green: #76ff8a;
  --gold: #f5c66b;
  --rose: #ff5f8f;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 10%, rgba(0, 229, 255, .12), transparent 30rem),
    radial-gradient(circle at 82% 2%, rgba(118, 255, 138, .08), transparent 26rem),
    linear-gradient(180deg, #07090d 0%, #0c0f15 45%, #080a0e 100%);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease, opacity .2s ease;
}

a:hover {
  color: var(--green);
}

img,
video,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

input,
textarea,
button {
  font: inherit;
}

.container {
  width: calc(100% - 40px);
  max-width: 1180px;
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #05080c;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(230px, 320px);
  gap: 14px 26px;
  align-items: center;
  padding: 10px 0;
}

.brand {
  min-width: 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  line-height: 1;
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.logo img {
  display: block;
  width: 290px;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: brightness(1.04) contrast(1.06) drop-shadow(0 0 6px rgba(0, 229, 255, .22));
}

.site-search {
  display: flex;
  align-items: stretch;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  overflow: hidden;
}

.site-search input,
.error-page input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 11px 14px;
}

.site-search input::placeholder,
.error-page input::placeholder {
  color: #6f828c;
}

.site-search button,
.error-page button,
.btn {
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
}

.site-search button {
  margin: 4px;
  width: 74px;
  min-width: 74px;
  padding: 0 14px;
  color: #061014;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  white-space: nowrap;
}

.nav-menu {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.nav-menu a:hover,
.nav-menu .current {
  border-color: var(--line);
  color: var(--green);
  background: rgba(0, 229, 255, .07);
}

.site-main {
  min-height: 60vh;
}

.hero {
  min-height: 68vh;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 229, 255, .09) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 229, 255, .07) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .75), transparent 88%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  padding: 70px 0 80px;
}

.hero-kicker,
.section-heading p,
.archive-head p,
.error-page p {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 1050px;
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.12;
  overflow-wrap: anywhere;
  text-shadow: 0 0 30px rgba(0, 229, 255, .34);
}

.hero-text {
  max-width: 760px;
  margin: 22px 0 0;
  color: #bfccd2;
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
}

.btn-primary {
  color: #061014;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 12px 28px rgba(0, 229, 255, .18);
}

.btn-primary:hover {
  color: #061014;
  opacity: .9;
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, .04);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 38px;
}

.hero-stats span {
  min-width: 150px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 21, 29, .76);
  color: var(--muted);
}

.hero-stats strong {
  display: block;
  color: var(--green);
  font-size: 22px;
  line-height: 1.2;
}

.section {
  padding: 48px 0;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 30px;
  align-items: start;
}

.home-layout {
  grid-template-columns: 1fr;
}

.section-heading {
  margin-bottom: 22px;
  text-align: center;
}

.section-heading.align-left {
  text-align: left;
}

.section-heading h1,
.section-heading h2,
.archive-head h1,
.error-page h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
}

.archive-head {
  margin-bottom: 24px;
}

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

.home-layout .post-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}

.post-card,
.post-detail,
.widget,
.empty-state,
.error-page {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(22, 28, 39, .94), rgba(13, 17, 24, .94));
  box-shadow: var(--shadow);
}

.post-card {
  position: relative;
  min-height: 230px;
  padding: 22px;
  overflow: hidden;
}

.post-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--green), var(--rose));
  opacity: .72;
}

.home-layout .post-card {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 24px;
  align-items: center;
  padding: 22px 24px;
}

.home-layout .post-title,
.home-layout .post-meta,
.home-layout .post-summary {
  grid-column: 1;
}

.home-layout .post-title {
  margin-bottom: 6px;
  font-size: 23px;
}

.home-layout .post-meta {
  margin-bottom: 4px;
}

.home-layout .post-summary {
  max-width: 880px;
}

.home-layout .card-foot {
  grid-column: 2;
  grid-row: 1 / span 3;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  margin-top: 0;
  text-align: right;
  white-space: nowrap;
}

.post-title {
  margin: 0 0 12px;
  font-size: 21px;
  line-height: 1.35;
}

.post-title a {
  color: var(--text);
}

.post-title a:hover {
  color: var(--cyan);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
}

.post-meta a {
  color: #b7f6ff;
}

.post-summary {
  color: #b9c7cd;
  font-size: 14px;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.post-detail,
.empty-state {
  padding: 30px;
}

.post-detail .post-title {
  font-size: 34px;
}

.post-content {
  color: #dce8ec;
  word-wrap: break-word;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  margin-top: 1.6em;
  color: var(--text);
  line-height: 1.35;
}

.post-content p {
  margin: 1em 0;
}

.post-content a {
  border-bottom: 1px solid rgba(0, 229, 255, .35);
}

.post-content blockquote {
  margin: 1.4em 0;
  padding: 12px 18px;
  border-left: 4px solid var(--cyan);
  background: rgba(0, 229, 255, .06);
  color: #c9d7dc;
}

.post-content pre,
.post-content code {
  font-family: Consolas, Monaco, "Courier New", monospace;
}

.post-content pre {
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #06080c;
}

.post-content code {
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(0, 229, 255, .1);
  color: #aef8ff;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
}

.post-content th,
.post-content td {
  padding: 10px 12px;
  border: 1px solid var(--line);
}

.post-content th {
  color: var(--green);
  background: rgba(255, 255, 255, .04);
}

.post-content img {
  border-radius: 8px;
}

.post-bottom {
  display: flex;
  justify-content: flex-start;
  margin-top: 28px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.post-tags span {
  color: var(--muted);
  font-size: 13px;
}

.post-tags a,
.post-tags em {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid rgba(118, 255, 138, .28);
  border-radius: 999px;
  color: var(--green);
  background: rgba(118, 255, 138, .08);
  font-size: 13px;
  font-style: normal;
}

.post-near {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.post-near div {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 21, 29, .86);
}

.post-near span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.embed-section {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(0, 229, 255, .04), rgba(255, 255, 255, .015)),
    #080b10;
}

.embed-frame-wrap {
  width: 100%;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #05070a;
  box-shadow: var(--shadow);
}

.embed-frame {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: #0b0f14;
}

.sidebar {
  position: sticky;
  top: 138px;
}

.widget {
  padding: 20px;
  margin-bottom: 18px;
}

.widget-title {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 18px;
}

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

.widget-list li {
  padding: 9px 0;
  border-top: 1px solid rgba(133, 226, 255, .1);
}

.widget-list li:first-child {
  border-top: 0;
}

.widget-list ul {
  margin: 8px 0 0 14px;
  padding: 0;
}

.page-navigator {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.page-navigator a,
.page-navigator span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 21, 29, .82);
}

.page-navigator .current a {
  color: #061014;
  background: linear-gradient(135deg, var(--cyan), var(--green));
}

.error-page {
  max-width: 720px;
  margin: 40px auto;
  padding: 36px;
  text-align: center;
}

.error-page form {
  display: flex;
  max-width: 520px;
  margin: 24px auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, .04);
}

.error-page button {
  padding: 0 18px;
  color: #061014;
  background: linear-gradient(135deg, var(--cyan), var(--green));
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #080b10;
}

.footer-inner {
  padding: 30px 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.footer-inner p {
  margin: 6px 0;
}

.footer-custom :first-child {
  margin-top: 0;
}

.footer-custom :last-child {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .header-inner,
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .home-layout .post-card {
    grid-template-columns: 1fr;
  }

  .home-layout .card-foot {
    grid-column: 1;
    grid-row: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    text-align: left;
    white-space: normal;
  }
}

@media (max-width: 720px) {
  .container {
    width: calc(100% - 24px);
    max-width: 1180px;
  }

  .header-inner {
    padding: 10px 0;
  }

  .logo img {
    width: 230px;
  }

  .site-search {
    order: 3;
    width: 100%;
  }

  .nav-menu {
    gap: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .nav-menu a {
    flex: 0 0 auto;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding: 50px 0 56px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero-text {
    font-size: 16px;
  }

  .hero-stats span {
    width: 100%;
  }

  .section {
    padding: 34px 0;
  }

  .post-detail,
  .post-card,
  .empty-state,
  .widget,
  .error-page {
    padding: 18px;
  }

  .post-detail .post-title {
    font-size: 28px;
  }

  .post-near {
    grid-template-columns: 1fr;
  }

  .error-page form {
    flex-direction: column;
  }

  .error-page button {
    min-height: 42px;
  }
}
