:root {
  --accent: #667eea;
  --accent2: #764ba2;
  --ink: #ffffff;
  --muted: rgba(255,255,255,0.6);
  --card: rgba(255,255,255,0.06);
  --line: rgba(255,255,255,0.12);
}

* { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

.news-app {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding-top: var(--sat); padding-bottom: var(--sab);
  color: var(--ink);
}

/* ── Header ── */
.news-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 12px 14px 8px;
}
.news-exit {
  background: rgba(255,255,255,0.10); border: 1px solid var(--line);
  color: #fff; font-size: 13px; font-weight: 700; padding: 7px 12px;
  border-radius: 20px; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.news-exit:active { transform: scale(0.94); }
.news-brand { font-weight: 800; font-size: 15px; letter-spacing: 0.3px; }
.news-live { color: #ef4444; font-size: 10px; font-weight: 800; margin-right: 4px; animation: livepulse 1.4s ease-in-out infinite; }
@keyframes livepulse { 0%,100%{opacity:1} 50%{opacity:0.35} }
.news-daytabs { display: flex; gap: 4px; }
.news-daytab {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  font-size: 11px; font-weight: 700; padding: 5px 9px; border-radius: 14px; cursor: pointer;
}
.news-daytab.on { background: linear-gradient(135deg, var(--accent), var(--accent2)); border-color: transparent; color: #fff; }

/* ── Anchor stage ── */
.news-anchor {
  position: relative; width: 168px; height: 168px; margin: 6px auto 4px;
  border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  box-shadow: 0 10px 28px rgba(0,0,0,0.5);
  border: 2px solid var(--line);
}
.news-anchor-vid {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: opacity 0.4s ease;
}
.news-anchor-ring {
  position: absolute; inset: -3px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 0 rgba(102,126,234,0); transition: box-shadow 0.3s ease; opacity: 0;
}
.news-anchor.anchoring { border-color: var(--accent); }
.news-anchor.anchoring .news-anchor-ring {
  opacity: 1; animation: ringpulse 1.4s ease-in-out infinite;
}
@keyframes ringpulse {
  0%,100% { box-shadow: 0 0 0 2px rgba(102,126,234,0.7), 0 0 18px 4px rgba(102,126,234,0.5); }
  50% { box-shadow: 0 0 0 5px rgba(118,75,162,0.4), 0 0 30px 10px rgba(118,75,162,0.35); }
}

/* ── Carousel ── */
.news-track {
  flex: 1; display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; min-height: 0;
}
.news-track::-webkit-scrollbar { display: none; }
.news-slide {
  flex: 0 0 100%; width: 100%; height: 100%; scroll-snap-align: center;
  padding: 4px 16px 8px; box-sizing: border-box; display: flex;
}
.news-card {
  display: flex; flex-direction: column; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden;
}
.news-thumb { width: 100%; height: 150px; overflow: hidden; flex: 0 0 auto; background: #11131a; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card-body { padding: 14px 15px 15px; display: flex; flex-direction: column; min-height: 0; flex: 1; overflow: hidden; }
.news-source { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.news-source-logo { width: 16px; height: 16px; border-radius: 4px; object-fit: contain; }
.news-time { margin-left: auto; font-weight: 600; opacity: 0.8; }
.news-title { font-size: 18px; font-weight: 800; line-height: 1.25; margin-bottom: 8px; }
.news-summary {
  font-size: 13.5px; line-height: 1.5; color: rgba(255,255,255,0.8); flex: 1;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.news-summary::-webkit-scrollbar { display: none; }
.news-card-actions { display: flex; gap: 8px; margin-top: 12px; flex: 0 0 auto; }
.news-read-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none; color: #fff;
  font-size: 13px; font-weight: 800; padding: 9px 16px; border-radius: 22px; cursor: pointer;
}
.news-read-btn.playing { background: #ef4444; }
.news-read-btn.playing .news-read-ico { content: ''; }
.news-read-btn:active { transform: scale(0.96); }
.news-open-btn {
  background: rgba(255,255,255,0.08); border: 1px solid var(--line); color: #fff;
  font-size: 12.5px; font-weight: 700; padding: 9px 14px; border-radius: 22px; cursor: pointer; margin-left: auto;
}
.news-open-btn:active { transform: scale(0.96); }
.news-empty { margin: auto; color: var(--muted); font-size: 14px; text-align: center; }

/* ── Footer ── */
.news-footer { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 14px; flex: 0 0 auto; }
.news-playall {
  background: rgba(255,255,255,0.10); border: 1px solid var(--line); color: #fff;
  font-size: 12.5px; font-weight: 800; padding: 9px 16px; border-radius: 22px; cursor: pointer;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.news-playall.active { background: #ef4444; border-color: transparent; }
.news-dots { display: flex; gap: 6px; align-items: center; max-width: 50%; overflow: hidden; }
.news-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.25); flex: 0 0 auto; transition: all 0.2s; }
.news-dot.on { background: var(--accent); width: 18px; border-radius: 3px; }

/* ── Fatal/error ── */
.news-fatal { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); text-align: center; padding: 24px; }
.news-fatal-ico { font-size: 52px; }
.news-retry { background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none; color: #fff; font-weight: 800; padding: 10px 22px; border-radius: 22px; cursor: pointer; }
