/* ===== 黑料吃瓜 - 暗夜紫罗兰主题 ===== */
/* ===== 全局重置与基础 ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #7c3aed #1a1a35;
}

body {
  background: linear-gradient(135deg, #0a0a18 0%, #14142a 50%, #0d0d20 100%);
  color: #e0e0f0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  padding: 0 12px;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* 背景光晕特效 */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.15) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
  animation: floatGlow 15s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle at center, rgba(167, 139, 250, 0.1) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
  animation: floatGlow 20s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 3%) scale(1.1); }
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #14142a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7c3aed, #5b21b6);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #8b5cf6, #7c3aed);
}

/* ===== 链接 ===== */
a {
  color: #a78bfa;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

a:hover {
  color: #c4b5fd;
  text-decoration: none;
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #a78bfa, #8b5cf6);
  transition: width 0.3s ease;
}

a:hover::after {
  width: 100%;
}

/* ===== 标题 ===== */
h1, h2, h3 {
  color: #f0f0ff;
  line-height: 1.3;
  letter-spacing: 0.5px;
}

h2 {
  font-size: 1.9rem;
  margin: 1.5rem 0 1rem;
  border-left: 6px solid #8b5cf6;
  padding-left: 14px;
  position: relative;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), transparent);
  border-radius: 0 8px 8px 0;
}

h3 {
  font-size: 1.3rem;
  margin: 1rem 0 0.5rem;
  position: relative;
}

/* ===== 容器布局 ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 20px 0;
}

main {
  flex: 2;
  min-width: 300px;
  animation: fadeInUp 0.8s ease;
}

aside {
  flex: 1;
  min-width: 260px;
  animation: fadeInUp 1s ease;
}

/* ===== 卡片 ===== */
.card {
  background: rgba(24, 24, 53, 0.7);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(45, 45, 85, 0.6);
  border-radius: 16px;
  padding: 18px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}

.card:hover {
  border-color: #7c3aed;
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.2);
}

.card:hover::before {
  left: 100%;
}

/* ===== 网格卡片 ===== */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.grid-cards .card {
  text-align: center;
  animation: fadeInUp 0.6s ease backwards;
}

.grid-cards .card:nth-child(1) { animation-delay: 0.1s; }
.grid-cards .card:nth-child(2) { animation-delay: 0.2s; }
.grid-cards .card:nth-child(3) { animation-delay: 0.3s; }
.grid-cards .card:nth-child(4) { animation-delay: 0.4s; }
.grid-cards .card:nth-child(5) { animation-delay: 0.5s; }
.grid-cards .card:nth-child(6) { animation-delay: 0.6s; }
.grid-cards .card:nth-child(7) { animation-delay: 0.7s; }
.grid-cards .card:nth-child(8) { animation-delay: 0.8s; }
.grid-cards .card:nth-child(9) { animation-delay: 0.9s; }
.grid-cards .card:nth-child(10) { animation-delay: 1s; }
.grid-cards .card:nth-child(11) { animation-delay: 1.1s; }
.grid-cards .card:nth-child(12) { animation-delay: 1.2s; }

/* ===== 图片 ===== */
img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  background: linear-gradient(135deg, #1c1c3a, #2d2d55);
  display: block;
  margin-bottom: 12px;
  transition: all 0.4s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card:hover img {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
}

/* ===== 徽章 ===== */
.badge {
  background: linear-gradient(135deg, #2d2d55, #3d3d6e);
  color: #d0d0e8;
  padding: 4px 10px;
  border-radius: 30px;
  font-size: 0.75rem;
  display: inline-block;
  margin-top: 8px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  transition: all 0.3s ease;
}

.badge:hover {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: white;
  transform: scale(1.05);
}

/* ===== 按钮组 ===== */
.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0;
}

.btn {
  background: linear-gradient(145deg, #7c3aed, #6d28d9);
  color: #ffffff;
  padding: 12px 28px;
  border-radius: 40px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
  letter-spacing: 0.5px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover {
  background: linear-gradient(145deg, #8b5cf6, #7c3aed);
  text-decoration: none;
  color: white;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.5);
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:active {
  transform: translateY(-1px) scale(0.98);
}

/* ===== 评论 ===== */
.comment-item {
  border-bottom: 1px solid rgba(45, 45, 85, 0.6);
  padding: 14px 0;
  transition: all 0.3s ease;
  animation: fadeInLeft 0.5s ease backwards;
}

.comment-item:nth-child(1) { animation-delay: 0.1s; }
.comment-item:nth-child(2) { animation-delay: 0.2s; }
.comment-item:nth-child(3) { animation-delay: 0.3s; }
.comment-item:nth-child(4) { animation-delay: 0.4s; }
.comment-item:nth-child(5) { animation-delay: 0.5s; }
.comment-item:nth-child(6) { animation-delay: 0.6s; }
.comment-item:nth-child(7) { animation-delay: 0.7s; }
.comment-item:nth-child(8) { animation-delay: 0.8s; }
.comment-item:nth-child(9) { animation-delay: 0.9s; }
.comment-item:nth-child(10) { animation-delay: 1s; }
.comment-item:nth-child(11) { animation-delay: 1.1s; }
.comment-item:nth-child(12) { animation-delay: 1.2s; }

.comment-item:last-child {
  border-bottom: none;
}

.comment-item:hover {
  background: rgba(139, 92, 246, 0.05);
  padding-left: 12px;
  padding-right: 12px;
  border-radius: 8px;
}

.username {
  color: #a78bfa;
  font-weight: 600;
  font-size: 1.05rem;
}

.time {
  color: #8888aa;
  font-size: 0.8rem;
  margin-left: 12px;
}

/* ===== 元信息 ===== */
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0;
}

/* ===== 头部与底部 ===== */
.header, .footer {
  background: rgba(13, 13, 32, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 24px;
  padding: 18px 24px;
  margin: 20px 0;
  border: 1px solid rgba(45, 45, 85, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 10;
}

.header {
  position: sticky;
  top: 12px;
  z-index: 100;
}

/* ===== 导航链接 ===== */
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: #d0d0e8;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  color: #a78bfa;
  background: rgba(139, 92, 246, 0.1);
  text-decoration: none;
}

.nav-links a:hover::after {
  width: 0;
}

.active-link {
  color: #8b5cf6 !important;
  background: rgba(139, 92, 246, 0.15);
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.2);
}

/* ===== 侧边栏 ===== */
aside .card {
  margin-bottom: 24px;
  background: rgba(20, 20, 46, 0.7);
  border-color: rgba(45, 45, 85, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

aside h3 {
  font-size: 1.3rem;
  border-bottom: 2px solid #8b5cf6;
  padding-bottom: 8px;
  margin-bottom: 16px;
  position: relative;
}

aside h3::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50%;
  height: 2px;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

aside ul {
  list-style: none;
  color: #d0d0e8;
}

aside li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(45, 45, 85, 0.3);
  transition: all 0.3s ease;
  cursor: default;
}

aside li:last-child {
  border-bottom: none;
}

aside li:hover {
  padding-left: 8px;
  color: #a78bfa;
}

/* ===== 页脚 ===== */
.footer {
  background: rgba(10, 10, 24, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: center;
  color: #8888aa;
  font-size: 0.9rem;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
}

.footer a {
  color: #a78bfa;
}

.friend-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin: 16px 0;
}

.friend-links span {
  color: #b0b0d0;
  transition: all 0.3s ease;
}

.friend-links span:hover {
  transform: translateY(-3px);
  color: #a78bfa;
}

/* ===== 特色区块 ===== */
#intro, #platform {
  background: rgba(22, 22, 48, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 24px;
  border-radius: 20px;
  margin-top: 48px;
  border: 1px solid rgba(45, 45, 85, 0.5);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

#intro::before, #platform::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa, #8b5cf6);
  background-size: 200% 100%;
  animation: gradientMove 3s linear infinite;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

#intro:hover, #platform:hover {
  border-color: #7c3aed;
  box-shadow: 0 8px 40px rgba(124, 58, 237, 0.15);
}

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ===== 滚动观察动画 ===== */
@media (prefers-reduced-motion: no-preference) {
  .grid-cards .card,
  .comment-item,
  #intro,
  #platform {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
  }
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
  .container {
    gap: 16px;
  }
  
  .grid-cards {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 0 8px;
  }
  
  .header {
    padding: 14px 16px;
    top: 8px;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .container {
    flex-direction: column;
  }
  
  .grid-cards {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }
  
  .card {
    padding: 14px;
  }
  
  .btn {
    padding: 10px 24px;
    font-size: 1rem;
  }
  
  .nav-links {
    gap: 12px;
    margin-top: 12px;
  }
  
  .btn-group {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .grid-cards {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }
  
  .grid-cards .card p {
    font-size: 0.85rem;
  }
  
  .badge {
    font-size: 0.7rem;
    padding: 3px 8px;
  }
  
  .friend-links {
    gap: 12px;
  }
  
  .comment-item {
    padding: 12px 0;
  }
  
  .time {
    display: block;
    margin-left: 0;
    margin-top: 4px;
  }
}

/* 深色模式增强 */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, #08081a 0%, #10102a 50%, #0a0a20 100%);
  }
  
  .card {
    background: rgba(18, 18, 40, 0.8);
  }
  
  .header, .footer {
    background: rgba(8, 8, 20, 0.9);
  }
}

/* 滚动进度条 */
body::scrollbar {
  width: 8px;
}

/* 打印样式 */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .card {
    background: white;
    border: 1px solid #ddd;
    box-shadow: none;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
  
  body::before, body::after {
    display: none;
  }
}

/* 无障碍 - 焦点可见性 */
:focus-visible {
  outline: 2px solid #8b5cf6;
  outline-offset: 2px;
  border-radius: 4px;
}

/* 选择文本颜色 */
::selection {
  background: rgba(139, 92, 246, 0.3);
  color: #ffffff;
}

/* 文章段落间距 */
section p {
  margin-bottom: 12px;
}

/* 侧边栏统计数字高亮 */
aside .card p {
  padding: 6px 0;
  border-bottom: 1px solid rgba(45, 45, 85, 0.3);
  transition: all 0.3s ease;
}

aside .card p:last-child {
  border-bottom: none;
}

aside .card p:hover {
  padding-left: 8px;
  color: #a78bfa;
}

/* 页脚版权区域 */
.footer div:last-child p {
  margin: 6px 0;
}

/* 页脚链接样式 */
.footer a:hover {
  color: #c4b5fd;
  text-shadow: 0 0 10px rgba(167, 139, 250, 0.5);
}