:root {
  --app-bg: #09090b;          /* Zinc 950 - Solid Deep Neutral Dark */
  --app-ink: #f4f4f5;         /* Zinc 100 - Crisp near-white */
  --app-muted: #a1a1aa;       /* Zinc 400 - Readable neutral gray */
  --app-subtle: #27272a;      /* Zinc 800 - Subtle dividers */
  --accent-color: #3b82f6;    /* Clean Royal Blue accent */
  --accent-hover: #60a5fa;    /* Bright Blue hover */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Outfit', 'Playfair Display', Georgia, serif;
}

html {
  background: var(--app-bg);
}

body {
  font-family: var(--font-sans);
  min-height: 100vh;
  color: var(--app-ink);
  background-color: var(--app-bg);
  -webkit-font-smoothing: antialiased;
}

/* Typography & Layout */
.site-header {
  border-bottom: 1px solid var(--app-subtle);
  background-color: var(--app-bg);
}

.site-brand {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--app-ink) !important;
  letter-spacing: -0.02em;
  transition: opacity 0.15s ease;
}

.site-brand:hover {
  opacity: 0.85;
}

/* Connection Status Dot */
.status-indicator {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--app-muted);
  gap: 0.5rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #52525b;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.status-online .status-dot {
  background-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.status-reconnecting .status-dot {
  background-color: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

/* Main News Items */
.news-feed {
  display: flex;
  flex-direction: column;
}

.news-item {
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--app-subtle);
}

.news-item:last-child {
  border-bottom: none;
}

.news-item.is-new {
  animation: fadeIn 350ms ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.news-image-container {
  border-radius: 4px;
  overflow: hidden;
  background-color: #18181b;
}

.news-image {
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.news-item:hover .news-image {
  opacity: 0.85;
}

.news-source {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--app-muted);
  font-weight: 600;
}

.news-meta-divider {
  color: #3f3f46;
  font-size: 0.75rem;
}

.news-time {
  font-size: 0.75rem;
  color: var(--app-muted);
}

.news-title-wrap {
  margin-top: 0.25rem;
}

.news-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--app-ink) !important;
  line-height: 1.35;
  text-decoration: none;
  transition: color 0.15s ease;
}

.news-title:hover {
  color: var(--accent-hover) !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.news-description {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--app-muted) !important;
}

/* Sidebar Styling */
.sidebar-stack {
  position: sticky;
  top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.sidebar-block {
  display: flex;
  flex-direction: column;
}

.sidebar-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--app-ink) !important;
  letter-spacing: -0.01em;
}

.sidebar-text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--app-muted);
}

/* Minimalist Button Styling */
.button-minimal {
  align-self: flex-start;
  background: transparent;
  color: var(--app-ink);
  border: 1px solid var(--app-subtle);
  padding: 0.4rem 1rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.button-minimal:hover {
  background-color: #18181b;
  border-color: var(--app-muted);
}

.button-primary-minimal {
  align-self: flex-start;
  background: var(--app-ink);
  color: var(--app-bg);
  border: 1px solid var(--app-ink);
  padding: 0.4rem 1rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.button-primary-minimal:hover {
  opacity: 0.9;
}

/* Ad Layout Shells & Placeholders */
.ad-leaderboard-shell,
.ad-sidebar-shell,
.ad-feed-card {
  transition: none;
}

.ad-label {
  font-family: var(--font-serif);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--app-muted);
  font-weight: 600;
}

.ad-badge {
  font-size: 0.62rem;
  font-weight: 600;
  background: #18181b !important;
  color: var(--app-muted) !important;
  border: 1px solid var(--app-subtle) !important;
  border-radius: 3px;
  padding: 0.05rem 0.35rem;
  letter-spacing: 0.02em;
}

.ad-placeholder {
  display: grid;
  place-items: center;
  padding: 1rem;
  border: 1px dashed var(--app-subtle);
  border-radius: 4px;
  background: #0c0c0e;
  text-align: center;
}

.ad-placeholder p {
  font-size: 0.75rem;
  color: var(--app-muted) !important;
}

/* Consent Banner / Dialog Toast */
.consent-banner {
  position: fixed;
  z-index: 1000;
  right: 1.5rem;
  bottom: 1.5rem;
  left: auto;
  width: 440px;
  max-width: calc(100vw - 3rem);
  pointer-events: none;
}

.consent-banner[hidden] {
  display: none !important;
}

.consent-box {
  width: 100%;
  border: 1px solid var(--app-subtle);
  border-radius: 6px;
  background: #0c0c0e;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
  pointer-events: auto;
  color: var(--app-ink);
}

.consent-box .columns {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.consent-box .column {
  width: 100% !important;
}

.consent-box .buttons {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  width: 100%;
}

.consent-box .buttons .button-minimal,
.consent-box .buttons .button-primary-minimal {
  margin-bottom: 0 !important;
}

.consent-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--app-ink) !important;
}

.consent-description {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--app-muted);
}

.consent-preferences {
  border-top: 1px solid var(--app-subtle);
  padding-top: 1rem;
}

.consent-choice {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--app-subtle);
  border-radius: 4px;
  background: #09090b;
  color: var(--app-ink);
  font-size: 0.78rem;
  line-height: 1.3;
}

.consent-choice span strong {
  color: var(--app-ink) !important;
  font-size: 0.82rem;
}

.consent-choice span small {
  color: var(--app-muted);
}

.consent-choice input[type="checkbox"] {
  accent-color: var(--accent-color);
  margin-top: 0.2rem;
  width: 0.9rem;
  height: 0.9rem;
  cursor: pointer;
}

/* Footer */
.app-footer {
  background: transparent;
  border-top: 1px solid var(--app-subtle);
  padding: 3rem 1.5rem;
  margin-top: 4rem;
}

.app-footer p {
  font-size: 0.82rem;
  color: var(--app-muted);
}

/* Responsiveness overrides */
@media (max-width: 768px) {
  .consent-banner {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    width: auto;
    max-width: none;
  }

  .sidebar-stack {
    position: static;
    margin-top: 3rem;
  }
}
