/*
Theme Name: Lumina Liquid Glass
Theme URI: https://github.com/horizon/typecho-theme-lumina
Description: 极简旷野风 + Liquid Glass 流光玻璃质感 + 渐进式 PJAX 浮层阅读 + 动态 Hero 动效的现代 Typecho 博客主题
Author: lntomf
Author URI: https://ai.studio/build
Version: 1.1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --- Modern Reset & Variables --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: #000000;
  color: #ffffff;
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background-color: #000000;
  line-height: 1.6;
}

code, pre, kbd, samp {
  font-family: 'JetBrains Mono', monospace;
}

::selection {
  background-color: #fbbf24;
  color: #000000;
}

/* --- Compact music controls --- */
.lumina-audio-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.lumina-audio-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border: 0;
  border-radius: 0.6rem;
  color: rgba(255, 255, 255, 0.88);
  background: transparent;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.18s ease, color 0.18s ease;
}

.lumina-audio-control:hover,
.lumina-audio-control:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.lumina-audio-control:active {
  transform: scale(0.86);
}

.lumina-audio-control:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.lumina-audio-control:disabled:hover {
  color: rgba(255, 255, 255, 0.88);
  background: transparent;
}

.lumina-audio-pause-icon {
  display: none;
}

.lumina-audio-toggle.is-playing {
  color: #111111;
  background: #fbbf24;
}

.lumina-audio-toggle.is-playing:hover,
.lumina-audio-toggle.is-playing:focus-visible {
  color: #000000;
  background: #fcd34d;
}

.lumina-audio-toggle.is-playing .lumina-audio-play-icon {
  display: none;
}

.lumina-audio-toggle.is-playing .lumina-audio-pause-icon {
  display: inline-flex;
}

/* --- Dynamic Keyframes & Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.04);
  }
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-fade-in-down {
  animation: fadeInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-float {
  animation: floatSlow 4s ease-in-out infinite;
}

.cursor-blink {
  animation: cursorBlink 0.9s infinite;
}

#hero-typewriter-text {
  display: inline-block;
  min-width: 4px;
  color: #fde68a;
  vertical-align: middle;
}

@supports (-webkit-background-clip: text) {
  #hero-typewriter-text {
    background: linear-gradient(135deg, #fef08a 0%, #f59e0b 50%, #ea580c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

#hero-typewriter-cursor {
  display: inline-block;
  vertical-align: middle;
}

/* --- Liquid Glass Styling Engine --- */
.liquid-glass {
  background: rgba(255, 255, 255, 0.025);
  background-blend-mode: luminosity;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.liquid-glass:hover {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 30px -10px rgba(245, 158, 11, 0.15);
}

.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.4) 0%, 
    rgba(255,255,255,0.1) 25%,
    rgba(255,255,255,0) 50%, 
    rgba(255,255,255,0.1) 75%, 
    rgba(255,255,255,0.3) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, rgba(255,255,255,0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  color: #fde68a;
}

@supports (-webkit-background-clip: text) {
  .text-gradient-gold {
    background: linear-gradient(135deg, #fef08a 0%, #f59e0b 50%, #ea580c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

/* --- Navigation: transparent glass + spring selection --- */
.lumina-main-nav {
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.2rem;
  margin: -0.2rem;
}

.lumina-main-nav::-webkit-scrollbar {
  display: none;
}

.lumina-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  min-height: 2rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  white-space: nowrap;
  transform: translateZ(0);
  transition: color 0.22s ease, background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.lumina-nav-link:hover,
.lumina-nav-link:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.14);
  outline: none;
}

.lumina-nav-link:active,
.lumina-nav-link.is-pressed {
  transform: scale(0.92);
}

.lumina-nav-link.is-active {
  color: #ffffff;
  background: rgba(8, 8, 14, 0.78);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  animation: luminaNavSpring 0.7s cubic-bezier(0.22, 1.35, 0.36, 1) both;
}

.lumina-nav-icon {
  width: 0.9rem;
  height: 0.9rem;
  stroke-width: 1.8;
  opacity: 0.88;
}

@keyframes luminaNavSpring {
  0% { transform: scale(0.78); opacity: 0.4; }
  52% { transform: scale(1.08); opacity: 1; }
  76% { transform: scale(0.97); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes luminaNavExit {
  0% { transform: scale(1); }
  45% { transform: scale(0.9); }
  100% { transform: scale(1.03); }
}

.lumina-nav-link.is-pressed {
  animation: luminaNavExit 0.28s cubic-bezier(0.22, 1.25, 0.36, 1) both;
}

/* Standalone pages use the same glass surface and entrance rhythm as the feed. */
.page-content > :first-child {
  margin-top: 0;
}

.page-content > :last-child {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .lumina-main-nav {
    width: calc(100% + 0.4rem);
    padding-bottom: 0.15rem;
  }

  .lumina-nav-link {
    min-height: 2.25rem;
    padding-inline: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lumina-nav-link.is-active,
  .lumina-nav-link.is-pressed {
    animation: none;
  }
}

/* --- Markdown & Typography Styling --- */
.markdown-body {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  line-height: 1.85;
  font-weight: 300;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  color: #ffffff;
  font-weight: 700;
  margin-top: 2.2rem;
  margin-bottom: 1rem;
  line-height: 1.35;
}

.markdown-body h1 {
  font-size: 1.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 0.6rem;
}

.markdown-body h2 {
  font-size: 1.45rem;
  color: #fde68a;
}

.markdown-body h3 {
  font-size: 1.25rem;
}

.markdown-body p {
  margin-bottom: 1.35rem;
}

.markdown-body a {
  color: #fbbf24;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity 0.2s;
}

.markdown-body a:hover {
  opacity: 0.8;
}

.markdown-body blockquote {
  border-left: 3.5px solid #f59e0b;
  margin: 1.8rem 0;
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
  background: rgba(245, 158, 11, 0.06);
  padding: 0.9rem 1.25rem;
  border-radius: 0 0.85rem 0.85rem 0;
}

.markdown-body ul, .markdown-body ol {
  padding-left: 1.6rem;
  margin-bottom: 1.35rem;
}

.markdown-body li {
  margin-bottom: 0.45rem;
}

.markdown-body code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.45rem;
  border-radius: 0.4rem;
  font-size: 0.875em;
  color: #fde68a;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.markdown-body pre {
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.1rem;
  padding: 1.35rem;
  overflow-x: auto;
  margin: 1.8rem 0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.markdown-body pre code {
  background: transparent;
  padding: 0;
  border: none;
  color: #e2e8f0;
}

.markdown-body img {
  max-width: 100%;
  border-radius: 1.1rem;
  margin: 1.8rem 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 35px -10px rgba(0, 0, 0, 0.6);
}

.markdown-body hr {
  border: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 2.8rem 0;
}

/* --- Scrollbar Customization --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.6);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.45);
}

/* --- Comments / threaded replies --- */
.lumina-comments {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.lumina-comment-card {
  overflow: hidden;
  background: rgba(10, 10, 12, 0.46);
}

.lumina-comment-card .avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lumina-comment-content p:last-child {
  margin-bottom: 0;
}

.lumina-comment-content a {
  color: #fbbf24;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lumina-comment-reply a {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 0.65rem;
  color: #fcd34d;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.lumina-comment-reply a:hover,
.lumina-comment-reply a:focus-visible {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(251, 191, 36, 0.55);
  color: #fef3c7;
}

.lumina-comment-children {
  position: relative;
}

.lumina-comment-children::before {
  content: '';
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: -0.75rem;
  width: 1px;
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.45), rgba(255, 255, 255, 0.08));
}

.lumina-comment-input {
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.lumina-comment-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.lumina-comment-input:focus {
  border-color: rgba(251, 191, 36, 0.75);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

@media (max-width: 640px) {
  .lumina-comment-children {
    margin-left: 1rem;
  }

  .lumina-comment-children::before {
    left: -0.5rem;
  }
}

.lumina-background-fallback {
  background:
    radial-gradient(circle at 18% 18%, rgba(245, 158, 11, 0.2), transparent 34%),
    radial-gradient(circle at 82% 14%, rgba(244, 63, 94, 0.16), transparent 30%),
    radial-gradient(circle at 52% 88%, rgba(30, 64, 175, 0.2), transparent 42%),
    linear-gradient(145deg, #09090b 0%, #17120b 48%, #050505 100%);
}


/* --- Local Background Slideshow --- */
.lumina-background-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.05);
  filter: brightness(0.9) contrast(1.05);
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.lumina-background-layer.is-visible {
  opacity: 1;
}

#cosmic-bg-fallback {
  opacity: 1;
  transition: opacity 1.2s ease-in-out;
}

#cosmic-bg-fallback.is-hidden {
  opacity: 0;
}
