
/* 全局 */
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
background: #f8fafc;
color: #333;
}
.container {
max-width: 1200px;
margin: 0 auto;
}


/* 卡片基础样式 */
.bg-white {
background: #fff;
}
.shadow {
box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.shadow-lg {
box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.rounded-xl {
border-radius: 16px;
}
.rounded-md {
border-radius: 8px;
}


/* 间距 */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-10 { margin-top: 2.5rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }


/* 字体 */
.text-center { text-align: center; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-800 { color: #1f2937; }
.text-blue-600 { color: #2563eb; }
.text-blue-800 { color: #1e40af; }


.text-2xl { font-size: 1.5rem; font-weight: bold; }
.text-xl { font-size: 1.25rem; font-weight: bold; }
.text-lg { font-size: 1.125rem; }


/* 图片 */
img {
display: block;
max-width: 100%;
}
.object-cover {
object-fit: cover;
}
.h-40 { height: 10rem; }


/* 布局 */
.grid { display: grid; gap: 1.5rem; }
.grid-cols-1 { grid-template-columns: 1fr; }
.md\:grid-cols-3 { grid-template-columns: 1fr; }


/* 适配大屏 */
@media (min-width: 768px) {
.md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.md\:col-span-2 { grid-column: span 2 / span 2; }
}


/* 链接样式 */
a {
color: inherit;
text-decoration: none;
transition: 0.2s;
}
a:hover {
color: #2563eb;
}


/* 文章卡片 hover */
article:hover {
transform: translateY(-3px);
transition: 0.2s;
}


/* line-clamp 文字两行省略 */
.line-clamp-2 {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  color: #0f0;
  padding: 10px 0;
  background: rgba(220, 220, 220, 0.3);
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px; /* 增大心形和文字间距 */
}

.heart-small {
  display: inline-block;
  position: relative;
  width: 12px;  /* 缩小心形尺寸 */
  height: 12px;
  background: red;
  transform: rotate(-45deg);
  transform-origin: center;
  animation: heartbeat 1s ease-in-out infinite;
}

.heart-small::before,
.heart-small::after {
  content: "";
  position: absolute;
  width: 12px;  /* 相应缩小 */
  height: 12px;
  background: red;
  border-radius: 50%;
}

.heart-small::before {
  top: -6px;  /* 调整为心形尺寸的一半 */
  left: 0;
}

.heart-small::after {
  top: 0;
  left: 6px;  /* 调整为心形尺寸的一半 */
}

@keyframes heartbeat {
  0%, 100% { transform: rotate(-45deg) scale(1); }
  50% { transform: rotate(-45deg) scale(1.3); }
}

/* 添加时间显示样式 */
.time-display {
  position: fixed;
  bottom: 3px;
  right: 10px;
  color: #0f0;
  font-family: monospace;
  font-size: 14px;
  z-index: 10;
  background: #000;
  padding: 5px 6px;
  border-radius: 4px;
  border: 1px solid #00ff00;
  width: 260px; /* 固定宽度 */
  overflow: hidden; /* 隐藏超出部分 */
}

.time-text {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 10s linear infinite;
}

@keyframes marquee {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* 新增代码雨样式 */
.code-rain-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -5; /* 放在内容层后面 */
  overflow: hidden;
}

.code-rain-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.code-rain-filter {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: #fe5757;
  animation: colorChange 30s ease-in-out infinite;
  animation-fill-mode: both;
  mix-blend-mode: overlay;
  opacity: 0;
}

@keyframes colorChange {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.9; }
}
