:root {
  --bg: #08090b;
  --bg-soft: #11141a;
  --panel: rgba(20, 23, 30, 0.86);
  --panel-strong: #171b23;
  --text: #f5f0e8;
  --muted: #b1a9a0;
  --red: #ef233c;
  --red-dark: #9d0208;
  --gold: #ffb703;
  --steel: #7b8794;
  --green: #2dd4bf;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 12%, rgba(239, 35, 60, 0.22), transparent 28rem),
    radial-gradient(circle at 88% 4%, rgba(255, 183, 3, 0.16), transparent 22rem),
    linear-gradient(135deg, #050506 0%, #10131a 48%, #050506 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent 88%);
}

body::after {
  content: "苏神领域";
  position: fixed;
  right: -7vw;
  top: 22vh;
  z-index: -2;
  color: rgba(255, 255, 255, 0.035);
  font-size: clamp(5rem, 15vw, 15rem);
  font-weight: 900;
  writing-mode: vertical-rl;
  letter-spacing: 0.1em;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 4.5rem);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid rgba(255, 183, 3, 0.55);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 0 28px rgba(239, 35, 60, 0.35);
  font-size: 1.45rem;
  font-weight: 900;
}

.brand strong,
.brand em {
  display: block;
  line-height: 1.05;
}

.brand strong {
  font-weight: 900;
  letter-spacing: 0.08em;
}

.brand em,
.eyebrow,
.section-title p,
.cta-box > p {
  color: var(--gold);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand em {
  margin-top: 0.2rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.nav a,
.nav-button {
  padding: 0.72rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.94rem;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav a:hover,
.nav-button:hover {
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.section-pad {
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 4.5rem);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  min-height: calc(100vh - 82px);
}

.eyebrow,
.section-title p,
.cta-box > p {
  margin: 0 0 0.8rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(4.4rem, 14vw, 12rem);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.08em;
  text-shadow: 6px 6px 0 rgba(239, 35, 60, 0.55), 12px 12px 0 rgba(255, 183, 3, 0.18);
}

.hero-subtitle {
  max-width: 44rem;
  color: #ddd5cd;
  font-size: clamp(1.08rem, 2vw, 1.42rem);
  line-height: 1.8;
}

.hero-actions,
.post-toolbar,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.btn,
.filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.95rem 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:hover,
.filter:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn.primary,
.filter.is-active {
  color: #fff;
  border-color: rgba(255, 183, 3, 0.45);
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 18px 42px rgba(239, 35, 60, 0.25);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.04);
}

.btn.danger {
  background: rgba(239, 35, 60, 0.16);
  border-color: rgba(239, 35, 60, 0.5);
}

.btn.compact {
  min-height: 2.7rem;
  padding: 0.65rem 1rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 2.2rem;
  max-width: 40rem;
}

.stats div,
.panel,
.post-card,
.gallery figure,
.cta-box {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.stats div {
  padding: 1rem;
  border-radius: var(--radius-md);
}

.stats strong {
  display: block;
  font-size: clamp(1.45rem, 4vw, 2.3rem);
  font-weight: 900;
  color: var(--gold);
}

.stats span,
.post-card time,
.article-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-card {
  position: relative;
  max-width: 30rem;
  margin-inline: auto;
  transform: rotate(1.5deg);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 1.2rem -1rem -1rem 1.4rem;
  z-index: -1;
  border-radius: var(--radius-xl);
  border: 2px solid rgba(255, 183, 3, 0.45);
  background: rgba(239, 35, 60, 0.12);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-xl);
  border: 2px solid rgba(255, 255, 255, 0.14);
  filter: contrast(1.08) saturate(1.05);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

.hero-badge {
  position: absolute;
  right: -0.6rem;
  bottom: 1.2rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 183, 3, 0.55);
  background: #11141a;
  box-shadow: 0 18px 44px rgba(0,0,0,0.36);
}

.hero-badge span,
.tag {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.hero-badge strong {
  color: var(--gold);
  font-size: 2rem;
  font-weight: 900;
}

.bolt {
  position: absolute;
  z-index: 2;
  width: 4.8rem;
  height: 1rem;
  background: var(--gold);
  clip-path: polygon(0 35%, 72% 35%, 72% 0, 100% 50%, 72% 100%, 72% 65%, 0 65%);
  filter: drop-shadow(0 0 18px rgba(255, 183, 3, 0.45));
}

.bolt-one {
  left: -1.8rem;
  top: 16%;
  transform: rotate(-22deg);
}

.bolt-two {
  right: -2.1rem;
  top: 42%;
  transform: rotate(18deg);
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.section-title h2,
.admin-card-title h2,
.preview-panel h2,
.login-form h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.6rem);
  font-weight: 900;
  line-height: 0.95;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

.panel {
  border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 3vw, 2rem);
}

.panel p,
.panel li,
.cta-box p {
  color: #ddd5cd;
  line-height: 1.8;
}

.creed-panel ul {
  padding-left: 1.2rem;
  margin-bottom: 0;
}

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

.post-card {
  position: relative;
  display: flex;
  min-height: 17rem;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.4rem;
  overflow: hidden;
  border-radius: var(--radius-lg);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.post-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.9;
  background:
    linear-gradient(140deg, rgba(239, 35, 60, 0.2), transparent 46%),
    linear-gradient(320deg, rgba(255, 183, 3, 0.14), transparent 40%);
}

.post-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 183, 3, 0.4);
}

.post-card.is-hidden {
  display: none;
}

.post-card h3 {
  margin: 0;
  font-size: 1.45rem;
}

.post-card p {
  color: var(--muted);
  line-height: 1.7;
}

.post-card a {
  margin-top: auto;
  color: var(--gold);
  font-weight: 800;
}

.post-card .tag {
  align-self: flex-start;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  color: #161006;
  background: var(--gold);
  font-weight: 900;
}

.skeleton {
  opacity: 0.75;
}

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

.gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.gallery img {
  width: 100%;
  height: 36rem;
  object-fit: cover;
}

.gallery figcaption {
  padding: 1rem 1.2rem 1.2rem;
  color: var(--muted);
}

.cta-box {
  max-width: 66rem;
  margin-inline: auto;
  padding: clamp(1.4rem, 4vw, 3rem);
  border-radius: var(--radius-xl);
  text-align: center;
}

.cta-box h2 {
  font-size: clamp(2.4rem, 7vw, 6rem);
  line-height: 0.9;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1rem, 4vw, 4.5rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

/* Article page */
.article-shell {
  max-width: 980px;
  margin-inline: auto;
}

.back-link {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--gold);
  font-weight: 900;
}

.article {
  padding: clamp(1.4rem, 4vw, 3rem);
}

.article-cover {
  width: 100%;
  max-height: 32rem;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  margin: 1rem 0 2rem;
}

.article-title {
  font-size: clamp(2.8rem, 8vw, 6rem);
  letter-spacing: -0.06em;
}

.article-content {
  color: #f0e7dd;
  font-size: 1.08rem;
  line-height: 1.95;
}

.article-content h2,
.article-content h3 {
  margin-top: 2rem;
  color: #fff;
}

.article-content p {
  color: #f0e7dd;
}

.article-content a {
  color: var(--gold);
  text-decoration: underline;
}

.article-content ul {
  padding-left: 1.4rem;
}

/* Admin */
.admin-main {
  display: grid;
  gap: 1rem;
}

.admin-title {
  font-size: clamp(3rem, 9vw, 8rem);
}

.status-line {
  display: inline-flex;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: var(--muted);
}

.status-line.ok {
  border-color: rgba(45, 212, 191, 0.4);
  color: var(--green);
}

.status-line.warn {
  border-color: rgba(255, 183, 3, 0.45);
  color: var(--gold);
}

.status-line.bad {
  border-color: rgba(239, 35, 60, 0.45);
  color: #ff9aa8;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  gap: 1rem;
  align-items: start;
}

.admin-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-post-list {
  display: grid;
  gap: 0.65rem;
}

.admin-post-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: rgba(255,255,255,0.045);
  padding: 0.85rem;
  cursor: pointer;
}

.admin-post-item:hover,
.admin-post-item.is-active {
  border-color: rgba(255, 183, 3, 0.45);
  background: rgba(255, 183, 3, 0.08);
}

.admin-post-item strong {
  display: block;
  margin-bottom: 0.25rem;
}

.admin-post-item span {
  color: var(--muted);
  font-size: 0.85rem;
}

.login-form,
.editor-form {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  padding: 0.9rem 1rem;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(255, 183, 3, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 183, 3, 0.11);
}

.form-row {
  display: grid;
  grid-template-columns: 0.55fr 1.45fr;
  gap: 1rem;
}

.form-help {
  color: var(--muted);
  font-size: 0.92rem;
}

.is-hidden {
  display: none !important;
}

.article-preview {
  border: 1px dashed rgba(255, 183, 3, 0.36);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  color: #efe8dc;
  line-height: 1.85;
}

.article-preview h1,
.article-preview h2,
.article-preview h3 {
  text-shadow: none;
  letter-spacing: -0.02em;
}

@media (max-width: 980px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .about-grid,
  .gallery-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-card {
    max-width: 26rem;
  }

  .gallery img {
    height: 28rem;
  }
}

@media (max-width: 640px) {
  .post-grid,
  .stats,
  .form-row {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(3.8rem, 24vw, 6rem);
  }

  .section-title {
    display: block;
  }

  .hero-card {
    transform: none;
  }

  .bolt {
    display: none;
  }
}
