/* ==========================================================================
   Sky Blog 视觉层（对齐 srasxe.vip / Halo sky-blog 主题）
   加载顺序：base.css → theme.css → sky.css → dark.css → skyblog.css
   只做视觉强化：毛玻璃导航、波浪分隔、精选轮播、圆角卡片、字体
   ========================================================================== */

:root {
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-line: rgba(255, 255, 255, 0.6);
  --glass-blur: 14px;
  --brand-a: #fb7185;
  --brand-b: #6366f1;
  --radius-box: 1.5rem;
}

html[data-theme="dark"] {
  --glass-bg: rgba(30, 33, 42, 0.55);
  --glass-strong: rgba(28, 31, 40, 0.82);
  --glass-line: rgba(255, 255, 255, 0.1);
}

body {
  font-family: "LXGW WenKai Screen", "HarmonyOS Sans SC", "PingFang SC", var(--serif);
}

/* ---------------------------------------------------------------- 毛玻璃导航 */

.site-header {
  background: var(--glass-bg) !important;
  border-bottom: 1px solid var(--glass-line);
  backdrop-filter: saturate(160%) blur(var(--glass-blur));
  -webkit-backdrop-filter: saturate(160%) blur(var(--glass-blur));
  box-shadow: 0 6px 24px -20px rgba(20, 24, 40, 0.5);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  background: var(--glass-strong) !important;
  box-shadow: 0 10px 30px -22px rgba(20, 24, 40, 0.65);
}

.site-nav a {
  border-radius: 10px;
  font-family: var(--sans);
  letter-spacing: 0.02em;
}
.site-nav a.active {
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b)) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px -14px rgba(99, 102, 241, 0.9);
}

.brand-text b { font-family: var(--serif); letter-spacing: 0.08em; }

/* ---------------------------------------------------------------- 波浪分隔 */

.wave-sep {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-top: clamp(-112px, -8vw, -52px);
  margin-bottom: -1px;
  line-height: 0;
  overflow: hidden;
  pointer-events: none;
}
.wave-sep svg {
  display: block;
  width: 100%;
  height: clamp(56px, 8vw, 110px);
}
.wave-sep .wave-layer {
  fill: var(--bg);
}
.wave-sep .w1 { opacity: 0.35; }
.wave-sep .w2 { opacity: 0.6; }
.wave-sep .w3 { opacity: 1; }
.wave-sep .w1,
.wave-sep .w2 {
  transform-origin: center;
  animation: wave-drift 11s ease-in-out infinite alternate;
}
.wave-sep .w2 { animation-duration: 15s; animation-direction: alternate-reverse; }
@keyframes wave-drift {
  from { transform: translateX(-12px); }
  to { transform: translateX(12px); }
}

/* ---------------------------------------------------------------- 精选文章轮播 */

.featured { margin: 6px 0 34px; }

.featured-stage {
  position: relative;
  aspect-ratio: 21 / 9;
  min-height: 260px;
  border-radius: var(--radius-box);
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: 0 26px 60px -34px rgba(20, 24, 40, 0.55);
  isolation: isolate;
}

.featured-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  z-index: 0;
  transition: opacity 0.7s ease;
  color: #fff;
}
.featured-slide.active { opacity: 1; z-index: 1; }
.featured-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 8s linear;
}
.featured-slide.active img { transform: scale(1.08); }
.featured-slide.is-skeleton {
  opacity: 1;
  background: linear-gradient(110deg, rgba(140, 150, 180, 0.16), rgba(140, 150, 180, 0.05));
  background-size: 220% 100%;
  animation: shimmer 1.8s linear infinite;
}

.featured-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.34) 42%, transparent 72%),
    linear-gradient(to right, rgba(0, 0, 0, 0.42) 0%, transparent 60%);
}

.featured-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(18px, 3vw, 38px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.featured-info h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(19px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.78);
}
.featured-meta span::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 8px;
  vertical-align: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.featured-empty {
  position: relative;
  display: grid;
  place-content: center;
  gap: 6px;
  text-align: center;
  color: var(--muted);
  opacity: 1;
  background: var(--bg-soft);
}
.featured-empty b { font-size: 16px; color: var(--ink-soft); }

.featured-dots {
  position: absolute;
  z-index: 4;
  right: clamp(14px, 2.4vw, 28px);
  bottom: clamp(14px, 2.4vw, 28px);
  display: flex;
  align-items: center;
  gap: 6px;
}
.featured-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: width 0.28s ease, background 0.28s ease;
}
.featured-dots button:hover { background: rgba(255, 255, 255, 0.72); }
.featured-dots button.active { width: 22px; background: #fff; }

/* ---------------------------------------------------------------- 卡片玻璃化 */

.side-card,
.friend-links {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-line) !important;
  backdrop-filter: saturate(150%) blur(var(--glass-blur));
  -webkit-backdrop-filter: saturate(150%) blur(var(--glass-blur));
  box-shadow: 0 18px 44px -30px rgba(20, 24, 40, 0.55);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.side-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 50px -28px rgba(20, 24, 40, 0.6);
}

.profile-card img {
  border: 3px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 14px 34px -18px rgba(99, 102, 241, 0.65);
}

/* 侧栏标题：小竖条 + 英文小字 */
.side-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  letter-spacing: 0.06em;
}
.side-card h3::before {
  content: "";
  width: 4px;
  height: 15px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--brand-a), var(--brand-b));
}

/* 文章卡片：大圆角 + 悬停上浮 */
.post-list { gap: 26px; }
.post-card {
  border-radius: var(--radius-box);
  box-shadow: 0 20px 48px -34px rgba(20, 24, 40, 0.65);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 60px -32px rgba(20, 24, 40, 0.7);
}

/* ---------------------------------------------------------------- 友链分组 */

.friend-links { border-radius: var(--radius-box) !important; }
.friend-card {
  background: var(--glass-bg);
  border-color: var(--glass-line);
}
.friend-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.42);
  box-shadow: 0 18px 38px -24px rgba(99, 102, 241, 0.55);
}

/* ---------------------------------------------------------------- 搜索框 / 标签 */

.searchbar input {
  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.filter-tag { border-radius: 999px; }
.filter-tag.active {
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b)) !important;
}

/* ---------------------------------------------------------------- 页脚 */

.site-footer {
  background: var(--glass-bg);
  border-top: 1px solid var(--glass-line);
  max-width: 100%;
  padding-left: max(24px, calc((100% - 1180px) / 2 + 24px));
  padding-right: max(24px, calc((100% - 1180px) / 2 + 24px));
}

/* ---------------------------------------------------------------- 响应式 */

@media (max-width: 760px) {
  .featured-stage { aspect-ratio: 4 / 3; min-height: 200px; border-radius: 1.25rem; }
  .featured-info h3 { font-size: 17px; }
  .wave-sep svg { height: 46px; }
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wave-sep .w1,
  .wave-sep .w2,
  .featured-slide img { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- 暗色微调 */

html[data-theme="dark"] .site-header {
  background: var(--glass-bg) !important;
}
html[data-theme="dark"] .side-card,
html[data-theme="dark"] .friend-links,
html[data-theme="dark"] .friend-card,
html[data-theme="dark"] .searchbar input {
  background: var(--glass-bg) !important;
}
html[data-theme="dark"] .featured-stage { background: #1b1e27; }

/* ---------------------------------------------------------------- QQ 机器人卡片 */

.qqbot-card { display: flex; flex-direction: column; gap: 12px; }
.qqbot-head { display: flex; align-items: center; gap: 12px; }
.qqbot-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff9ab9, #8b8bff);
  color: #fff;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 12px 26px -16px rgba(99, 102, 241, 0.85);
}
.qqbot-avatar img { width: 100%; height: 100%; border-radius: 16px; object-fit: cover; }
.qqbot-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #9aa3b2;
  border: 2px solid var(--bg);
}
.qqbot-dot.is-online {
  background: #22c55e;
  animation: qqbot-pulse 2.4s ease-out infinite;
}
@keyframes qqbot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.qqbot-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qqbot-info b { font-size: 14.5px; letter-spacing: 0.03em; }
.qqbot-info span { font-size: 11.5px; color: var(--muted); }
.qqbot-info small { font-size: 11px; color: var(--muted); font-family: var(--sans); }
.qqbot-state.is-online { color: #16a34a !important; }

.qqbot-actions { display: flex; gap: 8px; }
.qqbot-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
  font-size: 12px;
  font-family: var(--sans);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.qqbot-btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.85); }
.qqbot-btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
  color: #fff;
  box-shadow: 0 10px 22px -14px rgba(99, 102, 241, 0.9);
}
.qqbot-btn.primary:hover { color: #fff; filter: brightness(1.05); }

/* ---------------------------------------------------------------- 友链横向卡片 */

.friend-card {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 1rem;
  text-align: left;
}
.friend-card .friend-logo { margin-bottom: 0; flex: 0 0 auto; }
.friend-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.friend-info b { font-size: 14px; letter-spacing: 0.03em; }
.friend-info small {
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.friend-arrow {
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
  transition: transform 0.25s ease, color 0.25s ease;
}
.friend-card:hover .friend-arrow { transform: translate(2px, -2px); color: var(--pink); }

@media (max-width: 560px) {
  .friend-grid { grid-template-columns: minmax(0, 1fr); }
}
html[data-theme="dark"] .qqbot-btn { background: rgba(255, 255, 255, 0.07); }
html[data-theme="dark"] .qqbot-btn:hover { background: rgba(255, 255, 255, 0.14); }
html[data-theme="dark"] .qqbot-avatar { border: 1px solid rgba(255, 255, 255, 0.1); }
