:root {
  --bg: #1e1e1e;
  --panel: #262626;
  --panel-2: #2e2e2e;
  --muted: #909090;
  --text: #f7d0bf;
  --accent: #ff0048;
  --lime: #8ce600;
  --line: #3a3a3a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--muted);
  font: 14px/1.5 "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  overflow-wrap: break-word;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.tx-wide { width: 100%; padding: 0 2%; margin: 0 auto; }

.site-header {
  width: 100%; max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(190px, 1fr) auto minmax(280px, 360px);
  align-items: center; gap: 18px; padding: 20px 0;
}
.brand { flex: 0 0 auto; line-height: .92; text-align: left; }
.brand a { display: inline-flex; flex-direction: column; align-items: flex-start; }
.brand-main { display: block; max-width: min(90vw, 720px); color: #72c644; font: 700 clamp(18px, 2.8vw, 34px)/1.05 Georgia, "Microsoft YaHei", sans-serif; letter-spacing: 0; overflow-wrap: anywhere; text-align: left; text-shadow: 0 0 10px #24431b; }
.brand-sub { display: block; max-width: min(90vw, 720px); color: #b8e88f; font: 600 clamp(16px, 2vw, 24px)/1.25 Arial, "Microsoft YaHei", sans-serif; letter-spacing: .06em; margin: 5px 0 0; overflow-wrap: anywhere; text-align: left; }
.nav { display: flex; justify-content: center; align-items: center; flex-wrap: nowrap; gap: 2px; }
.nav-item { min-width: 62px; padding: 0 10px; display: inline-flex; flex-direction: column; align-items: center; color: var(--text); transition: color .2s ease, transform .2s ease; }
.nav-item:hover, .nav-item.is-active { color: #fff; transform: translateY(-2px); }
.nav-icon { font-size: 25px; line-height: 1; margin-bottom: 4px; color: #f0c5b6; }
.nav-item.is-active .nav-icon { color: var(--accent); }
.nav-home { min-width: 78px; font-size: 16px; font-weight: 700; }
.nav-home .nav-icon { font-size: 30px; }
.nav-sponsor .nav-icon { color: #ffcf66; }
.search { position: relative; flex: 0 0 400px; max-width: 100%; height: 62px; display: flex; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.search-icon { position: absolute; left: 12px; top: 0; color: var(--text); font-size: 28px; line-height: 62px; }
.search input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; padding: 0 92px 0 42px; }
.search input::placeholder { color: #777; }
.search button { width: 80px; flex: 0 0 80px; border: 0; color: var(--text); background: #3a3636; cursor: pointer; transition: background .2s ease; }
.search button:hover { background: var(--accent); color: #fff; }

.category-panel { margin: 12px 0 0; max-width: none; }
.category-row { display: grid; grid-template-columns: 12% repeat(8, minmax(0, 1fr)); align-items: center; padding: 14px 0; border-bottom: 1px solid #a8003d; }
.category-row:first-child { border-top: 1px solid var(--accent); }
.category-row dt { width: auto; min-width: 0; font-size: 17px; line-height: 1.5; font-weight: 700; color: #ff2b63; letter-spacing: .05em; text-align: center; text-shadow: 0 1px 0 #000; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.category-row dd { width: auto; min-width: 0; margin: 0; font-size: 16px; text-align: center; color: var(--text); }
.category-row a:hover { color: var(--lime); }

.link-panel { margin: 18px 0; }
.block-title, .section-head h2 { margin: 0 0 16px; color: #9a9a9a; text-align: center; font-size: 24px; }
.link-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.link-card { min-width: 0; min-height: 42px; display: grid; place-items: center; padding: 4px 6px; border-radius: 6px; background: var(--panel-2); text-align: center; font-size: 15px; line-height: 1.35; color: var(--lime); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: transform .2s ease, background .2s ease; }
.link-card:nth-child(4n+1), .link-card:nth-child(8n) { color: #fff; }
.link-card:nth-child(4n) { color: #df4134; }
.link-card:hover { background: #3b3b3b; transform: translateY(-2px); }
.sponsor-links .link-card, .partner-links .link-card { color: #fff; }
.sponsor-links .link-card:nth-child(5n+1), .partner-links .link-card:nth-child(5n+1) { color: #8ce600; }
.sponsor-links .link-card:nth-child(5n+2), .partner-links .link-card:nth-child(5n+2) { color: #ffcf66; }
.sponsor-links .link-card:nth-child(5n+3), .partner-links .link-card:nth-child(5n+3) { color: #63d7ff; }
.sponsor-links .link-card:nth-child(5n+4), .partner-links .link-card:nth-child(5n+4) { color: #ff6b8a; }

.content-section { max-width: 1200px; margin: 0 auto 28px; }
.tags-section { padding-top: 2px; }
.tag-wrap { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tag { border: 1px solid #f90; border-radius: 5px; padding: 8px 9px; color: #a2a2a2; font-weight: 700; transition: background .2s ease, color .2s ease; }
.tag:hover, .tag.is-selected { background: #f90; color: #000; }
.tags-section .section-head h2 { margin-bottom: 10px; font-size: 20px; }
.tags-section .tag-wrap { gap: 6px; }
.tags-section .tag { padding: 6px 8px; font-size: 13px; border-radius: 4px; }
.notice { margin: 22px auto 28px; padding: 13px 16px; border: 1px solid #4c3038; border-radius: 6px; color: #b4a4a4; background: #241f20; display: flex; gap: 12px; align-items: baseline; }
.notice strong { color: var(--accent); white-space: nowrap; }
.slot-note { color: #686868; font-size: 12px; }

.catalog-section { width: 100%; margin: 0 auto 32px; max-width: none; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.section-title-row h2 { margin: 0; color: var(--text); font-size: 18px; }
.more { color: var(--accent); font-size: 14px; }
.card-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 12px; }
.media-card { min-width: 0; }
.thumb { position: relative; display: block; overflow: hidden; aspect-ratio: 5 / 6; border: 1px solid #343434; border-radius: 6px; background: linear-gradient(135deg, #3b222d 0%, #252b36 48%, #2f4b2e 100%); box-shadow: 0 7px 18px #0004; }
.thumb img { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease, filter .35s ease; }
.thumb::after { content: "MEDIA"; position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; color: #ffffff16; font: 700 18px/1 Arial, sans-serif; letter-spacing: 3px; pointer-events: none; }
.media-card:hover .thumb img { transform: scale(1.035); filter: brightness(1.08); }
.thumb span { position: absolute; right: 6px; bottom: 6px; z-index: 3; border-radius: 3px; padding: 2px 6px; color: #fff; background: #000a; font-size: 12px; }
.media-card h3 { margin: 8px 2px 0; color: var(--text); font-size: 14px; line-height: 1.42; font-weight: 400; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.media-card:hover h3 { color: var(--lime); }
.empty { padding: 44px 16px; border: 1px dashed #4c4c4c; border-radius: 6px; text-align: center; color: #777; }
footer { display: flex; justify-content: space-between; gap: 12px; max-width: 1200px; margin: 42px auto 0; padding: 20px 0 28px; border-top: 1px solid #333; color: #6f6f6f; font-size: 12px; }
.footer-disclaimer { max-width: 780px; text-align: right; line-height: 1.65; }

@media (max-width: 1100px) {
  .site-header { grid-template-columns: minmax(160px, 1fr) auto minmax(250px, 320px); gap: 10px; }
  .search { width: 100%; }
  .link-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 10px; }
  .category-row { grid-template-columns: 16% repeat(8, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .tx-wide { padding: 0 2.4vw; }
  .site-header { display: flex; flex-wrap: wrap; padding: 3vw 0; }
  .brand { width: 100%; }
  .nav { width: 100%; flex-wrap: wrap; }
  .nav-item { min-width: 54px; padding: 0 5px; font-size: 13px; }
  .nav-icon { font-size: 22px; }
  .nav-home { min-width: 64px; font-size: 15px; }
  .nav-home .nav-icon { font-size: 26px; }
  .search { flex-basis: 100%; height: 48px; }
  .search-icon { line-height: 48px; font-size: 23px; }
  .search input { padding-left: 36px; }
  .category-row { padding: 7px 0; }
  .category-row { grid-template-columns: 24% repeat(4, minmax(0, 1fr)); }
  .category-row dt { line-height: 42px; font-size: 20px; letter-spacing: .07em; text-align: left; text-shadow: 0 1px 0 #000; }
  .category-row dd { line-height: 26px; padding-left: 4px; font-size: 15px; text-align: left; }
  .link-panel { margin: 16px 0; }
  .link-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .link-card { min-height: 40px; padding: 4px; font-size: 14px; }
  .tags-section .tag { padding: 5px 7px; font-size: 13px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
  .notice { align-items: flex-start; flex-direction: column; gap: 3px; }
  footer { flex-direction: column; text-align: center; }
  .footer-disclaimer { max-width: none; text-align: center; }
}
@media (max-width: 375px) {
  .category-row dt { font-size: 18px; }
  .category-row dd { font-size: 14px; }
  .tag { padding: 6px 7px; }
}

/* AppleCMS V10 additions */
.content-page { width: 100%; max-width: none; margin: 0 auto 32px; }
.detail-page, .player-page { width: 100%; max-width: 1200px; margin: 0 auto 32px; }
.content-page h1, .detail-page h1, .player-page h1 { color: var(--text); font-size: 24px; margin: 0; }
.filter-strip, .play-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.filter-strip a, .play-list a { color: var(--text); padding: 5px 9px; border-radius: 4px; background: var(--panel-2); }
.filter-strip a:hover, .play-list a:hover { color: #000; background: #f90; }
.page-nav { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.page-nav a, .page-nav span { color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; }
.page-nav a:hover, .page-nav .is-current { color: #000; background: #f90; }
.page-nav .page-meta { border-color: transparent; color: #9a9a9a; }
.icon-panel, .banner-panel { max-width: 1200px; margin: 14px auto; }
.tags-section { margin-top: 10px; }
.icon-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 10px; }
.icon-card { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 6px; color: var(--text); text-align: center; }
.icon-card img { width: 56px; height: 56px; border-radius: 16px; object-fit: cover; background: var(--panel-2); }
.icon-card span { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.icon-card:hover { color: var(--lime); }
.banner-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.banner-card { display: block; overflow: hidden; min-height: 70px; border-radius: 5px; background: var(--panel-2); }
.banner-card img { display: block; width: 100%; min-height: 70px; object-fit: cover; }
.detail-wrapper { display: flex; gap: 30px; margin-bottom: 28px; padding: 20px; border: 1px solid #1d1d1d; border-radius: 5px; background: var(--panel); }
.detail-image-wrapper { flex: 1 1 50%; max-width: 50%; }
.detail-image-wrapper img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; }
.detail-info-wrapper { flex: 1 1 50%; max-width: 50%; }
.detail-info-wrapper h1 { margin-bottom: 14px; }
.detail-info-wrapper p { color: #aaa; }
.detail-info-type { padding: 10px; border-radius: 10px; background: var(--panel-2); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.primary-play { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 54px; padding: 0 28px; border-radius: 8px; color: #160b0e; background: var(--accent); font-size: 18px; font-weight: 800; letter-spacing: .04em; box-shadow: 0 8px 20px #ff004855; transition: transform .2s ease, filter .2s ease; }
.primary-play:hover { color: #160b0e; filter: brightness(1.15); transform: translateY(-2px); }
.play-list strong { flex: 0 0 100%; color: var(--accent); }
.play-list .play-link { display: inline-flex; align-items: center; gap: 5px; color: var(--text); padding: 5px 9px; border-radius: 4px; background: var(--panel-2); }
.play-list .play-link:hover { color: #000; background: #f90; }
.player-box { position: relative; width: 100%; height: clamp(260px, 56.25vw, 650px); min-height: 260px; max-height: 650px; margin: 16px 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 6px; background: #111; color: #777; }
.player-box > * { max-width: 100%; }
.player-box .MacPlayer, .player-box .MacPlayer table, .player-box .MacPlayer #playleft, .player-box iframe { width: 100% !important; height: 100% !important; }
.player-box .MacPlayer { position: relative !important; }
.player-box .primary-native { display: block; width: 100%; height: 100%; max-height: none; aspect-ratio: auto; border-radius: 0; object-fit: contain; }
.player-refresh { display: inline-flex; align-items: center; justify-content: center; margin: 0 0 18px; padding: 9px 18px; border: 1px solid #ffcf66; border-radius: 5px; color: #1e1e1e; background: #ffcf66; font-size: 14px; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.player-refresh:hover { background: #ffe39a; transform: translateY(-1px); }
.player-refresh.is-visible { box-shadow: 0 0 0 2px #ff6b8a66; }
.player-box.player-unavailable .primary-native { display: block; }
.player-box.player-unavailable > *:not(.primary-native) { display: none !important; }
.native-player { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 420px; background: #000; border-radius: 5px; }
.source-link { display: inline-block; margin-top: 9px; color: #f90; font-size: 13px; }
.source-link:hover { color: #fff; }
.player-nav { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.text-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.text-row time { color: #777; }
@media (max-width: 760px) {
  .icon-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .banner-grid { grid-template-columns: 1fr; }
  .detail-wrapper { flex-direction: column; }
  .detail-image-wrapper, .detail-info-wrapper { max-width: 100%; }
}
