@import url("https://fonts.googleapis.com/css2?family=Zhi+Mang+Xing&family=Ma+Shan+Zheng&family=Noto+Serif+SC:wght@400;600;700&display=swap");

:root {
  color-scheme: dark;
  --ink: #0c0a09;
  --paper: #f5e6c8;
  --paper-muted: rgba(245, 230, 200, 0.72);
  --cinnabar: #c93c3c;
  --gold: #d4af37;
  --jade: #7a9e7e;
  --line: rgba(212, 175, 55, 0.22);
  --glass: rgba(8, 6, 5, 0.52);
  --glass-strong: rgba(12, 10, 8, 0.68);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-display: "Ma Shan Zheng", "KaiTi", cursive;
  --font-xingshu: "Zhi Mang Xing", "STXingkai", "华文行楷", "Xingkai SC", "Kaiti SC", "楷体", cursive;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-serif);
  color: var(--paper);
  background: var(--ink);
  overflow-y: auto;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.scene {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

.scene-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(201, 60, 60, 0.12), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(212, 175, 55, 0.1), transparent 35%),
    linear-gradient(180deg, #120f0d 0%, #0c0a09 45%, #080706 100%);
}

.scene-bg video,
.scene-bg .scene-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.02);
  filter: saturate(0.95) contrast(1.08) brightness(0.82);
}

.scene-bg .scene-image {
  position: absolute;
  inset: 0;
}

.scene-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 14, 20, 0.18) 0%, rgba(8, 14, 20, 0.08) 18%, rgba(8, 14, 20, 0.08) 82%, rgba(8, 14, 20, 0.2) 100%),
    linear-gradient(180deg, rgba(8, 12, 18, 0.12) 0%, rgba(8, 12, 18, 0.28) 55%, rgba(8, 10, 14, 0.72) 100%);
  pointer-events: none;
}

.scene-bg--fallback::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 30% 40%, rgba(201, 60, 60, 0.08), transparent 45%),
    radial-gradient(circle at 70% 60%, rgba(122, 158, 126, 0.08), transparent 40%);
  animation: mist-drift 24s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes mist-drift {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(2%, 1%, 0) scale(1.05);
  }
}

.floating-layer {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

.floating-layer--curtain {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10vh clamp(6px, 1.2vw, 18px) 14vh;
}

.quote-curtain {
  display: flex;
  align-items: flex-start;
  gap: clamp(8px, 1.2vw, 18px);
  flex: 0 0 auto;
  max-width: none;
}

.quote-curtain--left {
  justify-content: flex-start;
}

.quote-curtain--right {
  justify-content: flex-end;
  flex-direction: row-reverse;
}

.floating-layer--curtain .float-column {
  position: relative;
  left: auto;
  top: auto;
  will-change: auto;
  animation: none !important;
  transform: none !important;
  margin-top: calc(var(--col-offset, 0) * 3.5vh);
  flex: 0 0 auto;
}

.float-column--static {
  animation: none !important;
  transform: none !important;
}

.float-column {
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-xingshu);
  font-weight: 400;
  font-style: normal;
  color: #f8fffb;
  user-select: none;
  opacity: 0.96;
  filter: drop-shadow(0 0 8px rgba(88, 255, 150, 0.32));
  -webkit-font-smoothing: antialiased;
  contain: layout style paint;
}

.floating-layer--lite .float-column {
  filter: drop-shadow(0 0 8px rgba(88, 255, 150, 0.35));
}

.floating-layer--lite .float-column--green {
  text-shadow:
    0 1px 3px rgba(0, 24, 12, 0.85),
    0 0 10px rgba(110, 255, 160, 0.65);
}

.float-column--random {
  rotate: 0deg;
  animation: none;
}

.float-column--horizontal,
.float-column--slant {
  writing-mode: horizontal-tb;
  max-width: min(34vw, 480px);
  line-height: 1.4;
  letter-spacing: 0.08em;
  white-space: normal;
}

.float-column--slant {
  max-width: min(30vw, 440px);
}

.float-column--nowrap {
  white-space: nowrap;
  max-width: none;
}

.float-column--vertical {
  writing-mode: vertical-rl;
  text-orientation: upright;
  max-height: none;
  overflow: visible;
  line-height: 1.18;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.float-column--left {
  text-align: left;
}

.float-column--right {
  text-align: right;
}

.float-column.float-drift-a {
  animation-name: float-drift-a;
}

.float-column.float-drift-b {
  animation-name: float-drift-b;
}

.float-column.float-drift-c {
  animation-name: float-drift-c;
}

.float-column.float-drift-d {
  animation-name: float-drift-d;
}

@keyframes float-drift-a {
  0% {
    translate: 0 0;
    opacity: 0.84;
  }
  20% {
    translate: 24px -28px;
    opacity: 0.98;
  }
  45% {
    translate: -16px -48px;
    opacity: 1;
  }
  70% {
    translate: 28px -20px;
    opacity: 0.92;
  }
  100% {
    translate: 0 0;
    opacity: 0.84;
  }
}

@keyframes float-drift-b {
  0% {
    translate: 0 0;
    opacity: 0.86;
  }
  25% {
    translate: -28px -18px;
    opacity: 1;
  }
  55% {
    translate: 18px -44px;
    opacity: 0.94;
  }
  80% {
    translate: -22px -26px;
    opacity: 0.9;
  }
  100% {
    translate: 0 0;
    opacity: 0.86;
  }
}

@keyframes float-drift-c {
  0% {
    translate: 0 0;
    opacity: 0.88;
  }
  30% {
    translate: 14px -36px;
    opacity: 1;
  }
  60% {
    translate: -24px -14px;
    opacity: 0.96;
  }
  85% {
    translate: 10px -52px;
    opacity: 0.9;
  }
  100% {
    translate: 0 0;
    opacity: 0.88;
  }
}

@keyframes float-drift-d {
  0% {
    translate: 0 0;
    opacity: 0.82;
  }
  18% {
    translate: -20px -34px;
    opacity: 0.96;
  }
  42% {
    translate: 26px -22px;
    opacity: 1;
  }
  68% {
    translate: -12px -48px;
    opacity: 0.92;
  }
  100% {
    translate: 0 0;
    opacity: 0.82;
  }
}

.float-column--sm {
  font-size: clamp(24px, 2.6vw, 32px);
}

.float-column--md {
  font-size: clamp(30px, 3.4vw, 42px);
}

.float-column--lg {
  font-size: clamp(36px, 4.2vw, 52px);
}

.float-column--green {
  text-shadow:
    0 1px 2px rgba(0, 24, 12, 0.55),
    0 0 6px rgba(110, 255, 160, 0.45),
    0 0 12px rgba(60, 230, 120, 0.28);
}

.float-column--gold {
  color: #fff8e8;
  filter: drop-shadow(0 0 12px rgba(255, 210, 120, 0.35));
  text-shadow:
    0 0 8px rgba(255, 230, 170, 0.9),
    0 0 20px rgba(212, 175, 55, 0.65),
    0 0 40px rgba(180, 140, 40, 0.35);
}

.float-column--white {
  color: #ffffff;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.35));
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.85),
    0 0 22px rgba(220, 240, 255, 0.45);
}

@keyframes column-float {
  0% {
    transform: translate3d(0, 16px, 0);
    opacity: 0.72;
  }
  50% {
    transform: translate3d(0, -14px, 0);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, 16px, 0);
    opacity: 0.72;
  }
}

@media (max-width: 768px) {
  .scene-bg--fallback::before {
    animation: none;
  }

  .floating-layer--curtain {
    padding: 12vh 6px 16vh;
  }

  .quote-curtain {
    gap: clamp(6px, 1vw, 12px);
  }

  .floating-layer--curtain .float-column {
    margin-top: calc(var(--col-offset, 0) * 2.5vh);
  }

  .brand-title-row {
    gap: 0.35em 0.65em;
  }

  .brand-motto {
    font-size: clamp(26px, 6vw, 36px);
    letter-spacing: 0.1em;
  }

  .float-column--horizontal,
  .float-column--slant {
    max-width: min(88vw, 420px);
  }

  .float-column--sm {
    font-size: clamp(20px, 5vw, 26px);
  }

  .float-column--md {
    font-size: clamp(24px, 5.6vw, 32px);
  }

  .float-column--lg {
    font-size: clamp(28px, 6.4vw, 38px);
  }

  .float-column--left {
    left: 3% !important;
  }

  .float-column--right {
    right: 3% !important;
    left: auto !important;
  }
}

.scene-content {
  position: relative;
  z-index: 4;
  pointer-events: auto;
}

.scene .logo.site-avatar {
  border-color: rgba(212, 175, 55, 0.42) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35) !important;
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

header {
  padding: 28px 0 16px;
}

nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
}

.brand-title-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4em 0.85em;
}

.brand-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1;
  color: var(--paper);
  text-shadow:
    0 0 18px rgba(245, 196, 68, 0.28),
    0 8px 24px rgba(0, 0, 0, 0.38);
}

.brand-motto {
  font-family: var(--font-xingshu);
  font-size: clamp(32px, 4.8vw, 46px);
  line-height: 1;
  color: #f8fffb;
  letter-spacing: 0.14em;
  white-space: nowrap;
  filter: drop-shadow(0 0 8px rgba(88, 255, 150, 0.32));
  text-shadow:
    0 1px 2px rgba(0, 24, 12, 0.55),
    0 0 6px rgba(110, 255, 160, 0.45),
    0 0 12px rgba(60, 230, 120, 0.28);
}

.author {
  margin-top: 6px;
  color: #f7df9e;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-shadow: 0 0 12px rgba(245, 196, 68, 0.32);
}

nav .header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 0 20px;
  border: 1px solid rgba(255, 230, 150, 0.58);
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.06em;
  backdrop-filter: blur(12px);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 239, 184, 0.92);
  box-shadow:
    0 0 22px rgba(245, 196, 68, 0.36),
    0 16px 36px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary {
  border-color: rgba(255, 220, 120, 0.76);
  background: linear-gradient(135deg, rgba(230, 62, 52, 0.98), rgba(170, 31, 26, 0.96));
  box-shadow:
    0 0 24px rgba(230, 62, 52, 0.42),
    0 16px 40px rgba(201, 60, 60, 0.34);
  color: #fff8ef;
}

.btn-secondary {
  background: linear-gradient(135deg, rgba(255, 228, 150, 0.24), rgba(255, 255, 255, 0.1));
  color: #fff2c4;
  text-shadow: 0 0 10px rgba(245, 196, 68, 0.36);
}

.btn-telegram {
  border-color: rgba(125, 211, 252, 0.8);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.98), rgba(2, 132, 199, 0.94));
  box-shadow:
    0 0 24px rgba(14, 165, 233, 0.48),
    0 16px 40px rgba(2, 132, 199, 0.38);
  color: #f8fbff;
  text-shadow: 0 0 10px rgba(186, 230, 253, 0.45);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 0 36px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-right: auto;
  margin-left: auto;
  padding: 0 14px;
  border: 1px solid rgba(255, 231, 148, 0.72);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 231, 148, 0.22), rgba(201, 60, 60, 0.28));
  color: #fff0a8;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.2em;
  box-shadow:
    0 0 18px rgba(245, 196, 68, 0.48),
    0 10px 30px rgba(0, 0, 0, 0.3);
  text-shadow: 0 0 12px rgba(245, 196, 68, 0.75);
}

.hero h1 {
  margin: 18px 0 0;
  max-width: 780px;
  margin-right: auto;
  margin-left: auto;
  font-family: var(--font-display);
  font-size: clamp(44px, 8vw, 88px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0.04em;
  color: var(--paper);
  text-align: center;
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.hero p {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--paper-muted);
  font-size: 17px;
  line-height: 1.95;
}

.hero .hero-intro {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
  color: #fff5c7;
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  text-shadow:
    0 0 18px rgba(245, 196, 68, 0.7),
    0 8px 28px rgba(0, 0, 0, 0.45);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.panel {
  border: 1px solid rgba(212, 175, 55, 0.16);
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(10, 14, 18, 0.72), rgba(8, 10, 14, 0.62));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.modules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 0 56px;
}

.module {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.module:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.38);
}

.module-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  background: rgba(201, 60, 60, 0.12);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 22px;
}

.module h3 {
  margin: 16px 0 10px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.module p {
  margin: 0;
  color: var(--paper-muted);
  line-height: 1.75;
  font-size: 14px;
}

.module p code {
  color: #ffdca8;
}

.module-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.module-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.module-link:hover {
  background: rgba(201, 60, 60, 0.18);
  border-color: rgba(201, 60, 60, 0.35);
}

footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 36px;
  color: var(--paper-muted);
  font-size: 14px;
}

footer a {
  color: #ffdca8;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 820px) {
  .modules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  nav {
    align-items: center;
    flex-direction: column;
  }

  .float-column {
    opacity: 0.78;
  }
}

@media (max-width: 560px) {
  .modules {
    grid-template-columns: 1fr;
  }

  .floating-layer {
    opacity: 0.65;
  }

  .float-column--sm,
  .float-column--md {
    font-size: 15px;
  }

  .float-column--lg {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .float-column,
  .scene-bg--fallback::before {
    animation: none !important;
  }
}
