/* Reset and global styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}
body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  background-color: #121212;
  color: #e0e0e0;
  line-height: 1.6;
  min-height: 100vh;
}
header {
  background: linear-gradient(135deg, #ff6f91, #ff9671);
  color: #fff;
  padding: 1.5rem 2rem;
  text-align: center;
  flex-shrink: 0;
}
.main-content {
  flex: 1 0 auto;
  width: 100%;
}
.hero {
  position: relative;
  height: 320px;
  overflow: hidden;
  z-index: 1;
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.65);
  transition: transform 0.5s ease;
}
.hero img:hover { transform: scale(1.05); }
.profile {
  display: flex;
  align-items: center;
  padding: 1.5rem 2rem;
  background: #1e1e1e;
  margin: -40px auto 2rem;
  width: 90%;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  position: relative;
  z-index: 2;
}
.profile img {
  border-radius: 50%;
  width: 90px;
  height: 90px;
  margin-right: 1.5rem;
  border: 4px solid #ff6f91;
}
.post {
  background: #1e1e1e;
  padding: 1.5rem 2rem;
  width: 90%;
  margin: auto;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  margin-bottom: 2rem;
}
.post h3 { margin-bottom: 1rem; color: #ff9671; }

/* 三栏布局容器 - 默认多列并排 */
.categories-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  width: 90%;
  margin: 2rem auto;
  justify-content: center;
}
.category-column {
  flex: 1 1 300px;
  background: #1e1e1e;
  padding: 1.5rem 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  min-width: 280px;
}
.category-column h2 {
  color: #ff9671;
  margin-bottom: 1rem;
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
}
.category-scroll {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 5px;
}
.category-scroll::-webkit-scrollbar {
  width: 6px;
}
.category-scroll::-webkit-scrollbar-thumb {
  background: #ff6f91;
  border-radius: 3px;
}

/* 移动端横向滑动 */
@media (max-width: 768px) {
  .categories-container {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory; /* 滑动吸附效果 */
  }
  .category-column {
    flex: 0 0 auto;
    width: 80%;
    max-width: 320px;
    scroll-snap-align: start;
  }
}

/* 文章列表通用样式 */
.posts-list {
  list-style: none;
}
.post-item {
  padding: 1rem 0;
  border-bottom: 1px dashed #333;
}
.post-item:last-child { border-bottom: none; }
.post-title {
  font-size: 1.3rem;
  color: #ff6f91;
  text-decoration: none;
  font-weight: bold;
}
.post-title:hover { text-decoration: underline; }
.post-date {
  display: inline-block;
  margin-left: 1rem;
  color: #aaa;
  font-size: 0.9rem;
}
.post-summary {
  color: #ccc;
  margin-top: 0.3rem;
}

/* 文章详情页 */
.post-detail {
  flex: 1 0 auto;
  max-width: 800px;
  margin: 2rem auto;
  background: #1e1e1e;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  width: 100%;
}
.detail-title {
  color: #ff9671;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.detail-meta {
  color: #aaa;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}
.detail-content {
  color: #ddd;
  line-height: 1.8;
  margin-bottom: 2rem;
}
/* 图片样式 */
.post-image {
  margin: 20px 0;
  text-align: center;
}
.post-image img {
  max-width: 100%;
  max-height: 400px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.back-link a {
  color: #ff6f91;
  text-decoration: none;
}
.back-link a:hover { text-decoration: underline; }

footer {
  background: #1e1e1e;
  color: #aaa;
  padding: 1rem 2rem;
  text-align: center;
  flex-shrink: 0;
}
#floating-box {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0,0,0,0.7);
  border: 1px solid #ff6f91;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 1000;
}