html {
  min-height: 100%;
}

@font-face {
  font-family: "Teyvat Black";
  src: url("../assets/fonts/TeyvatBlack-Regular.woff2") format("woff2");
  font-display: swap;
}

body.site-shell {
  min-height: 100vh;
  background-image:
    linear-gradient(135deg, rgba(248, 250, 252, 0.84), rgba(236, 253, 245, 0.76)),
    url("../tool/random/imgs/117627735_p1.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

.theme-dark body.site-shell {
  background-image:
    linear-gradient(135deg, rgba(2, 6, 23, 0.84), rgba(15, 23, 42, 0.76)),
    url("../tool/random/imgs/117627735_p1.jpg");
}

.fish-container {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 180px;
  opacity: 0.5;
  pointer-events: auto;
}

.site-layer {
  position: relative;
  z-index: 10;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  min-width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.4);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: #fff;
  background: #0f766e;
  outline: none;
  transform: translateY(-1px);
}

.theme-dark .theme-toggle {
  color: #fde68a;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.36);
}

.theme-dark nav[aria-label="主导航"] ul {
  background: rgba(15, 23, 42, 0.86) !important;
  border-color: rgba(148, 163, 184, 0.3);
}

.theme-dark nav[aria-label="主导航"] a:not(.bg-slate-950) {
  color: #cbd5e1 !important;
}

.theme-dark nav[aria-label="主导航"] a:not(.bg-slate-950):hover {
  color: #fff !important;
}

.theme-dark .text-slate-950,
.theme-dark .text-slate-900,
.theme-dark .text-slate-800 {
  color: #f8fafc !important;
}

.theme-dark .text-slate-700,
.theme-dark .text-slate-600 {
  color: #cbd5e1 !important;
}

.theme-dark .text-teal-700,
.theme-dark .text-teal-800 {
  color: #5eead4 !important;
}

.theme-dark [class*="bg-white/"] {
  background-color: rgba(15, 23, 42, 0.82) !important;
}

.theme-dark [class*="ring-white/"],
.theme-dark .ring-slate-200 {
  --tw-ring-color: rgba(148, 163, 184, 0.28) !important;
}

.theme-dark .shadow-slate-900\/15,
.theme-dark .shadow-slate-900\/10,
.theme-dark .shadow-slate-900\/20 {
  --tw-shadow-color: rgba(0, 0, 0, 0.42) !important;
}

.theme-dark input,
.theme-dark select,
.theme-dark textarea {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.86);
  border-color: rgba(148, 163, 184, 0.42);
}

.theme-dark input::placeholder,
.theme-dark textarea::placeholder {
  color: #94a3b8;
}

.theme-dark .bg-slate-50 {
  background-color: rgba(15, 23, 42, 0.72) !important;
}

.teyvat-welcome {
  font-family: "Teyvat Black", Georgia, serif;
  font-size: 1.6rem;
  line-height: 1.4;
  letter-spacing: 0;
}

.blog-masonry {
  columns: 3 260px;
  column-gap: 1rem;
}

.blog-card {
  break-inside: avoid;
  margin-bottom: 1rem;
}

.blog-content {
  color: #334155;
  font-size: 1.06rem;
  line-height: 1.9;
}

.theme-dark .blog-content {
  color: #cbd5e1;
}

.theme-dark .blog-content h2,
.theme-dark .blog-content h3 {
  color: #f8fafc;
}

.theme-dark .blog-content blockquote {
  color: #cbd5e1;
}

.theme-dark .blog-content code {
  background: rgba(226, 232, 240, 0.12);
}

.blog-content h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  color: #0f172a;
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1.25;
}

.blog-content h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 850;
  line-height: 1.35;
}

.blog-content p,
.blog-content ul,
.blog-content ol,
.blog-content blockquote,
.blog-content pre {
  margin-top: 1rem;
}

.blog-content ul,
.blog-content ol {
  padding-left: 1.5rem;
}

.blog-content ul {
  list-style: disc;
}

.blog-content ol {
  list-style: decimal;
}

.blog-content blockquote {
  border-left: 4px solid #0f766e;
  padding-left: 1rem;
  color: #475569;
}

.blog-content code {
  border-radius: 0.25rem;
  background: rgba(15, 23, 42, 0.08);
  padding: 0.12rem 0.3rem;
  font-size: 0.95em;
}

.blog-content pre {
  overflow-x: auto;
  border-radius: 0.5rem;
  background: #0f172a;
  padding: 1rem;
  color: #e2e8f0;
}

.blog-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.blog-content a {
  color: #0f766e;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.blog-content img {
  max-width: 100%;
  border-radius: 0.5rem;
}

@media (max-width: 640px) {
  body.site-shell {
    background-attachment: scroll;
  }

  .fish-container {
    height: 140px;
  }

  .teyvat-welcome {
    font-size: 1.25rem;
  }
}
