.app-main:has(.news-page),
.app-main:has(.news-detail-page) {
  padding: 0;
  background: #020302;
}

body:has(.news-page) .tabbar,
body:has(.news-detail-page) .tabbar {
  display: none !important;
}

.news-page,
.news-detail-page {
  --c-accent: #b6f53a;
  --c-muted: #8f9688;
  --c-sub: #8f9688;
  --c-card: rgba(14, 18, 12, 0.72);
  --c-border: rgba(182, 245, 58, 0.14);
  --news-topbar-height: 48px;
  position: relative;
  isolation: isolate;
  min-height: 100%;
  min-height: 100dvh;
  padding: 0 16px calc(24px + var(--safe-bottom, 0px));
  padding-top: calc(var(--news-topbar-height) + var(--safe-top));
  background:
    radial-gradient(120% 70% at 50% -8%, rgba(126, 201, 34, 0.14), transparent 55%),
    linear-gradient(180deg, #050805 0%, #020302 50%, #000 100%);
  color: #f4f7ef;
  box-sizing: border-box;
}

.news-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.news-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.45;
  animation: news-float 10s ease-in-out infinite;
}

.news-orb-a {
  width: 200px;
  height: 200px;
  top: 8%;
  right: -70px;
  background: radial-gradient(circle, rgba(182, 245, 58, 0.3), transparent 68%);
}

.news-orb-b {
  width: 240px;
  height: 240px;
  bottom: 16%;
  left: -90px;
  background: radial-gradient(circle, rgba(90, 160, 30, 0.22), transparent 70%);
  animation-delay: -3.5s;
}

.news-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(182, 245, 58, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(182, 245, 58, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 72%);
  opacity: 0.6;
}

@keyframes news-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(14px) scale(1.05); }
}

.news-topbar,
.news-body,
.news-list,
.news-detail {
  position: relative;
  z-index: 1;
}

.news-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 480px;
  height: calc(var(--news-topbar-height) + var(--safe-top));
  padding: var(--safe-top) 16px 0;
  box-sizing: border-box;
  z-index: 90;
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(2, 3, 2, 0.94), rgba(2, 3, 2, 0.78) 75%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.news-back {
  width: 36px;
  height: 36px;
  margin-left: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #eef7dc;
  border: 1px solid rgba(182, 245, 58, 0.16);
  background: rgba(182, 245, 58, 0.06);
}

.news-back:active {
  background: rgba(182, 245, 58, 0.14);
  color: var(--c-accent);
}

.news-title {
  margin: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #fff;
}

.news-topbar-spacer {
  width: 36px;
  height: 36px;
}

.news-body {
  margin-top: 10px;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-empty {
  padding: 40px 14px;
  text-align: center;
  font-size: 13px;
  color: var(--c-sub);
  border-radius: 16px;
  border: 1px solid var(--c-border);
  background: var(--c-card);
  backdrop-filter: blur(12px);
}

.news-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(182, 245, 58, 0.06), transparent 48%),
    var(--c-card);
  border: 1px solid var(--c-border);
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.news-item:active {
  transform: scale(0.99);
  border-color: rgba(182, 245, 58, 0.35);
  box-shadow: 0 0 18px rgba(182, 245, 58, 0.1);
}

.news-item-thumb {
  width: 96px;
  height: 68px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: #121612;
  border: 1px solid rgba(182, 245, 58, 0.16);
}

.news-item-body {
  min-width: 0;
  flex: 1;
  padding-top: 2px;
}

.news-item-body h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  color: #f2f6ea;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item-body p {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--c-sub);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item-body time {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  line-height: 1;
  color: var(--c-muted);
}

.app-list-more {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--c-sub);
}

.news-detail {
  margin-top: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--c-border);
  background:
    linear-gradient(145deg, rgba(182, 245, 58, 0.06), transparent 42%),
    var(--c-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
}

.news-detail > .news-empty {
  border: 0;
  background: transparent;
  padding: 28px 0;
}

.news-detail-cover {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 14px;
  background: #121612;
  border: 1px solid rgba(182, 245, 58, 0.16);
  margin-bottom: 16px;
}

.news-detail-heading {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: #f2f6ea;
  word-break: break-word;
}

.news-detail-meta {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--c-muted);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(182, 245, 58, 0.14);
  background: rgba(182, 245, 58, 0.06);
}

.news-detail-source {
  margin-top: 10px;
  font-size: 12px;
  color: #b6f53a;
  letter-spacing: 0.02em;
}

.news-detail-summary {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--c-sub);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(182, 245, 58, 0.1);
  background: rgba(0, 0, 0, 0.22);
}

.news-detail-content {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(182, 245, 58, 0.12);
  font-size: 14px;
  line-height: 1.75;
  color: #e4ebd8;
  word-break: break-word;
}

.news-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(182, 245, 58, 0.12);
}

.news-detail-content p {
  margin: 0 0 12px;
}

.news-detail-content p:last-child {
  margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .news-orb {
    animation: none !important;
  }
}
