/* ==========================================================================
   1. 全局变量与基础重置 (Global Variables & Reset)
   ========================================================================== */
:root {
  --bg-color: #0f0f11;         /* 主背景色：深色近纯黑 */
  --card-bg: #18181c;          /* 卡片背景色 */
  --text-main: #ffffff;        /* 纯白主标题文字 */
  --text-sub: #888888;         /* 浅灰次要文字 */
  --accent-color: #FFD21C;     /* 高亮金品牌色 */
  --border-color: #1f1f23;     /* 微弱边框颜色 */
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================================================
   2. 1:1 还原顶栏样式 (Header Navigation Bar)
   ========================================================================== */
.header-box {
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 64px;
}

.header-left {
  display: flex;
  align-items: center;
}

/* Logo 布局 */
.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.logo-text-group {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 16px;
  font-weight: bold;
  color: var(--text-main);
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.logo-sub {
  font-size: 10px;
  color: var(--text-sub);
  border-bottom: 1px solid #444;
  display: inline-block;
  padding-bottom: 1px;
  margin-top: 2px;
}

/* 导航菜单布局 */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  margin: 0 0 0 28px;
  padding: 0;
}

.nav-item a {
  font-size: 14px;
  color: #cccccc;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 20px;
  transition: all 0.2s ease;
  display: inline-block;
  white-space: nowrap;
}

.nav-item a:hover {
  color: var(--accent-color);
}

/* 选中状态：高亮金胶囊按钮 */
.nav-item a.active-pill {
  background-color: var(--accent-color);
  color: #000000 !important;
  font-weight: bold;
}

/* 右侧搜索与用户中心 */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-form {
  display: flex;
  align-items: center;
  background: #1a1a1f;
  border: 1px solid #2d2d35;
  border-radius: 20px;
  padding: 4px 6px 4px 14px;
  width: 220px;
}

.search-input {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 13px;
  width: 100%;
  outline: none;
}

.search-input::placeholder {
  color: #777777;
}

.search-btn {
  background: transparent;
  border: none;
  color: #a0a0a0;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  white-space: nowrap;
  transition: color 0.2s;
}

.search-btn:hover {
  color: var(--accent-color);
}

.user-center-link {
  font-size: 14px;
  color: #cccccc;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.user-center-link:hover {
  color: var(--accent-color);
}

/* ==========================================================================
   3. 首页与通用容器/网格布局 (Home Container & Grid Layout)
   ========================================================================== */
/* 模块标题栏工具条 (匹配两边 60px 间距) */
.home-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 36px 60px 12px 60px;
  max-width: 1920px;
  margin: 0 auto;
  box-sizing: border-box;
}

.home-title {
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: bold;
  color: var(--text-main);
  gap: 8px;
}

.home-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

/* 核心网格布局 (单排 5 列, 严格对齐间距) */
.desktop-home-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px 18px;
  padding: 12px 60px;
  max-width: 1920px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ==========================================================================
   4. 短剧卡片与 9:16 竖屏海报 (Short Drama Card & Poster)
   ========================================================================== */
.home-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* 强制 9:16 黄金比例 */
.card-cover-box {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #222222;
}

.card-cover-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 角标与渐变层 */
.badge-top-left {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #00c853;
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-bottom-heat {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 10px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
}

/* 卡片下方文字与标签 */
.card-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-title {
  font-size: 15px;
  font-weight: bold;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-desc {
  font-size: 12px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tag-item {
  font-size: 11px;
  color: var(--accent-color);
  background: rgba(255, 210, 28, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 210, 28, 0.2);
}

.tag-item.gray {
  color: #a0a0a0;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   5. 响应式适配微调 (Responsive Adjustments)
   ========================================================================== */
@media (max-width: 1200px) {
  .home-toolbar,
  .desktop-home-grid {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 900px) {
  .desktop-home-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 10px;
  }
  .search-form {
    width: 140px;
  }
}

@media (max-width: 600px) {
  .desktop-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav-menu {
    display: none; /* 移动端隐藏过长导航菜单或换为横向滚动 */
  }
}
/* ==========================================================================
   1. 1:1 原站悬停扫光特效 (Light Sweep Effect on Hover)
   ========================================================================== */
/* 海报容器必须设置 overflow: hidden 和 relative */
.poster-wrapper {
    position: relative;
    overflow: hidden;
}

/* 扫光伪元素定义 */
.poster-wrapper::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -150%;
    width: 60%;
    height: 200%;
    /* 45度倾斜的高亮白色渐变光束 */
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    pointer-events: none;
    z-index: 3;
    transition: none;
}

/* 悬停时触发从左上到右下的划光动画 */
.drama-card-item:hover .poster-wrapper::after {
    left: 150%;
    transition: all 0.75s ease-in-out;
}

/* 卡片悬停微放大与发光效果 */
.drama-card-item {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.drama-card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 210, 28, 0.15); /* 带有微弱金光效果 */
}

/* 海报图片轻微放大 */
.drama-card-item:hover .poster-wrapper img {
    transform: scale(1.04);
    transition: transform 0.3s ease;
}

.poster-wrapper img {
    transition: transform 0.3s ease;
}


/* ==========================================================================
   2. 完美适配各类屏幕的响应式断点 (Responsive Breakpoints)
   ========================================================================== */
/* 1. 超大屏/大屏 (1920px 及以上)：保持原生两边 60px 间距，单排 5 列 */
@media (min-width: 1440px) {
    .home-toolbar, .home-grid-box {
        padding-left: 60px;
        padding-right: 60px;
    }
}

/* 2. 中等屏幕/笔记本 (1024px ~ 1439px)：内边距微调，依然保持 5 列 */
@media (max-width: 1439px) and (min-width: 1024px) {
    .home-toolbar, .home-grid-box {
        padding-left: 32px;
        padding-right: 32px;
    }
    .grid-5-col {
        gap: 16px 14px;
    }
}

/* 3. 平板/小屏幕 PC (768px ~ 1023px)：自适应为单排 3 或 4 列 */
@media (max-width: 1023px) and (min-width: 768px) {
    .home-toolbar, .home-grid-box {
        padding-left: 20px;
        padding-right: 20px;
    }
    .grid-5-col {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px 12px;
    }
    .search-form {
        width: 160px;
    }
}

/* 4. 移动端手机屏 (767px 及以下)：自适应为单排 2 列 */
@media (max-width: 767px) {
    .header-box {
        padding: 0 12px;
        height: 56px;
    }
    .logo-sub {
        display: none; /* 移动端隐藏小二级域名 */
    }
    .nav-menu {
        display: none; /* 移动端隐藏长导航 */
    }
    .home-toolbar {
        padding: 20px 16px 8px 16px;
    }
    .home-title-text {
        font-size: 17px;
    }
    .home-grid-box {
        padding: 0 16px 24px 16px;
    }
    .grid-5-col {
        grid-template-columns: repeat(2, minmax(0, 1fr)); /* 竖屏短剧 2 列黄金组合 */
        gap: 12px 10px;
    }
    .card-info {
        padding: 8px;
    }
    .card-title {
        font-size: 13px;
    }
    .card-actor {
        font-size: 11px;
    }
    .search-form {
        width: 120px;
        padding: 2px 4px 2px 10px;
    }
}
/* ==========================================================================
   暗色高亮金翻页组件 (Pagination Styling)
   ========================================================================== */
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: #18181c;
    color: #cccccc;
    border: 1px solid #282830;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
    user-select: none;
}

/* 鼠标悬停 */
a.page-btn:hover {
    background: #22222a;
    color: #FFD21C;
    border-color: #FFD21C;
}

/* 当前高亮页码 */
.page-btn.active {
    background: #FFD21C;
    color: #000000;
    border-color: #FFD21C;
    font-weight: bold;
}

/* 不可点击状态 */
.page-btn.disabled {
    color: #444444;
    background: #121215;
    border-color: #1f1f25;
    cursor: not-allowed;
}