/* APTV — Đài Truyền Hình Âm Phủ 官网 */
:root {
  --vtv-red: #c8102e;
  --vtv-dark: #1a1a24;
  --vtv-bg: #f2f2f4;
  --vtv-text: #222;
  --vtv-gray: #666;
  --vtv-border: #ddd;
}

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

body.site {
  font-family: "Segoe UI", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  background: var(--vtv-bg);
  color: var(--vtv-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 顶部 ===== */
.site-header {
  background: var(--vtv-dark);
  border-bottom: 3px solid var(--vtv-red);
}

.header-top {
  padding: 14px 0;
}
.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.brand-logo {
  display: flex;
  align-items: center;
}
.logo-emblem {
  display: block;
  filter: drop-shadow(0 0 6px rgba(255,255,255,.4));
}
.brand-word {
  font-size: 34px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
  font-family: Arial, sans-serif;
  text-shadow: 2px 2px 0 var(--vtv-red);
}
.brand-sub {
  color: rgba(255,255,255,.55);
  font-size: 12px;
  letter-spacing: 1px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.live-badge {
  color: #fff;
  background: var(--vtv-red);
  font-size: 12px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 2px;
  animation: live-pulse 1.6s infinite;
}
@keyframes live-pulse {
  0%,100% { opacity: 1; }
  50% { opacity: .55; }
}
.header-clock {
  color: rgba(255,255,255,.8);
  font-size: 14px;
  font-family: "Courier New", monospace;
  letter-spacing: 1px;
}

.main-nav {
  background: rgba(0,0,0,.35);
  border-top: 1px solid rgba(255,255,255,.06);
}
.nav-flex {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.nav-item {
  color: rgba(255,255,255,.75);
  font-size: 13px;
  font-weight: 600;
  padding: 11px 16px;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all .15s;
}
.nav-item:hover { color: #fff; }
.nav-item.active {
  color: #fff;
  border-bottom-color: var(--vtv-red);
}

/* ===== 滚动新闻条 ===== */
.news-ticker {
  background: #fff;
  border-bottom: 1px solid var(--vtv-border);
}
.ticker-flex {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 20px;
}
.ticker-label {
  background: var(--vtv-red);
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.ticker-viewport {
  overflow: hidden;
  flex: 1;
  white-space: nowrap;
}
.ticker-content {
  display: inline-block;
  font-size: 13px;
  color: var(--vtv-text);
  animation: ticker-scroll 30s linear infinite;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== 主体网格 ===== */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding: 24px 20px;
  flex: 1;
  width: 100%;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 800;
  color: var(--vtv-dark);
  margin-bottom: 12px;
}
.title-dot {
  width: 8px;
  height: 20px;
  background: var(--vtv-red);
  border-radius: 1px;
}

/* ===== 播放器 ===== */
.player-box {
  background: #fff;
  border: 1px solid var(--vtv-border);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.player-screen {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
}
.program {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: #000;
}
.program.active { display: flex; }
.program video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.prog-sub {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255,255,255,.9);
  font-size: 14px;
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(0,0,0,.9);
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
  padding: 24px 0 10px;
}
.prog-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.prog-big {
  color: #fff;
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 900;
  letter-spacing: 8px;
  text-shadow: 0 0 24px rgba(255,255,255,.35);
  animation: flicker-soft 4s infinite;
}
@keyframes flicker-soft {
  0%,100% { opacity: 1; }
  91% { opacity: 1; }
  92% { opacity: .5; }
  93% { opacity: 1; }
  97% { opacity: .7; }
  98% { opacity: 1; }
}
.prog-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 50px;
}
.prog-wave span {
  width: 4px;
  background: rgba(200,240,192,.7);
  animation: wave 0.9s ease-in-out infinite;
}
@keyframes wave {
  0%,100% { height: 8px; }
  50% { height: 44px; }
}

/* 播放器特效 */
.player-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,.18) 3px
  );
  z-index: 20;
}
.player-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,.5) 100%);
  z-index: 21;
}
.player-snow {
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(#111 0% 25%, #1c1c1c 0% 50%);
  background-size: 3px 3px;
  opacity: 0;
  display: none;
  z-index: 22;
}
.player-snow.active {
  display: block;
  opacity: .8;
  animation: snow-shake .12s steps(2) infinite;
}
@keyframes snow-shake {
  0% { background-position: 0 0; }
  100% { background-position: 4px 3px; }
}
.player-glitch-face {
  position: absolute;
  top: 30%;
  left: 45%;
  font-size: 90px;
  opacity: 0;
  z-index: 23;
  filter: blur(2px);
  transition: opacity .1s;
  pointer-events: none;
}
.player-glitch-face.show { opacity: .45; }

.player-osd {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.7);
  color: #c8f0c0;
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 2px;
  z-index: 30;
  opacity: 0;
  transition: opacity .2s;
  letter-spacing: 1px;
  font-family: "Courier New", monospace;
}
.player-osd.show { opacity: 1; }

.player-watermark {
  position: absolute;
  top: 12px;
  left: 14px;
  color: rgba(255,255,255,.5);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2px;
  z-index: 24;
  text-shadow: 1px 1px 0 #000;
  font-family: Arial, sans-serif;
}
.player-clock {
  position: absolute;
  right: 14px;
  bottom: 40px;
  color: rgba(255,255,255,.8);
  font-size: 14px;
  z-index: 24;
  font-family: "Courier New", monospace;
  background: rgba(0,0,0,.5);
  padding: 2px 8px;
  border-left: 3px solid var(--vtv-red);
  text-shadow: 1px 1px 0 #000;
}
.player-channel-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  color: rgba(255,255,255,.75);
  font-size: 12px;
  z-index: 24;
  background: rgba(0,0,0,.5);
  padding: 3px 8px;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 #000;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #fff;
  border-top: 1px solid var(--vtv-border);
}
.ctrl-item {
  cursor: pointer;
  font-size: 15px;
  color: var(--vtv-text);
  padding: 4px 8px;
  border-radius: 3px;
  transition: all .15s;
}
.ctrl-item:hover { background: var(--vtv-bg); color: var(--vtv-red); }
.ctrl-vol { cursor: pointer; font-size: 14px; margin-left: auto; }
.ctrl-live {
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  background: var(--vtv-red);
  padding: 3px 8px;
  border-radius: 2px;
  animation: live-pulse 1.6s infinite;
}

/* ===== 频道卡片 ===== */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.channel-card {
  background: #fff;
  border: 1px solid var(--vtv-border);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: all .18s;
}
.channel-card:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,.12);
  transform: translateY(-2px);
}
.channel-card.active {
  border-color: var(--vtv-red);
  box-shadow: 0 0 0 1px var(--vtv-red);
}
.card-thumb {
  aspect-ratio: 16/9;
  background: var(--vtv-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.thumb-1 { background: linear-gradient(135deg, #2a2a35, #0d0d12); }
.thumb-2 { background: linear-gradient(135deg, #3a1020, #12060c); }
.thumb-3 { background: linear-gradient(135deg, #101830, #050810); }
.thumb-4 { background: linear-gradient(135deg, #1c2a1a, #081008); }
.thumb-5 { background: linear-gradient(135deg, #2a1a10, #120804); }
.card-play {
  color: rgba(255,255,255,.8);
  font-size: 26px;
  text-shadow: 0 0 12px rgba(0,0,0,.6);
}
.card-info { padding: 9px 12px; }
.card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--vtv-dark);
}
.card-desc {
  font-size: 11px;
  color: var(--vtv-gray);
  margin-top: 2px;
  letter-spacing: 1px;
}

/* ===== 侧栏 ===== */
.epg-list {
  background: #fff;
  border: 1px solid var(--vtv-border);
  border-radius: 4px;
  overflow: hidden;
}
.epg-item {
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
  transition: background .12s;
  cursor: default;
}
.epg-item:hover { background: #fafafa; }
.epg-time {
  color: var(--vtv-red);
  font-weight: 700;
  font-family: "Courier New", monospace;
  flex-shrink: 0;
}
.epg-name { color: var(--vtv-text); }

.notice-box {
  background: #fff;
  border: 1px solid var(--vtv-border);
  border-radius: 4px;
  padding: 6px 0;
}
.notice-item {
  padding: 11px 14px;
  border-bottom: 1px solid #f0f0f0;
}
.notice-item:last-child { border-bottom: none; }
.notice-date {
  font-size: 11px;
  color: var(--vtv-red);
  font-weight: 700;
  font-family: "Courier New", monospace;
}
.notice-text {
  font-size: 13px;
  color: var(--vtv-text);
  margin-top: 3px;
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--vtv-dark);
  color: rgba(255,255,255,.6);
  padding: 26px 0;
  margin-top: auto;
  border-top: 3px solid var(--vtv-red);
}
.footer-brand {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 1px;
  font-family: Arial, sans-serif;
}
.footer-text {
  font-size: 12px;
  margin-top: 8px;
  line-height: 1.7;
  color: rgba(255,255,255,.45);
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .channel-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .channel-grid { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
}

/* ===== 子页面 ===== */
.page {
  padding: 24px 20px;
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* 新闻列表 */
.news-list { display: flex; flex-direction: column; gap: 16px; }
.news-article {
  background: #fff;
  border: 1px solid var(--vtv-border);
  border-radius: 4px;
  padding: 16px 20px;
}
.news-cat {
  display: inline-block;
  background: var(--vtv-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.news-article h3 {
  font-size: 17px;
  color: var(--vtv-dark);
  margin-bottom: 6px;
  line-height: 1.4;
}
.news-article p { font-size: 13px; color: var(--vtv-gray); line-height: 1.7; }
.news-meta { font-size: 11px; color: #aaa; margin-top: 8px; font-family: "Courier New", monospace; }

/* 频道大全 */
.channel-list { display: flex; flex-direction: column; gap: 10px; }
.channel-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--vtv-border);
  border-radius: 4px;
  padding: 14px 18px;
}
.ch-row-badge {
  background: var(--vtv-dark);
  color: var(--vtv-yellow, #ffd75e);
  font-weight: 900;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 3px;
  font-family: Arial, sans-serif;
  flex-shrink: 0;
}
.ch-row-info { flex: 1; }
.ch-row-info h4 { font-size: 15px; color: var(--vtv-dark); }
.ch-row-info p { font-size: 12px; color: var(--vtv-gray); margin-top: 2px; }
.ch-row-btn {
  background: var(--vtv-red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 3px;
  text-decoration: none;
  flex-shrink: 0;
}
.ch-row-btn:hover { background: #a00d26; }

/* 节目介绍 */
.show-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.show-card {
  background: #fff;
  border: 1px solid var(--vtv-border);
  border-radius: 4px;
  overflow: hidden;
}
.show-thumb {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: rgba(255,255,255,.8);
}
.show-card h4 { font-size: 15px; padding: 10px 14px 0; color: var(--vtv-dark); }
.show-card p { font-size: 12px; color: var(--vtv-gray); padding: 4px 14px 12px; }

/* 条例 */
.law-box {
  background: #fff;
  border: 1px solid var(--vtv-border);
  border-radius: 4px;
  padding: 22px 26px;
}
.law-box h3 { font-size: 17px; color: var(--vtv-dark); margin-bottom: 14px; }
.law-list { padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.law-list li { font-size: 13.5px; color: #333; line-height: 1.6; }
.law-note { font-size: 12px; color: var(--vtv-red); margin-top: 16px; font-style: italic; }

/* 实时通报 */
.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--vtv-border);
  border-radius: 4px;
  padding: 12px 16px;
  border-left: 4px solid #ccc;
}
.alert-red { border-left-color: var(--vtv-red); }
.alert-yellow { border-left-color: #e6b800; }
.alert-time {
  font-family: "Courier New", monospace;
  font-weight: 700;
  color: var(--vtv-dark);
  font-size: 13px;
  flex-shrink: 0;
  padding-top: 1px;
}
.alert-text { font-size: 13.5px; color: #333; line-height: 1.6; }

/* 联系页 */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--vtv-border);
  border-radius: 4px;
  padding: 18px 20px;
}
.contact-card h4 { font-size: 15px; color: var(--vtv-dark); margin-bottom: 8px; }
.contact-card p { font-size: 14px; color: #333; font-family: "Courier New", monospace; }
.contact-note { font-size: 11px !important; color: var(--vtv-gray) !important; font-family: inherit !important; margin-top: 6px; }
.contact-form {
  background: #fff;
  border: 1px solid var(--vtv-border);
  border-radius: 4px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact-form h4 { font-size: 15px; color: var(--vtv-dark); }
.contact-form input, .contact-form textarea {
  border: 1px solid var(--vtv-border);
  border-radius: 3px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
}
.contact-form textarea { min-height: 90px; resize: vertical; }
.contact-form button {
  align-self: flex-start;
  background: var(--vtv-red);
  color: #fff;
  border: none;
  padding: 9px 22px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.contact-form button:hover { background: #a00d26; }

@media (max-width: 700px) {
  .show-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
