/* === 霜落星辰工作室 - 统一样式表 === */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #07070a;
  color: #d4d4d8;
  font-family: "SF Pro Display", "Inter", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ====== 星空画布 ====== */
#stars-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ====== 导航 ====== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10,10,15,0.6);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

nav ul {
  list-style: none;
  display: flex;
  padding: 0 6%;
  max-width: 1400px;
  margin: 0 auto;
}

nav a {
  display: block;
  color: rgba(255,255,255,0.45);
  padding: 18px 24px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  border-bottom: 1.5px solid transparent;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 24px;
  right: 24px;
  height: 1.5px;
  background: #64ffda;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

nav a:hover { color: rgba(255,255,255,0.8); }
nav a:hover::after { transform: scaleX(1); }
nav a.active { color: #64ffda; }
nav a.active::after { transform: scaleX(1); }

/* ====== 内容容器 ====== */
.page-content {
  position: relative;
  z-index: 1;
  padding: 120px 6% 80px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ====== 标题 ====== */
.page-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1.1;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.page-sub {
  color: rgba(255,255,255,0.4);
  font-size: 15px;
  margin-top: 12px;
  line-height: 1.7;
  max-width: 500px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.35s forwards;
}

/* ====== 毛玻璃卡片 ====== */
.glass-card {
  background: linear-gradient(145deg, rgba(30,30,50,0.4), rgba(20,20,35,0.2));
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 20px;
  padding: 36px;
  backdrop-filter: blur(10px);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100,255,218,0.3), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.glass-card:hover::before { opacity: 1; }
.glass-card:hover { transform: translateY(-4px); border-color: rgba(100,255,218,0.15); }

.glass-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}

/* ====== 分隔线 ====== */
.page-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(100,255,218,0.15), transparent);
  margin: 48px 0;
}

/* ====== 按钮 ====== */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border: 1.5px solid rgba(100,255,218,0.3);
  border-radius: 6px;
  color: #64ffda;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.btn-ghost:hover {
  background: rgba(100,255,218,0.08);
  border-color: #64ffda;
}

.btn-ghost .arrow { transition: transform 0.3s ease; }
.btn-ghost:hover .arrow { transform: translateX(6px); }

/* ====== 行内标题强调 ====== */
.inline-hl {
  color: #64ffda;
  font-weight: 500;
}

.inline-hl-purple {
  color: #a78bfa;
}

/* ====== 动画 ====== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-fade {
  opacity: 0;
  animation: fadeUp 0.7s ease forwards;
}

.section-fade:nth-child(1) { animation-delay: 0.1s; }
.section-fade:nth-child(2) { animation-delay: 0.2s; }
.section-fade:nth-child(3) { animation-delay: 0.3s; }
.section-fade:nth-child(4) { animation-delay: 0.4s; }
.section-fade:nth-child(5) { animation-delay: 0.5s; }

/* 但为了不影响主页用JS观测，保留visible */
.section-fade.visible {
  opacity: 1;
}

/* ====== 响应式 ====== */
@media (max-width: 768px) {
  nav a { padding: 14px 14px; font-size: 11px; letter-spacing: 1px; }
  .page-content { padding: 100px 5% 60px; }
  .glass-card { padding: 24px; }
}

/* ====== B站数据卡片（新闻页用）========== */
.side-stats-card {
  background: linear-gradient(145deg, rgba(30,30,50,0.4), rgba(20,20,35,0.2));
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 20px;
  padding: 20px 24px;
  backdrop-filter: blur(10px);
  transition: all 0.4s ease;
  opacity: 0; animation: fadeUp 0.6s ease 0.1s forwards;
  display: flex;
  flex-direction: column;
}

.side-stats-card:hover {
  border-color: rgba(100,255,218,0.15);
  transform: translateY(-2px);
}

.stats-username {
  color: #64ffda;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  align-self: flex-start;
}

.stats-data-group {
  display: flex;
  align-items: center;
  gap: 16px;
  align-self: flex-end;
  margin-top: 8px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  color: #64ffda;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.stat-label {
  display: block;
  color: rgba(255,255,255,0.3);
  font-size: 11px;
  letter-spacing: 1px;
  margin-top: 2px;
  text-transform: uppercase;
}

.stats-divider {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.06);
}

/* 新闻页布局 */
.news-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.news-header-left { flex: 1; min-width: 0; }
.news-header-right { width: 380px; flex-shrink: 0; }

.news-content-row {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.news-content-main { flex: 1; min-width: 0; }
.news-content-side { width: 380px; flex-shrink: 0; }

/* 小卡片列表 */
.mini-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mini-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  animation: fadeUp 0.4s ease backwards;
  background: rgba(255,255,255,0.02);
  margin-bottom: 4px;
}

.mini-card:hover {
  background: rgba(100,255,218,0.04);
  border-color: rgba(255,255,255,0.06);
}

.mini-card a {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.mini-left { flex: 1; min-width: 0; }

.mini-rank {
  color: rgba(255,255,255,0.1);
  font-size: 16px;
  font-weight: 700;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  transition: color 0.3s ease;
}

.mini-card:hover .mini-rank { color: #64ffda; }

.mini-date {
  display: block;
  color: rgba(255,255,255,0.25);
  font-size: 10px;
  margin-bottom: 1px;
}

.mini-title {
  color: #d4d4d8;
  font-size: 12.5px;
  line-height: 1.4;
  transition: color 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mini-card:hover .mini-title { color: #64ffda; }

.mini-stats {
  color: rgba(255,255,255,0.3);
  font-size: 11px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.mini-stats span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.mini-stats .hl { color: #64ffda; font-weight: 500; }
.mini-stats .hl-like { color: #fb7185; font-weight: 500; }
.mini-stats .hl-fav { color: #fbbf24; font-weight: 500; }

/* ====== 联系页 ====== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-top: 10px;
}

.contact-item-card {
  text-align: center;
  padding: 32px 20px;
  animation: fadeUp 0.6s ease backwards;
}

.contact-item-card:nth-child(1) { animation-delay: 0.15s; }
.contact-item-card:nth-child(2) { animation-delay: 0.25s; }
.contact-item-card:nth-child(3) { animation-delay: 0.35s; }

.contact-icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}

.contact-label {
  color: rgba(255,255,255,0.3);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

.contact-value {
  color: #d4d4d8;
  font-size: 16px;
  text-decoration: none;
  transition: color 0.3s ease;
}

a.contact-value:hover { color: #64ffda; }

/* ====== 响应式 ====== */
@media (max-width: 1099px) {
  .news-header-row { flex-direction: column; }
  .news-header-right { width: 100%; margin-top: 16px; }
  .news-content-row { flex-direction: column; }
  .news-content-side { width: 100%; }
  .side-stats-card { padding: 16px; }
  .side-stats-card .stat-value { font-size: 16px; }
  .contact-grid { grid-template-columns: 1fr; }
  .mini-rank { display: none; }
}
