:root {
  --gclm-page: #2d2f3c;
  --gclm-deep: #090b18;
  --gclm-panel: #43444a;
  --gclm-purple: #8c118f;
  --gclm-line: #9e47c6;
  --gclm-text: #f7f7fb;
  --gclm-muted: #b8bac5;
  --gclm-cyan: #48cfe8;
  --gclm-green: #67df78;
  --gclm-yellow: #f3e66d;
  --gclm-red: #ed4764;
  --gclm-blue: #5a8edb;
  color-scheme: dark;
  font-family: "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--gclm-page); }
body { min-width: 320px; margin: 0; overflow-x: hidden; background: var(--gclm-page); color: var(--gclm-text); font-size: 16px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.gclm-page { min-height: 100vh; background: var(--gclm-page); }
.gclm-container { width: min(1060px, calc(100% - 24px)); margin: 0 auto; }
.gclm-brandbar { height: 74px; background: var(--gclm-deep); }
.gclm-brandbar .gclm-container { height: 74px; display: flex; align-items: flex-end; padding-bottom: 2px; }
.gclm-logo { display: inline-block; color: #55b8fa; font-family: Impact, "Microsoft YaHei", sans-serif; font-size: 48px; font-weight: 900; line-height: 1; text-shadow: 2px 2px 0 #0b436f, 0 0 3px #91d8ff; white-space: nowrap; }

.gclm-portal { min-height: 74px; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-rows: 30px; gap: 2px; overflow: hidden; padding: 5px; background: var(--gclm-page); }
.gclm-portal a { min-width: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0 5px; border-radius: 5px; background: var(--gclm-purple); color: #fff; font-size: 16px; white-space: nowrap; text-overflow: ellipsis; }
.gclm-portal a:hover { background: #a619aa; }

.gclm-matrix { width: 100%; }
.gclm-matrix-row { min-height: 56px; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); border: 1px solid var(--gclm-line); border-bottom: 0; }
.gclm-matrix-row:last-child { border-bottom: 1px solid var(--gclm-line); }
.gclm-matrix-row a { min-width: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 8px 5px; color: #d666e9; font-size: 16px; white-space: nowrap; text-overflow: ellipsis; }
.gclm-matrix-row a:nth-child(4n+2) { color: var(--gclm-yellow); }
.gclm-matrix-row a:nth-child(4n+3) { color: var(--gclm-green); }
.gclm-matrix-row a:nth-child(4n+4) { color: var(--gclm-red); }
.gclm-matrix-row a:nth-child(4n+5) { color: var(--gclm-cyan); }
.gclm-matrix-row .gclm-row-title { justify-content: flex-start; padding-left: 20px; color: #d95dff; font-weight: 700; }
.gclm-matrix-row:first-child .gclm-row-title { color: var(--gclm-red); }
.gclm-matrix-row a:hover { background: rgba(255, 255, 255, .06); color: #fff; }

.gclm-search { height: 50px; display: flex; margin-top: 3px; overflow: hidden; border-radius: 8px; background: #f5f6f9; }
.gclm-search input { min-width: 0; flex: 1; height: 50px; border: 0; outline: 0; padding: 0 20px; background: #f5f6f9; color: #3d3f49; font-size: 16px; }
.gclm-search button { width: 94px; flex: none; border: 0; background: var(--gclm-blue); color: #fff; font-weight: 700; cursor: pointer; }
.gclm-search button:hover { background: #477bc8; }

.gclm-main { padding-top: 14px; }
.gclm-section-title { margin: 0 0 10px; color: #fff; font-size: 20px; line-height: 1.35; }
.gclm-ranking > .gclm-section-title { font-size: 28px; }
.gclm-tabs { height: 46px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; margin-bottom: 10px; }
.gclm-tabs button { height: 38px; border: 0; border-radius: 8px; background: transparent; color: #fff; font-size: 18px; cursor: pointer; }
.gclm-tabs button.is-active { background: #3d3e49; color: #e66d63; }

.gclm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; padding: 15px 5px; border-radius: 8px; background: var(--gclm-panel); }
.gclm-card { min-width: 0; }
.gclm-card-link { display: block; min-width: 0; }
.gclm-card-media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: #20212a; }
.gclm-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gclm-card-note { position: absolute; right: 5px; bottom: 5px; max-width: calc(100% - 10px); overflow: hidden; padding: 2px 5px; border-radius: 4px; background: rgba(9, 11, 24, .78); color: #fff; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.gclm-card h2 { height: 34px; margin: 4px 4px 0; overflow: hidden; color: #fff; font-size: 14px; font-weight: 400; line-height: 17px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.gclm-hot-grid .gclm-card-media::before { position: absolute; z-index: 2; top: 8px; left: -24px; width: 90px; padding: 3px 0; transform: rotate(-45deg); background: #ff7928; color: #fff; content: "Hot"; font-size: 12px; text-align: center; }
.gclm-list-page, .gclm-related, .gclm-playlists, .gclm-player-section { margin-bottom: 22px; }
.gclm-empty { padding: 60px 20px; border-radius: 8px; background: var(--gclm-panel); color: var(--gclm-muted); text-align: center; }

.gclm-pager { display: flex; justify-content: center; margin: 20px 0; color: #fff; }
.gclm-pager ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.gclm-pager a, .gclm-pager span { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0 9px; border-radius: 6px; background: #3d3e49; }
.gclm-pager .active span, .gclm-pager .current { color: var(--gclm-red); }

.gclm-detail { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 22px; padding: 18px; margin-bottom: 22px; border-radius: 8px; background: var(--gclm-panel); }
.gclm-detail-cover { overflow: hidden; border-radius: 8px; background: #20212a; }
.gclm-detail-cover img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.gclm-detail-copy h1 { margin: 0 0 14px; font-size: 24px; line-height: 1.35; }
.gclm-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 0 0 14px; }
.gclm-meta div { display: flex; gap: 8px; min-width: 0; }
.gclm-meta dt { color: var(--gclm-cyan); }
.gclm-meta dd { min-width: 0; margin: 0; overflow: hidden; color: var(--gclm-muted); white-space: nowrap; text-overflow: ellipsis; }
.gclm-description { max-height: 100px; overflow: hidden; margin: 0; color: #d9d9df; line-height: 1.7; }
.gclm-playline { padding: 14px; margin-bottom: 10px; border: 1px solid var(--gclm-line); border-radius: 8px; }
.gclm-playline h3 { margin: 0 0 10px; color: var(--gclm-yellow); font-size: 16px; }
.gclm-episodes { display: flex; flex-wrap: wrap; gap: 8px; }
.gclm-episodes a { min-width: 64px; padding: 8px 12px; border-radius: 6px; background: #3f4050; color: #fff; text-align: center; }
.gclm-episodes a:hover, .gclm-episodes a.is-current { background: var(--gclm-purple); }
.gclm-player { width: 100%; min-height: 420px; overflow: hidden; border-radius: 8px; background: #000; }
.gclm-player iframe, .gclm-player video { width: 100% !important; min-height: 420px; border: 0; }

.gclm-footer { margin-top: 24px; }
.gclm-footer-shell { padding-bottom: 0; }
.gclm-portal-dynamic { min-height: 74px; }
.gclm-warning { min-height: 95px; padding: 14px 10px; background: var(--gclm-deep); color: #fff; font-size: 14px; line-height: 1.65; }
.gclm-warning p { margin: 0; }

@media (max-width: 820px) {
  .gclm-container { width: 100%; }
  .gclm-brandbar, .gclm-brandbar .gclm-container { height: 64px; }
  .gclm-brandbar .gclm-container { padding: 0 12px 3px; }
  .gclm-logo { font-size: 42px; }
  .gclm-top-shell > .gclm-matrix, .gclm-footer-shell > .gclm-matrix { margin-right: 10px; margin-left: 10px; width: calc(100% - 20px); }
  .gclm-portal { min-height: 116px; max-height: 116px; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 34px; }
  .gclm-portal a { font-size: 15px; }
  .gclm-matrix-row { min-height: 99px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gclm-matrix-row a { padding: 6px 4px; font-size: 14px; }
  .gclm-matrix-row .gclm-row-title { justify-content: center; padding-left: 4px; border-right: 1px solid var(--gclm-line); }
  .gclm-search { height: 56px; margin: 4px 10px 0; }
  .gclm-search input { height: 56px; padding: 0 14px; font-size: 15px; }
  .gclm-search button { width: 78px; }
  .gclm-main { padding: 14px 10px 0; }
  .gclm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gclm-ranking > .gclm-section-title { font-size: 22px; }
  .gclm-tabs button { font-size: 16px; }
  .gclm-detail { grid-template-columns: 1fr; padding: 12px; }
  .gclm-detail-copy h1 { font-size: 20px; }
  .gclm-player, .gclm-player iframe, .gclm-player video { min-height: 220px; }
  .gclm-footer { margin-top: 18px; }
  .gclm-warning { min-height: 0; padding: 12px 14px; font-size: 12px; }
}

@media (max-width: 380px) {
  .gclm-logo { font-size: 38px; }
  .gclm-portal a { font-size: 14px; }
  .gclm-matrix-row a { font-size: 13px; }
}
