/* PanAsia-style home layout (works with Tailwind utilities on the same page) */
.panasia-home {
  background: #141414;
  color: #fff;
  min-height: 100vh;
}

.panasia-home a {
  color: inherit;
  text-decoration: none;
}

.panasia-home * {
  box-sizing: border-box;
}

.panasia-site-header {
  background: #141414;
  position: relative;
  z-index: 10;
}

/* 顶栏左侧栏列：与下方菜单同宽；图标在左、站名在右（与全站 .pm-logo 横排一致） */
.panasia-site-header .panasia-rail {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 64px;
}

.panasia-site-header .panasia-rail .panasia-header-logo.pm-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  margin: 0;
  gap: 10px;
  text-align: left;
  text-decoration: none;
}

.panasia-site-header .panasia-rail .panasia-header-logo.pm-logo img {
  flex-shrink: 0;
  max-height: 40px;
  width: auto;
  max-width: 44px;
  display: block;
  object-fit: contain;
}

.panasia-site-header .panasia-rail .panasia-header-logo .pm-logo-text {
  flex: 1;
  min-width: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--iq-text, #e6e6e6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panasia-site-header .panasia-rail .panasia-header-logo .pm-logo-text span {
  color: var(--iq-green, #00e7e7);
}

.panasia-center--header {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.panasia-header-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 32px;
  width: 100%;
}

.panasia-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 32px;
  margin-left: auto;
  flex-shrink: 0;
}

.panasia-btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 18px;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.panasia-btn-save {
  background: #434343;
  border: 1px solid #3b3b3d;
  color: #fff;
}

.panasia-btn-app {
  background: #00e7e7;
  color: #084949;
}

.panasia-main-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 0 32px 32px 0;
  max-width: 1920px;
  margin: 0 auto;
}

.panasia-main-row.panasia-main-row--header {
  align-items: center;
  padding: 32px 32px 32px 0;
}

.panasia-rail {
  flex: 0 0 105px;
  width: 105px;
  margin-left: 40px;
  margin-right: 105px;
  padding-top: 0;
  align-self: flex-start;
}

.panasia-rail-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  margin-bottom: 40px;
  font-size: 22px;
  line-height: 1.2;
}

.panasia-rail-link img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.panasia-rail-link.is-active {
  color: #00e7e7;
}

.panasia-rail-link:not(.is-active) {
  color: #9e9e9e;
}

.panasia-center {
  flex: 1;
  min-width: 0;
  align-self: flex-start;
}

/* 搜索：样式同原稿；在顶栏内容区内铺满宽度，与下方视频卡片左右对齐 */
.panasia-search-form {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}

.panasia-header-bar .panasia-search-form {
  min-width: 200px;
}

.panasia-search-form input {
  width: 100%;
  height: 64px;
  border-radius: 90px;
  border: none;
  background: #2c2c2c;
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  padding: 18px 58px 18px 31px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.panasia-search-form input::placeholder {
  color: #9b9998;
  opacity: 1;
}

.panasia-search-form button {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent url("../images/img3.png") center / contain no-repeat;
  cursor: pointer;
  text-indent: -9999px;
  overflow: hidden;
}

.panasia-icon-actions {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  flex-shrink: 0;
}

.panasia-icon-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 56px;
  text-align: center;
  font-size: 14px;
  color: #9e9e9e;
}

.panasia-icon-action img {
  width: 24px;
  height: 24px;
}

.panasia-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 32px;
  margin: 0 0 32px;
  padding: 0;
  min-height: 48px;
  width: 100%;
}

.panasia-pill {
  min-width: 128px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #2c2c2c;
  color: #9b9998;
  font-size: 20px;
  padding: 0 16px;
}

.panasia-pill:hover {
  color: #fff;
}

.panasia-card-rows {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.panasia-card-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  width: 100%;
  justify-items: stretch;
}

@media (min-width: 640px) {
  .panasia-card-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .panasia-card-row {
    grid-template-columns: repeat(6, minmax(0, 253px));
    justify-content: start;
    justify-items: stretch;
  }
}

.panasia-card {
  width: 100%;
  max-width: 253px;
  margin-left: 0;
  margin-right: 0;
  border-radius: 12px;
  background: #1a1a1a;
  overflow: hidden;
  position: relative;
}

.panasia-card > a {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

@media (max-width: 999px) {
  .panasia-card {
    margin-left: auto;
    margin-right: auto;
  }
}

.panasia-paging-wrap {
  width: 100%;
  padding: 32px 0 0;
}

.panasia-home .pm-pages.mac_pages {
  background: transparent;
}

.panasia-home .pm-pages .page_tip,
.panasia-home .pm-pages .page_link {
  color: #9b9998;
}

.panasia-home .pm-pages .page_link:hover {
  color: #00e7e7;
}

.panasia-home .pm-pages .page_current {
  color: #ffffff;
}

.panasia-card-poster {
  position: relative;
  width: 100%;
  height: 340px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}

.panasia-card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.panasia-card-badges {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 8px 0;
  box-sizing: border-box;
}

.panasia-badge {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 22px;
  padding: 1px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 「最新」：Figma 棕底 + 金橙渐变字 */
.panasia-badge-latest {
  background: #2e1b11;
  border: 1px solid #2e1b11;
}

.panasia-badge-latest-inner {
  display: inline-block;
  font-size: 14px;
  line-height: 19.6px;
  font-weight: 400;
  background: linear-gradient(to right, #fdc349, #ff9c27);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.panasia-badge-new {
  background: #2e1b11;
  border: 1px solid #5c3d24;
  color: #fdc349;
}

.panasia-badge-hd {
  background: #0d3a21;
  border: 1px solid #264e3d;
  color: #77f7a0;
}

.panasia-card-gradient {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.85));
  pointer-events: none;
}

.panasia-card-remarks {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-size: 14px;
  line-height: 19.6px;
  font-weight: 400;
  color: #fff;
  text-align: right;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.panasia-card-body {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  padding: 16px 11px 16px;
  position: relative;
  box-sizing: border-box;
}

/* 片名：Figma 20px / 28px 行高 */
.panasia-card-title {
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  margin: 0 0 6px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 简介：Figma #9b9998、16px、单行省略；与演员行间距由 .panasia-card-people 的 margin-top 控制 */
.panasia-card-sub {
  font-size: 16px;
  font-weight: 400;
  line-height: 22.4px;
  color: #9b9998;
  margin: 0;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panasia-card-sub--empty {
  color: #9b9998;
  opacity: 0.72;
  font-weight: 400;
}

/* 演员：单行；右侧装不下的标签裁掉；每个可见标签完整展示姓名（不缩小、不省略） */
.panasia-card-people {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.panasia-card-people a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex: 0 0 auto;
  height: 20px;
  padding: 0 8px;
  border-radius: 4px;
  background: #2c2c2c;
  color: #ffffff;
  font-size: 14px;
  font-weight: 400;
  line-height: 19.6px;
  text-decoration: none;
  white-space: nowrap;
}

.panasia-card-people a:hover {
  background: #3d3d3d;
  color: #f5f5f5;
}

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
  .panasia-home {
    overflow-x: hidden;
  }

  .panasia-main-row,
  .panasia-main-row.panasia-main-row--header {
    flex-direction: column;
    align-items: stretch;
    padding: 16px 12px 24px;
    max-width: 100%;
  }

  .panasia-main-row.panasia-main-row--header {
    padding-top: 12px;
    padding-bottom: 16px;
    gap: 0;
  }

  /* 顶栏：Logo 独占一行，搜索与按钮在下方 */
  .panasia-site-header .panasia-rail {
    width: 100%;
    max-width: none;
    flex: none;
    margin-left: 0;
    margin-right: 0;
    min-height: auto;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    align-self: stretch;
  }

  .panasia-center--header {
    width: 100%;
  }

  .panasia-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .panasia-header-actions {
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    justify-content: flex-start;
  }

  .panasia-header-bar .panasia-search-form {
    min-width: 0;
    width: 100%;
    order: -1;
  }

  .panasia-search-form input {
    height: 48px;
    font-size: 16px;
    line-height: 24px;
    padding: 12px 52px 12px 20px;
  }

  .panasia-search-form button {
    right: 16px;
    width: 22px;
    height: 22px;
  }

  .panasia-icon-actions {
    gap: 20px;
  }

  .panasia-btn-pill {
    height: 42px;
    padding: 0 16px;
    font-size: 14px;
    flex: 1 1 auto;
    min-width: 0;
  }

  /* 正文：左侧频道改为横向滑动条，避免占满屏高 */
  .panasia-main-row:not(.panasia-main-row--header) {
    padding-top: 0;
  }

  .panasia-main-row:not(.panasia-main-row--header) .panasia-rail {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    max-width: none;
    flex: none;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 16px;
    padding: 4px 0 12px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .panasia-main-row:not(.panasia-main-row--header) .panasia-rail::-webkit-scrollbar {
    display: none;
  }

  .panasia-main-row:not(.panasia-main-row--header) .panasia-rail-link {
    flex: 0 0 auto;
    margin-bottom: 0;
    padding: 10px 14px;
    font-size: 15px;
    border-radius: 999px;
    background: #2c2c2c;
    color: #9e9e9e;
    white-space: nowrap;
  }

  .panasia-main-row:not(.panasia-main-row--header) .panasia-rail-link.is-active {
    background: rgba(0, 231, 231, 0.15);
    color: #00e7e7;
  }

  .panasia-main-row:not(.panasia-main-row--header) .panasia-rail-link img {
    width: 20px;
    height: 20px;
  }

  .panasia-center {
    width: 100%;
    min-width: 0;
  }

  .panasia-pills {
    gap: 10px 12px;
    margin-bottom: 20px;
  }

  .panasia-pill {
    min-width: 0;
    height: 40px;
    font-size: 14px;
    padding: 0 14px;
    flex: 0 0 auto;
  }

  .panasia-card-row {
    gap: 12px;
  }

  .panasia-card-rows {
    gap: 20px;
  }

  .panasia-card {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .panasia-card > a {
    min-height: 0;
  }

  .panasia-card-poster {
    height: auto;
    aspect-ratio: 253 / 340;
  }

  .panasia-card-title {
    font-size: 16px;
    line-height: 22px;
    margin-bottom: 6px;
  }

  .panasia-card-sub {
    font-size: 14px;
    line-height: 20px;
    margin: 0;
  }

  .panasia-card-body {
    padding: 10px 8px 12px;
    min-height: 0;
  }

  .panasia-badge {
    min-height: 20px;
    padding: 1px 6px;
  }

  .panasia-badge-latest-inner {
    font-size: 12px;
    line-height: 17px;
  }

  .panasia-card-remarks {
    font-size: 11px;
    max-width: 55%;
  }

  .panasia-card-people {
    gap: 6px;
  }

  .panasia-card-people a {
    height: 18px;
    font-size: 12px;
    line-height: 17px;
    padding: 0 7px;
  }

  .panasia-paging-wrap {
    padding-top: 20px;
  }

  .panasia-home .pm-pages.mac_pages {
    padding: 0 4px;
  }

  .panasia-home .pm-pages .page_tip {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 10px;
  }

  .panasia-home .pm-pages .page_info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
  }

  .panasia-home .pm-pages .page_link {
    padding: 8px 10px;
    font-size: 14px;
    min-width: 40px;
    text-align: center;
  }

  .panasia-home .pm-pages .page_input {
    width: 56px;
  }
}

@media (max-width: 480px) {
  .panasia-main-row,
  .panasia-main-row.panasia-main-row--header {
    padding-left: 10px;
    padding-right: 10px;
  }

  .panasia-site-header .panasia-rail .panasia-header-logo .pm-logo-text {
    font-size: 14px;
  }

  .panasia-site-header .panasia-rail .panasia-header-logo.pm-logo img {
    max-height: 32px;
    max-width: 36px;
  }

  .panasia-card-row {
    gap: 10px;
  }

  .panasia-pills {
    gap: 8px;
  }

  .panasia-pill {
    height: 36px;
    font-size: 13px;
    padding: 0 12px;
  }
}

/* 本地播放历史（vod/playhistory） */
.panasia-history-page {
  padding-top: 24px;
  padding-bottom: 48px;
}

.panasia-history-main {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.panasia-history-head {
  margin-bottom: 24px;
}

.panasia-history-h1 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 600;
  color: #fff;
}

.panasia-history-note {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: #9b9998;
}

.panasia-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.panasia-history-clear {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: transparent !important;
  color: #eeeeee !important;
}

.panasia-history-empty {
  margin: 32px 0;
  font-size: 15px;
  color: #9b9998;
  text-align: center;
}

.panasia-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.panasia-history-item {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.panasia-history-link {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 14px 40px 14px 0;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

.panasia-history-thumb-wrap {
  width: 72px;
  flex-shrink: 0;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  background: #0d0d0d;
}

.panasia-history-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.panasia-history-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.panasia-history-title {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panasia-history-meta {
  font-size: 13px;
  color: #9b9998;
}

.panasia-history-del {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #9b9998;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.panasia-history-del:hover {
  color: #00e7e7;
  background: rgba(0, 231, 231, 0.12);
}
