/* ============================================================
   InkWing / 墨蝶 — Newspaper Redesign v3

   Principle: The newspaper is the ONLY bright area in the app.
   It uses warm-white background + dark serif text.
   This creates dramatic contrast against the dark UI.

   Keep: danmaku animation, receipt zigzag edges, ripple tree.
   Remove: excessive shadows, paper texture SVGs, glow effects.
   ============================================================ */


/* ============================================================
   1. Paper Container — Clean warm-white
   ============================================================ */

.newspaper-inner,
.np-shared-ripple {
  background: #f5f0e6 !important;
  color: #1a1a1a !important;
  border-radius: 2px !important;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35) !important;
  position: relative;
}

.np-dual-columns {
  gap: 24px !important;
}

.np-dual-col .newspaper-inner {
  transition: transform 0.3s ease;
}


/* ============================================================
   2. Masthead — Clean, authoritative
   ============================================================ */

.np-masthead {
  text-align: center !important;
  padding: 28px 40px 16px !important;
  border-bottom: none !important;
  position: relative;
}

.np-masthead::after {
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 32px !important;
  right: 32px !important;
  height: 3px !important;
  background: none !important;
  border-top: 2px solid #1a1a1a !important;
  border-bottom: 1px solid #1a1a1a !important;
  opacity: 0.8 !important;
}

.np-name {
  font-size: 2.4em !important;
  font-weight: 900 !important;
  letter-spacing: 0.3em !important;
  color: #111 !important;
  font-family: Georgia, 'Noto Serif SC', serif !important;
  line-height: 1.3;
}

.np-meta {
  padding: 8px 40px !important;
  font-size: 0.72em !important;
  color: #888 !important;
  border-bottom: 1px solid rgba(26,21,16,0.12) !important;
  letter-spacing: 0.03em;
}

.np-motto {
  font-style: italic !important;
  color: #777 !important;
}


/* ============================================================
   3. Headline — Large, impactful
   ============================================================ */

.np-headline-section {
  padding: 24px 40px 20px !important;
  border-bottom: 2px solid #1a1a1a !important;
}

.np-headline-title {
  font-size: 1.8em !important;
  font-weight: 900 !important;
  line-height: 1.4 !important;
  margin-bottom: 12px !important;
  color: #111 !important;
  font-family: Georgia, 'Noto Serif SC', serif !important;
}

.np-headline-summary {
  font-size: 0.95em !important;
  color: #333 !important;
  line-height: 1.9 !important;
  text-indent: 2em !important;
}

/* Category labels */
.np-cat {
  display: inline-block !important;
  font-size: 0.62em !important;
  letter-spacing: 0.1em !important;
  padding: 2px 10px !important;
  border-radius: 0 !important;
  font-weight: 700 !important;
  margin-bottom: 8px !important;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .np-headline-title { font-size: 1.4em !important; }
}


/* ============================================================
   4. News Columns
   ============================================================ */

.np-columns {
  grid-template-columns: 1.2fr 1fr !important;
  border-bottom: 1px solid rgba(26,21,16,0.12) !important;
}

.np-col-left {
  border-right: 1px solid rgba(26,21,16,0.12) !important;
}

.np-article {
  padding: 16px 24px !important;
  border-bottom: 1px solid rgba(26,21,16,0.08) !important;
}

.np-article:last-child {
  border-bottom: none !important;
}

.np-article-title {
  font-weight: 700 !important;
  font-size: 1em !important;
  line-height: 1.5 !important;
  color: #1a1a1a !important;
  margin-bottom: 6px !important;
}

.np-article-summary {
  font-size: 0.85em !important;
  color: #444 !important;
  line-height: 1.8 !important;
}


/* ============================================================
   5. Ad — Subtle vintage feel
   ============================================================ */

.np-ad {
  padding: 16px 24px !important;
  background: #ece7d8 !important;
  text-align: center !important;
}

.np-ad-brand {
  font-weight: 900 !important;
  font-size: 1.1em !important;
  color: #1a1a1a !important;
  letter-spacing: 0.15em !important;
}

.np-ad-slogan {
  font-style: italic !important;
  font-size: 0.88em !important;
  color: #666 !important;
}

.np-ad-text {
  font-size: 0.78em !important;
  color: #888 !important;
}


/* ============================================================
   6. Opinion — Quote styling
   ============================================================ */

.np-opinion {
  padding: 20px 40px !important;
  border-bottom: 1px solid rgba(26,21,16,0.12) !important;
}

.np-opinion-label {
  font-size: 0.62em !important;
  color: #888 !important;
  letter-spacing: 0.15em !important;
  margin-bottom: 10px !important;
  text-transform: uppercase;
}

.np-opinion-title {
  font-weight: 700 !important;
  font-size: 1.1em !important;
  line-height: 1.5 !important;
  color: #1a1a1a !important;
}

.np-opinion-author {
  font-size: 0.75em !important;
  color: #888 !important;
  margin-bottom: 10px !important;
}

.np-opinion-text {
  font-size: 0.88em !important;
  color: #333 !important;
  font-style: italic !important;
  line-height: 2 !important;
  border-left: 2px solid #c9a84c !important;
  padding-left: 16px !important;
}


/* ============================================================
   7. Snapshots — Brief news items
   ============================================================ */

.np-snapshots {
  padding: 16px 40px 20px !important;
  border-bottom: 1px solid rgba(26,21,16,0.12) !important;
}

.np-snap-label {
  font-size: 0.65em !important;
  color: #888 !important;
  letter-spacing: 0.15em !important;
  margin-bottom: 12px !important;
  text-transform: uppercase;
}

.np-snap-grid {
  gap: 0 24px !important;
}

.np-snap-item {
  font-size: 0.82em !important;
  color: #444 !important;
  padding: 6px 0 !important;
  border-bottom: 1px dotted rgba(26,21,16,0.1) !important;
}


/* ============================================================
   8. Trending — Hot search list
   ============================================================ */

.np-trending {
  padding: 18px 40px 22px !important;
  border-bottom: 1px solid rgba(26,21,16,0.12) !important;
}

.np-trending-label {
  font-size: 0.68em !important;
  color: #c0392b !important;
  letter-spacing: 0.1em !important;
  margin-bottom: 12px !important;
  font-weight: 900 !important;
  border-bottom: 2px solid #c0392b;
  padding-bottom: 8px;
}

.np-trending-list {
  list-style: none !important;
}

.np-trending-item {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 8px 0 !important;
  border-bottom: none !important;
  font-size: 0.88em !important;
  color: #1a1a1a !important;
}

.np-trending-rank {
  font-weight: 900 !important;
  color: #bbb !important;
  min-width: 22px !important;
  text-align: center !important;
  font-size: 0.82em !important;
}

.np-trending-item:nth-child(1) .np-trending-rank,
.np-trending-item:nth-child(2) .np-trending-rank,
.np-trending-item:nth-child(3) .np-trending-rank {
  color: #c0392b !important;
  font-weight: 900 !important;
}

.np-trending-item:nth-child(-n+3) .np-trending-text {
  font-weight: 700;
}

.np-trending-text {
  flex: 1 !important;
  line-height: 1.4;
}

.np-trending-tag {
  font-size: 0.6em !important;
  padding: 2px 8px !important;
  border-radius: 4px !important;
  font-weight: 700 !important;
  flex-shrink: 0;
}


/* ============================================================
   9. Danmaku — Flying comments (KEEP animation)
   ============================================================ */

.np-danmaku-section {
  padding: 18px 40px 22px !important;
  border-bottom: 1px solid rgba(26,21,16,0.12) !important;
}

.np-danmaku-label {
  font-size: 0.65em !important;
  color: #888 !important;
  letter-spacing: 0.1em !important;
  margin-bottom: 10px !important;
}

.np-danmaku-player {
  background: #0a0a0a !important;
  border-radius: 8px !important;
  height: 180px !important;
  overflow: hidden !important;
}

.np-danmaku-title {
  font-size: 0.72em !important;
  color: rgba(255,255,255,0.5) !important;
}

.np-danmaku-play {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.1);
  opacity: 0.6;
  transition: opacity 0.3s;
}

.np-danmaku-player:hover .np-danmaku-play {
  opacity: 1;
}

/* Danmaku — scattered static layout */
.danmaku {
  position: absolute !important;
  font-size: 0.82em !important;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
  animation: none !important;
  white-space: nowrap;
}
.danmaku:nth-child(1) { top: 6% !important;  left: 5% !important; }
.danmaku:nth-child(2) { top: 18% !important; left: 45% !important; }
.danmaku:nth-child(3) { top: 30% !important; left: 15% !important; }
.danmaku:nth-child(4) { top: 10% !important; left: 70% !important; }
.danmaku:nth-child(5) { top: 44% !important; left: 35% !important; }
.danmaku:nth-child(6) { top: 58% !important; left: 8% !important; }
.danmaku:nth-child(7) { top: 52% !important; left: 55% !important; }
.danmaku:nth-child(8) { top: 70% !important; left: 25% !important; }
.danmaku:nth-child(9) { top: 78% !important; left: 60% !important; }


/* ============================================================
   10. Receipt — Zigzag edges (KEEP)
   ============================================================ */

.np-receipt-section {
  padding: 16px !important;
  display: flex;
  justify-content: center;
}

.np-receipt {
  max-width: 260px !important;
  background: #fefefe !important;
  padding: 20px 16px !important;
  font-family: 'Courier New', Consolas, monospace !important;
  font-size: 0.76em !important;
  color: #333 !important;
  line-height: 1.9 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
  border: none !important;
  position: relative !important;
}

/* Zigzag top */
.np-receipt::before {
  content: '' !important;
  position: absolute !important;
  left: -1px !important;
  right: -1px !important;
  top: -8px !important;
  height: 8px !important;
  background:
    linear-gradient(135deg, #fefefe 33.33%, transparent 33.33%) 0 0,
    linear-gradient(225deg, #fefefe 33.33%, transparent 33.33%) 0 0 !important;
  background-size: 10px 8px !important;
  background-repeat: repeat-x !important;
  background-color: transparent !important;
}

/* Zigzag bottom */
.np-receipt::after {
  content: '' !important;
  position: absolute !important;
  left: -1px !important;
  right: -1px !important;
  bottom: -8px !important;
  height: 8px !important;
  background:
    linear-gradient(315deg, #fefefe 33.33%, transparent 33.33%) 0 0,
    linear-gradient(45deg, #fefefe 33.33%, transparent 33.33%) 0 0 !important;
  background-size: 10px 8px !important;
  background-repeat: repeat-x !important;
  background-color: transparent !important;
}

.receipt-store {
  text-align: center !important;
  font-weight: bold !important;
  letter-spacing: 0.1em !important;
  border-bottom: 1px solid #333;
  padding-bottom: 4px;
  margin-bottom: 4px;
}

.receipt-total {
  font-weight: bold !important;
  border-top: 1px solid #333;
  border-bottom: 1px solid #333;
  padding: 3px 0;
}

.receipt-footer {
  text-align: center !important;
  color: #aaa !important;
  font-size: 0.85em !important;
  margin-top: 6px !important;
  letter-spacing: 0.15em;
}


/* ============================================================
   11. Push Notification — Clean iOS-style
   ============================================================ */

.np-push-section {
  padding: 16px !important;
  display: flex;
  justify-content: center;
}

.np-push {
  max-width: 360px !important;
  background: #fff !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06) !important;
  font-family: -apple-system, 'SF Pro Display', 'PingFang SC', sans-serif !important;
  border: 1px solid #eee !important;
}

.push-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 8px !important;
}


/* ============================================================
   12. Exchange Rates — Financial terminal style
   ============================================================ */

.np-finance-section {
  padding: 18px 40px 22px !important;
  border-bottom: 1px solid rgba(26,21,16,0.12) !important;
}

.np-exchange-label,
.np-prices-label {
  font-size: 0.65em !important;
  color: #888 !important;
  letter-spacing: 0.15em !important;
  margin-bottom: 12px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
}

.np-exchange-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)) !important;
  gap: 8px !important;
}

.np-rate-card {
  background: #fff !important;
  border: 1px solid #e5e0d5 !important;
  border-radius: 4px !important;
  padding: 10px !important;
  text-align: center !important;
}

.rate-code {
  font-weight: 900 !important;
  font-size: 0.82em !important;
  color: #1a1a1a !important;
  font-family: 'Courier New', monospace;
}

.rate-value {
  font-size: 1.15em !important;
  font-weight: 900 !important;
  color: #1a1a1a !important;
  font-family: 'Courier New', monospace !important;
}

.rate-change {
  font-size: 0.75em !important;
  font-weight: 700 !important;
  font-family: 'Courier New', monospace;
}

.rate-up { color: #c0392b !important; }
.rate-down { color: #27ae60 !important; }

/* Price table */
.np-price-table {
  font-size: 0.88em !important;
}

.np-price-table td {
  padding: 8px 4px !important;
}

.price-val {
  font-weight: 700 !important;
  color: #1a1a1a !important;
  font-family: 'Courier New', monospace !important;
}


/* ============================================================
   13. Ripple Chain — Cause-and-effect tree (KEEP)
   ============================================================ */

.np-ripple {
  padding: 28px 40px !important;
  border-bottom: 1px solid rgba(26,21,16,0.12) !important;
}

.np-ripple-label {
  font-size: 0.68em !important;
  color: #888 !important;
  letter-spacing: 0.15em !important;
  margin-bottom: 20px !important;
  text-align: center;
  text-transform: uppercase;
}

.ripple-tree {
  counter-reset: ripple-step;
  max-width: 560px;
  margin: 0 auto;
}

.ripple-node {
  padding: 12px 20px !important;
  border-radius: 6px !important;
  font-size: 0.85em !important;
  text-align: center !important;
  line-height: 1.6 !important;
  position: relative;
  z-index: 1;
  max-width: 90%;
  margin: 0 auto;
}

.ripple-root {
  background: #c0392b !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.9em !important;
  padding: 14px 24px !important;
}

.ripple-arrow {
  text-align: center;
  height: 28px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #bbb !important;
  font-size: 0.85em !important;
}

.ripple-changed {
  background: #fff !important;
  color: #1a1a1a !important;
  border: 1px solid rgba(0,0,0,0.1) !important;
  text-align: left !important;
  font-size: 0.82em !important;
}

.ripple-result {
  background: rgba(201,168,76,0.1) !important;
  color: #5a4820 !important;
  border: 1.5px solid #c9a84c !important;
  font-weight: 700 !important;
  font-size: 0.9em !important;
  padding: 16px 24px !important;
}

/* Ripple delay timing */
.ripple-tree > .ripple-node:nth-child(1) { transition-delay: 0.1s; }
.ripple-tree > .ripple-arrow:nth-child(2) { transition-delay: 0.3s; }
.ripple-tree > .ripple-node:nth-child(3) { transition-delay: 0.5s; }
.ripple-tree > .ripple-arrow:nth-child(4) { transition-delay: 0.7s; }
.ripple-tree > .ripple-node:nth-child(5) { transition-delay: 0.9s; }
.ripple-tree > .ripple-arrow:nth-child(6) { transition-delay: 1.1s; }
.ripple-tree > .ripple-node:nth-child(7) { transition-delay: 1.3s; }
.ripple-tree > .ripple-arrow:nth-child(8) { transition-delay: 1.5s; }
.ripple-tree > .ripple-node:nth-child(9) { transition-delay: 1.7s; }
.ripple-tree > :last-child { transition-delay: 1.9s; }

.ripple-branch {
  display: flex !important;
  gap: 12px !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
}


/* ============================================================
   14. Glitch Footer — Dark section at bottom
   ============================================================ */

.np-glitch-footer {
  padding: 16px 40px !important;
  background: #111 !important;
  color: #c9a84c !important;
  font-size: 0.82em !important;
  line-height: 1.8 !important;
  text-align: center !important;
}

.np-glitch-footer .glitch-label {
  font-size: 0.62em !important;
  letter-spacing: 0.15em !important;
  color: #666 !important;
  margin-bottom: 4px !important;
  text-transform: uppercase;
}

.np-glitch-footer .glitch-text {
  color: #bbb !important;
}


/* ============================================================
   15. Mobile
   ============================================================ */

@media (max-width: 600px) {
  .np-masthead { padding: 20px 20px 14px !important; }
  .np-name { font-size: 1.8em !important; letter-spacing: 0.2em !important; }
  .np-meta { padding: 6px 20px !important; }
  .np-headline-section,
  .np-opinion,
  .np-snapshots,
  .np-trending,
  .np-danmaku-section,
  .np-ripple,
  .np-finance-section {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .np-columns { grid-template-columns: 1fr !important; }
  .np-col-left { border-right: none !important; border-bottom: 1px solid rgba(26,21,16,0.08); }
  .np-snap-grid { grid-template-columns: 1fr !important; }
  .np-exchange-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .ripple-node { max-width: 100% !important; }
}


/* ============================================================
   16. Print
   ============================================================ */

@media print {
  .danmaku { animation: none !important; display: none; }
  .np-danmaku-player { background: #eee !important; }
  .np-glitch-footer { background: #f5f5f5 !important; color: #333 !important; }
  .newspaper-inner { box-shadow: none !important; }
}
