@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

:root {
  --red: #ff0000;
  --violet: #8b00ff;
  --ink: #261717;
  --glass: rgba(255, 255, 255, 0.11);
  --glass-hi: rgba(255, 255, 255, 0.19);
  --line: rgba(255, 255, 255, 0.22);
  --text: #fdf5f5;
  --soft: rgba(255, 255, 255, 0.78);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: "Roboto", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  background-color: var(--ink);
  background-image:
    radial-gradient(60vw 60vw at 10% -12%, rgba(255, 0, 0, 0.55), transparent 64%),
    radial-gradient(58vw 58vw at 98% 6%, rgba(139, 0, 255, 0.5), transparent 62%),
    radial-gradient(80vw 60vw at 50% 112%, rgba(139, 0, 255, 0.34), transparent 72%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: 85vw 85vw, 72vw 72vw, 95vw 72vw;
  animation: drift 28s ease-in-out infinite;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.14), transparent 46%);
  mix-blend-mode: screen;
}

@keyframes drift {
  0% { background-position: 0 0, 100% 0, 50% 100%; }
  50% { background-position: 8% 5%, 90% 3%, 46% 97%; }
  100% { background-position: 0 0, 100% 0, 50% 100%; }
}

img {
  max-width: 100%;
}

a:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(255, 0, 0, 0.75);
  outline-offset: 2px;
}

/* 顶部玻璃条 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(38, 23, 23, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.barnav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 0 6px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 42vw;
}

.mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 10px;
  font-size: 16px;
  background: linear-gradient(135deg, var(--red), var(--violet));
  box-shadow: 0 6px 16px rgba(255, 0, 0, 0.35);
}

.right-cluster {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill {
  position: relative;
}

.pill summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  font-weight: 500;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.pill summary::-webkit-details-marker {
  display: none;
}

.pill summary::marker {
  content: "";
}

.pill summary:hover {
  background: var(--glass-hi);
  transform: translateY(-1px);
}

.pill[open] summary {
  background: linear-gradient(100deg, var(--red), var(--violet));
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(255, 0, 0, 0.32);
}

.pill menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 60;
  margin: 0;
  padding: 10px;
  min-width: 198px;
  list-style: none;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(38, 23, 23, 0.8);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.48);
}

.pill.r menu {
  left: auto;
  right: 0;
}

.pill menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.98rem;
  transition: background 0.2s ease;
}

.pill menu a:hover {
  background: rgba(255, 0, 0, 0.4);
}

.finder {
  display: none;
}

.finder input {
  height: 44px;
  width: 148px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.finder input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

@media (min-width: 900px) {
  .finder {
    display: block;
  }
}

/* 首屏 */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding: 122px 20px 96px;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.hero-art {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 0;
}

.hero-img,
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.15);
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(202deg, rgba(38, 23, 23, 0.72), rgba(38, 23, 23, 0.32) 44%, rgba(38, 23, 23, 0.92));
}

.hero-copy {
  position: relative;
  z-index: 1;
  justify-self: end;
  width: min(620px, 100%);
  text-align: right;
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.38);
}

.hero-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 7vw, 3.9rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(100deg, #ffffff, #ffd8d8 52%, #e8d1ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 0 0 22px;
  color: var(--soft);
  font-size: 1rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 28px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  background: linear-gradient(100deg, var(--red), var(--violet));
  box-shadow: 0 12px 28px rgba(255, 0, 0, 0.34);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(139, 0, 255, 0.46);
}

/* 正文 + 右栏 */
.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px 20px 48px;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1000px) {
  .shell {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }
}

.rail {
  min-width: 0;
}

.rail-card {
  position: sticky;
  top: 88px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.3);
}

.rail-card small,
.prose small {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.62);
}

.rail-title {
  margin: 6px 0 16px;
  font-size: 1.1rem;
  line-height: 1.35;
}

.rail-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 2px;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.rail-list a:hover {
  background: rgba(139, 0, 255, 0.3);
  color: #fff;
  transform: translateX(3px);
}

.totop {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}

.totop:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* 正文玻璃卡 */
.prose {
  min-width: 0;
}

.prose section {
  position: relative;
  margin: 0 0 22px;
  padding: 26px 22px 32px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.26);
  scroll-margin-top: 100px;
}

.prose section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--violet));
}

.prose section:nth-child(even)::after {
  background: linear-gradient(90deg, var(--violet), var(--red));
}

.prose h2 {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  line-height: 1.28;
}

.prose h2 + p,
.prose h3 + p {
  margin-top: 0;
}

.prose h3 {
  margin: 26px 0 10px;
  font-size: 1.16rem;
  line-height: 1.35;
}

.prose p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.88);
}

.prose a {
  color: #ffdcdc;
  text-decoration-color: rgba(255, 0, 0, 0.6);
  text-underline-offset: 3px;
}

.prose a:hover {
  color: #fff;
}

.prose ul,
.prose ol {
  margin: 0 0 14px;
  padding-left: 1.25em;
}

.prose li {
  margin-bottom: 8px;
}

.prose img {
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 4px 0 14px;
}

.prose figure {
  margin: 18px 0;
}

.prose blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--violet);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, 0.08);
}

.prose table {
  display: block;
  overflow-x: auto;
  width: 100%;
  margin: 0 0 16px;
  border-collapse: collapse;
  font-size: 0.97rem;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  text-align: left;
}

.prose time {
  display: inline-block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.95rem;
}

.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.95em;
}

.prose pre {
  overflow-x: auto;
  padding: 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.4);
}

/* 页脚 */
.foot {
  margin-top: 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(38, 23, 23, 0.62);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.foot-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px;
  display: grid;
  gap: 26px;
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .foot-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.foot dl {
  margin: 0;
  min-width: 0;
}

.foot dt {
  margin-bottom: 8px;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.58);
}

.foot dd {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.82);
  word-break: break-word;
}

.foot dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: rgba(255, 255, 255, 0.84);
  text-decoration: none;
}

.foot dd a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot-base {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
}

.foot-base p {
  margin: 0;
}

.foot-base a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.foot-base a:hover {
  color: #fff;
}

@media (max-width: 640px) {
  .hero {
    padding: 108px 14px 88px;
    clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%);
  }

  .hero-copy {
    padding: 22px 18px;
    border-radius: 20px;
  }

  .brand span {
    font-size: 1rem;
  }

  .prose section {
    padding: 22px 16px 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body {
    animation: none;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
