/* 古风竖排文字样式 */
.classical-quote {
    writing-mode: vertical-rl; /* 关键：设置为垂直从右到左书写 */
    text-orientation: upright;
    font-family: 'KaiTi', 'STKaiti', '楷体', serif; /* 使用楷体，更具古典美 */
    font-size: 1.2rem; /* 调整字体大小 */
    line-height: 2.5; /* 调整行间距 */
    margin: 2rem auto; /* 上下留白，并水平居中 */
    padding: 1.5rem 2rem;
    border-right: 2px solid #a0a0a0; /* 右侧（现在是顶部）添加一条边框线 */
    border-left: 2px solid #a0a0a0; /* 左侧（现在是底部）添加一条边框线 */
    height: 350px; /* 需要手动设置一个高度 */
    display: inline-block; /* 允许通过 margin: auto 居中 */
}

.classical-quote p {
    margin-right: 1.5rem; /* 段落间距（在竖排模式下是左右间距）*/
    letter-spacing: 0.1rem; /* 调整字间距 */
}

/* 手动创建的友链/卡片页面的样式 */
.card-friends-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); /* 响应式布局 */
  gap: 20px; /* 卡片之间的间距 */
  margin-top: 20px;
}

.friend-card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--card-box-shadow);
  transition: all 0.3s ease-in-out;
  border: 1px solid var(--card-border);
}

.friend-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.friend-card a {
  display: flex;
  align-items: center;
  padding: 15px;
  text-decoration: none;
  color: var(--font-color);
}

.friend-card .avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%; /* 圆形头像 */
  object-fit: cover;
  margin-right: 15px;
  border: 2px solid var(--heo-main); /* 头像边框颜色，可自定义 */
}

.friend-card .info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1; /* 占据剩余空间 */
  overflow: hidden;
}

.friend-card .name {
  font-size: 1.1rem;
  font-weight: bold;
  white-space: nowrap; /* 名字不换行 */
  overflow: hidden;
  text-overflow: ellipsis; /* 超出部分显示省略号 */
}

.friend-card .desc {
  font-size: 0.9rem;
  color: var(--font-color-light);
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== 卡片通用容器 ===== */
.card-list-container {
  display: grid;
  /* 自动填充，最小宽度260px，最大平分 */
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px; /* 卡片间距 */
  margin-top: 20px;
}

/* ===== 卡片通用基础样式 (用于继承) ===== */
.custom-card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--card-box-shadow);
  transition: all 0.3s ease-in-out;
  border: 1px solid var(--card-border);
  overflow: hidden; /* 防止内容溢出 */
}

.custom-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.custom-card a {
  display: block; /* a 标签占满整个卡片 */
  text-decoration: none;
  color: var(--font-color);
}

.custom-card .info {
  padding: 15px;
}

.custom-card .name {
  font-size: 1.1rem;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-card .desc {
  font-size: 0.9rem;
  color: var(--font-color-light);
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== 1. 电影卡片样式 (长方形海报) ===== */
.film-card .cover {
  width: 100%;
  height: 380px; /* 调整此高度以适应电影海报比例 */
  object-fit: cover; /* 保持比例，裁剪多余部分 */
}

/* ===== 2. 音乐/相册卡片样式 (正方形封面) ===== */
.music-card .cover,
.photo-card .cover {
  width: 100%;
  /* 高度和宽度相等，实现正方形 */
  aspect-ratio: 1 / 1;
  object-fit: cover;
}