:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f7f7f8;
  --surface-hover: #f2f2f5;
  --text: #1a1a1a;
  --muted: #6b7280;
  --accent: #6001d2;
  --accent-deep: #4a00a8;
  --accent-light: #f0e6ff;
  --success: #11774f;
  --danger: #b73333;
  --line: #e5e7eb;
  --line-dark: #d1d5db;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 6px 16px rgba(0, 0, 0, 0.06);
  --radius: 0.5rem;
}

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

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, video, iframe, table { max-width: 100%; }
.article-page-body img { max-width: 100%; height: auto; border-radius: 0.6rem; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }
.muted-text { color: var(--muted); font-size: 0.85rem; }

/* ===== MOBILE MENU ===== */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-right: 0.5rem;
}
.mobile-menu-btn span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ===== HEADER ===== */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0.6rem 1rem;
  display: flex; align-items: center; gap: 1rem;
}
.logo {
  font: 900 1.6rem/1 "Inter", sans-serif;
  color: var(--accent); letter-spacing: -0.02em;
  white-space: nowrap; flex-shrink: 0;
}
.header-search {
  flex: 1; display: flex; align-items: center;
  max-width: 520px; margin: 0 auto;
  border: 1px solid var(--line-dark); border-radius: 999px;
  overflow: hidden; background: #fafafa;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.header-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(96, 1, 210, 0.1);
}
.header-search input {
  flex: 1; border: 0; outline: 0; padding: 0.6rem 1rem;
  background: transparent; font: 400 0.9rem/1.3 "Inter", sans-serif;
}
.search-btn {
  border: 0; padding: 0.6rem 1.1rem;
  background: var(--accent); color: #fff;
  font: 600 0.82rem/1 "Inter", sans-serif;
}

.header-actions { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; position: relative; }
.btn-mail, .btn-signin {
  font: 600 0.82rem/1 "Inter", sans-serif;
  padding: 0.55rem 1rem; border-radius: 999px;
  border: 0; transition: background 0.15s;
}
.btn-mail { color: var(--text); background: var(--surface-alt); border: 1px solid var(--line); }
.btn-mail:hover { background: var(--surface-hover); }
.btn-signin { color: #fff; background: var(--accent); }
.btn-signin:hover { background: var(--accent-deep); }

/* PROFILE MENU */
.profile-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  width: 260px; padding: 0.6rem; z-index: 200;
}
.profile-menu-header {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem; border-bottom: 1px solid var(--line);
  margin-bottom: 0.5rem;
}
.profile-menu-header strong { display: block; font-size: 0.88rem; }
.profile-menu-header span { display: block; font-size: 0.75rem; color: var(--muted); }
.profile-menu a {
  display: block; padding: 0.55rem 0.6rem;
  font-size: 0.85rem; border-radius: 4px;
}
.profile-menu a:hover { background: var(--surface-alt); color: var(--accent); }

.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem; flex-shrink: 0;
}
.avatar.large { width: 80px; height: 80px; font-size: 2rem; margin-bottom: 0.5rem; }

/* ===== MEGA NAV ===== */
.mega-nav { border-bottom: 1px solid var(--line); background: var(--surface); }
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1rem;
  display: flex; overflow-x: auto; gap: 0.1rem;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-item {
  padding: 0.65rem 0.75rem;
  font: 500 0.82rem/1 "Inter", sans-serif;
  color: var(--muted); white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.nav-item:hover { color: var(--accent); }
.nav-item.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }

/* ===== AD BANNER ===== */
.ad-banner-wrap { background: linear-gradient(135deg, #f8f4ff, #fff); border-bottom: 1px solid var(--line); }
.ad-banner {
  max-width: 1200px; margin: 0 auto; padding: 0.7rem 1rem;
  display: flex; align-items: center; gap: 1rem;
}
.ad-label {
  font: 700 0.65rem/1 "Inter", sans-serif;
  color: var(--accent); background: var(--accent-light);
  padding: 0.25rem 0.5rem; border-radius: 3px;
  text-transform: uppercase; letter-spacing: 0.05em;
  flex-shrink: 0;
}
.ad-content { flex: 1; display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.ad-content strong { font-size: 0.92rem; color: var(--text); }
.ad-content span { font-size: 0.82rem; color: var(--muted); }
.ad-cta {
  background: var(--accent); color: #fff;
  padding: 0.5rem 0.9rem; border-radius: 999px;
  font: 600 0.8rem/1 "Inter", sans-serif; flex-shrink: 0;
}
.ad-cta:hover { background: var(--accent-deep); }

/* ===== MAIN LAYOUT ===== */
.main-layout {
  max-width: 1240px; margin: 0 auto;
  padding: 1rem 1rem 2rem;
  display: flex; flex-direction: column; gap: 1.5rem;
}

/* ===== PROMO STRIP ===== */
.promo-strip-wrap { border-bottom: 1px solid var(--line); background: #fff; }
.promo-strip {
  max-width: 1240px; margin: 0 auto;
  padding: 0.8rem 1rem;
  display: flex; gap: 0.7rem; overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.promo-strip::-webkit-scrollbar { display: none; }
.promo-card {
  flex: 0 0 230px; min-height: 76px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.55rem 0.7rem;
  display: grid; grid-template-columns: 1fr 50px; gap: 0.6rem;
  align-items: center; scroll-snap-align: start;
  transition: box-shadow 0.15s, transform 0.15s;
  cursor: pointer;
}
.promo-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.promo-text { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.promo-label {
  font: 600 0.65rem/1 "Inter", sans-serif;
  color: var(--accent); text-transform: uppercase;
  letter-spacing: 0.04em;
}
.promo-headline {
  font: 700 0.78rem/1.25 "Inter", sans-serif;
  color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.promo-thumb {
  width: 50px; height: 50px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: #fff; flex-shrink: 0;
}

/* ===== HERO BLOCK 3-COL ===== */
.hero-block {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 290px;
  gap: 1.2rem; align-items: start;
}
.hero-left, .hero-right { display: flex; flex-direction: column; gap: 1rem; }

/* ===== HERO SLIDER (CENTER) ===== */
.hero-slider {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 16 / 10;
  background: #1a1a1a;
}
.hero-track { display: flex; width: 100%; height: 100%; transition: transform 0.45s ease; }
.hero-slide {
  flex: 0 0 100%; min-width: 0; max-width: 100%; height: 100%;
  position: relative; cursor: pointer;
  display: flex; align-items: flex-end;
  background-size: cover; background-position: center;
  overflow: hidden;
}
.hero-slide::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0) 100%);
}
.hero-slide-body {
  position: relative; z-index: 1;
  padding: 1.5rem 1.6rem; color: #fff; width: 100%;
}
.hero-slide-source {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font: 600 0.78rem/1 "Inter", sans-serif;
  margin-bottom: 0.55rem; opacity: 0.95;
}
.hero-slide-source .src-dot { width: 4px; height: 4px; border-radius: 50%; background: #fff; opacity: 0.6; }
.hero-slide-headline {
  font: 800 1.55rem/1.2 "Inter", sans-serif;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.hero-counter {
  position: absolute; top: 0.7rem; right: 0.8rem;
  background: rgba(0,0,0,0.55); color: #fff;
  padding: 0.25rem 0.55rem; border-radius: 4px;
  font: 600 0.7rem/1 "Inter", sans-serif;
  z-index: 2;
}
.hero-arrow {
  position: absolute; bottom: 1rem; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: #fff; border: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
}
.hero-arrow:hover { background: rgba(0,0,0,0.8); }
.hero-arrow.prev { right: 60px; }
.hero-arrow.next { right: 1rem; }

/* Video backgrounds */
.hero-video-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.hero-video-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.2) 100%);
}

/* Ad badge */
.ad-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; padding: 0.35rem 0.7rem; border-radius: 6px;
  font: 700 0.7rem/1 "Inter", sans-serif;
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 0.6rem; box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}

/* Hero slide ad styling */
.hero-slide-ad { border: 2px solid #f59e0b; }
.hero-slide-ad .hero-slide-headline { color: #fcd34d; }

/* Hero slide tagline */
.hero-slide-tagline {
  font: 400 1rem/1.4 "Inter", sans-serif;
  color: rgba(255,255,255,0.85); margin-top: 0.5rem;
  max-width: 480px;
}

/* ===== HERO CARDS (under hero) ===== */
.hero-cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem; margin-top: 0.9rem;
}
.hero-card { display: flex; flex-direction: column; gap: 0.45rem; cursor: pointer; }
.hero-card-img {
  aspect-ratio: 16 / 10; border-radius: var(--radius);
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; color: #fff;
}
.hero-card h4 {
  font: 700 0.85rem/1.3 "Inter", sans-serif; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-card:hover h4 { color: var(--accent); }
.hero-card-meta {
  display: flex; align-items: center; gap: 0.4rem;
  font: 500 0.72rem/1 "Inter", sans-serif; color: var(--muted);
}
.hero-card-meta .source { color: var(--text); }

/* Mobile improvements for hero cards */
@media (max-width: 768px) {
  .hero-cards { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .hero-card-img { font-size: 1.8rem; }
  .hero-card h4 { font-size: 0.8rem; -webkit-line-clamp: 2; line-clamp: 2; }
}
@media (max-width: 560px) {
  /* Compact horizontal rows on phones so the cards don't take a full-width,
     tall image each. Thumbnail on the left, headline + meta on the right. */
  .hero-cards { grid-template-columns: 1fr; gap: 0.6rem; }
  .hero-card {
    flex-direction: row; align-items: center; gap: 0.7rem;
    padding-bottom: 0.6rem; border-bottom: 1px solid var(--line);
    min-width: 0;
  }
  .hero-card:last-child { border-bottom: 0; }
  .hero-card-img {
    width: 108px; height: 72px; aspect-ratio: auto;
    flex-shrink: 0; font-size: 1.5rem; border-radius: 8px;
  }
  .hero-card h4 {
    font-size: 0.88rem; -webkit-line-clamp: 3; line-clamp: 3;
    min-width: 0; overflow-wrap: anywhere;
  }
}

/* ===== TRENDING WITH THUMBS ===== */
.trending-list { list-style: none; }
.trending-list li {
  display: grid; grid-template-columns: 22px 1fr 44px;
  gap: 0.5rem; padding: 0.55rem 0;
  align-items: center; border-bottom: 1px solid #f3f4f6;
}
.trending-list li:last-child { border-bottom: 0; }
.trend-thumb {
  width: 44px; height: 44px; border-radius: 6px;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff;
}
.trend-text {
  font: 600 0.78rem/1.3 "Inter", sans-serif; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.trend-text:hover { color: var(--accent); }
.bolt { color: #fbbf24; margin-right: 0.2rem; }

/* Mobile improvements for trending */
@media (max-width: 480px) {
  .trending-list li { 
    grid-template-columns: 20px 1fr 40px; 
    gap: 0.4rem; padding: 0.5rem 0; 
  }
  .trend-thumb { width: 40px; height: 40px; font-size: 1rem; }
  .trend-text { font-size: 0.75rem; -webkit-line-clamp: 3; line-clamp: 3; }
}

/* ===== WEEKEND READS ===== */
.weekend-list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.weekend-list li {
  display: grid; grid-template-columns: 56px 1fr;
  gap: 0.5rem; align-items: center; cursor: pointer;
}
.weekend-thumb {
  width: 56px; height: 56px; border-radius: 6px;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff;
}
.weekend-info strong {
  display: block; font: 700 0.8rem/1.3 "Inter", sans-serif;
  margin-bottom: 0.15rem;
}
.weekend-info span {
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font: 500 0.74rem/1.3 "Inter", sans-serif; color: var(--muted);
}

/* ===== WEATHER CARD (right) ===== */
.weather-card, .games-card, .markets-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.95rem;
}
.weather-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.weather-head .sidebar-title { margin: 0; padding: 0; border: 0; }
.weather-loc { font: 600 0.8rem/1 "Inter", sans-serif; color: var(--accent); }
.weather-now { display: flex; align-items: center; gap: 0.7rem; padding: 0.4rem 0 0.7rem; }
.weather-now .weather-icon { font-size: 2.6rem; }
.weather-temp { display: block; font: 800 2rem/1 "Inter", sans-serif; }
.weather-feels { display: block; font: 500 0.74rem/1.3 "Inter", sans-serif; color: var(--muted); margin-top: 0.2rem; }
.weather-forecast {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem; padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}
.weather-forecast div {
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
  font: 500 0.72rem/1 "Inter", sans-serif;
}
.weather-forecast span { color: var(--muted); }
.weather-forecast .wf-icon { font-size: 1.3rem; margin: 0.15rem 0; }
.weather-forecast strong { font: 700 0.85rem/1 "Inter", sans-serif; color: var(--text); }
.weather-forecast em { font: 500 0.75rem/1 "Inter", sans-serif; color: var(--muted); font-style: normal; }
.weather-cta {
  width: 100%; background: var(--text); color: #fff;
  border: 0; padding: 0.6rem; border-radius: 999px;
  font: 600 0.78rem/1 "Inter", sans-serif;
  margin-top: 0.5rem;
}
.weather-cta:hover { background: #000; }

/* Mobile improvements for weather card */
@media (max-width: 768px) {
  .weather-card, .games-card, .markets-card { padding: 0.8rem; }
  .weather-now .weather-icon { font-size: 2.2rem; }
  .weather-temp { font-size: 1.6rem; }
  .weather-forecast div { font-size: 0.68rem; }
  .weather-forecast .wf-icon { font-size: 1.1rem; }
  .weather-forecast strong { font-size: 0.8rem; }
}
@media (max-width: 480px) {
  .weather-now { flex-direction: column; text-align: center; gap: 0.5rem; }
  .weather-now .weather-icon { font-size: 2rem; }
  .weather-temp { font-size: 1.4rem; }
  .weather-feels { font-size: 0.7rem; }
  .weather-cta { padding: 0.5rem; font-size: 0.75rem; }
}

/* ===== GAMES CARD ===== */
.games-card .sidebar-title { display: flex; justify-content: space-between; }
.games-card .chev { color: var(--muted); }
.games-list { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.games-list li {
  display: grid; grid-template-columns: 50px 1fr;
  gap: 0.6rem; align-items: center; cursor: pointer;
}
.game-thumb {
  width: 50px; height: 50px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff;
}
.game-info { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.game-tag {
  display: inline-block; align-self: flex-start;
  font: 700 0.6rem/1 "Inter", sans-serif;
  background: #fef08a; color: #713f12;
  padding: 0.2rem 0.4rem; border-radius: 3px;
  text-transform: uppercase; margin-bottom: 0.15rem;
}
.game-info strong { font: 700 0.78rem/1.2 "Inter", sans-serif; }
.game-info span { font: 500 0.7rem/1 "Inter", sans-serif; color: var(--muted); }

/* ===== FOR YOU SECTION ===== */
.foryou-section { margin-top: 0.5rem; }

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex; align-items: baseline; gap: 0.5rem;
  margin-bottom: 0.8rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
.section-title { font: 800 1.1rem/1.2 "Inter", sans-serif; }
.section-sub { font: 400 0.8rem/1.2 "Inter", sans-serif; color: var(--muted); }

/* ===== CATEGORY NEWS SLIDER ===== */
.cat-slider-section { margin-bottom: 1.3rem; }
.cat-tabs {
  display: flex; gap: 0.3rem; overflow-x: auto;
  padding-bottom: 0.5rem; margin-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  background: var(--surface-alt); border: 1px solid var(--line);
  padding: 0.45rem 0.85rem; border-radius: 999px;
  font: 600 0.78rem/1 "Inter", sans-serif; color: var(--text);
  white-space: nowrap; flex-shrink: 0;
}
.cat-tab:hover { background: var(--surface-hover); }
.cat-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.cat-slider {
  position: relative; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: #fff;
}
.cat-slider-track { display: flex; transition: transform 0.4s ease; }
.cat-slide {
  min-width: 100%;
  display: grid; grid-template-columns: 1.4fr 1fr;
  min-height: 230px;
}
.cat-slide-image {
  background: linear-gradient(135deg, var(--accent), #8a3fff);
  display: flex; align-items: center; justify-content: center;
  font-size: 4.5rem; color: #fff;
}
.cat-slide.health   .cat-slide-image { background: linear-gradient(135deg, #047857, #10b981); }
.cat-slide.sports   .cat-slide-image { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.cat-slide.entertainment .cat-slide-image { background: linear-gradient(135deg, #9d174d, #ec4899); }
.cat-slide.science  .cat-slide-image { background: linear-gradient(135deg, #1e3a5f, #38bdf8); }
.cat-slide.politics .cat-slide-image { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.cat-slide.lifestyle .cat-slide-image { background: linear-gradient(135deg, #b45309, #f59e0b); }
.cat-slide.business .cat-slide-image { background: linear-gradient(135deg, #6001d2, #a78bfa); }
.cat-slide.tech     .cat-slide-image { background: linear-gradient(135deg, #1f2937, #6b7280); }
.cat-slide.ads      .cat-slide-image { background: linear-gradient(135deg, #6001d2, #d946ef); }
.cat-slide.appstore .cat-slide-image { background: linear-gradient(135deg, #0ea5e9, #6001d2); }
.cat-slide.arch     .cat-slide-image { background: linear-gradient(135deg, #0f1726, #334155); color: #d5e8ff; }

.cat-slide-body { padding: 1.2rem 1.3rem; display: flex; flex-direction: column; justify-content: center; gap: 0.5rem; }
.cat-slide-body .cat-badge { align-self: flex-start; margin-bottom: 0; }
.cat-slide-body h3 {
  font: 800 1.1rem/1.25 "Inter", sans-serif;
  cursor: pointer;
}
.cat-slide-body h3:hover { color: var(--accent); }
.cat-slide-body p { font-size: 0.86rem; color: var(--muted); line-height: 1.45; }
.cat-slide-meta {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; color: var(--muted); margin-top: 0.2rem;
}
.cat-slide-meta .source { font-weight: 600; color: var(--text); }

@media (max-width: 640px) {
  .cat-slide { grid-template-columns: 1fr; min-height: auto; }
  .cat-slide-image { min-height: 130px; font-size: 3rem; }
}

/* ===== ARTICLE CARDS ===== */
.article-card { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.article-card:last-child { border-bottom: 0; }
.article-card.featured { padding: 1.2rem 0 1rem; }

.cat-badge {
  display: inline-block;
  font: 600 0.7rem/1 "Inter", sans-serif;
  color: var(--accent); background: var(--accent-light);
  padding: 0.25rem 0.5rem; border-radius: 3px;
  margin-bottom: 0.45rem;
}
.cat-badge.health { color: #047857; background: #d1fae5; }
.cat-badge.sports { color: #1e40af; background: #dbeafe; }
.cat-badge.entertainment { color: #9d174d; background: #fce7f3; }
.cat-badge.science { color: #1e3a5f; background: #e0f2fe; }
.cat-badge.politics { color: #7c3aed; background: #ede9fe; }
.cat-badge.lifestyle { color: #b45309; background: #fef3c7; }
.cat-badge.business { color: #6001d2; background: #f0e6ff; }
.cat-badge.tech { color: #1f2937; background: #e5e7eb; }

.headline {
  font: 700 0.97rem/1.35 "Inter", sans-serif;
  margin-bottom: 0.4rem; cursor: pointer;
}
.headline:hover { color: var(--accent); }
.article-card.featured .headline { font: 800 1.35rem/1.2 "Inter", sans-serif; margin-bottom: 0.5rem; }
.summary { font: 400 0.88rem/1.5 "Inter", sans-serif; color: var(--muted); margin-bottom: 0.5rem; }
.article-meta {
  display: flex; align-items: center; gap: 0.5rem;
  font: 400 0.78rem/1 "Inter", sans-serif; color: var(--muted);
}
.dot { width: 3px; height: 3px; border-radius: 50%; background: #d1d5db; }
.source { font-weight: 600; }
.comment-toggle {
  background: none; border: 0; color: var(--accent);
  font: 600 0.78rem/1 "Inter", sans-serif; padding: 0;
}
.comment-toggle:hover { text-decoration: underline; }

/* Mobile improvements for article cards */
@media (max-width: 768px) {
  .article-card { padding: 0.8rem 0; }
  .article-card.featured { padding: 1rem 0; }
  .headline { font-size: 0.92rem; }
  .article-card.featured .headline { font-size: 1.2rem; }
  .summary { font-size: 0.85rem; }
  .article-meta { font-size: 0.75rem; }
}
@media (max-width: 480px) {
  .article-card { padding: 0.7rem 0; }
  .article-card.featured { padding: 0.9rem 0; }
  .headline { font-size: 0.9rem; line-height: 1.3; }
  .article-card.featured .headline { font-size: 1.1rem; line-height: 1.25; }
  .summary { font-size: 0.82rem; line-height: 1.4; }
  .article-meta { font-size: 0.72rem; flex-wrap: wrap; gap: 0.4rem; }
  .cat-badge { font-size: 0.65rem; padding: 0.2rem 0.4rem; }
}

/* ===== COMMENTS ===== */
.comments-block {
  margin-top: 0.8rem; padding: 0.8rem;
  background: var(--surface-alt); border-radius: var(--radius);
}
.comments-list { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.7rem; }
.comment {
  display: flex; gap: 0.55rem;
  padding: 0.55rem; background: #fff;
  border-radius: var(--radius); border: 1px solid var(--line);
}
.comment .avatar { width: 28px; height: 28px; font-size: 0.75rem; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: baseline; gap: 0.4rem; margin-bottom: 0.15rem; }
.comment-head strong { font-size: 0.82rem; }
.comment-head span { font-size: 0.72rem; color: var(--muted); }
.comment-text { font-size: 0.85rem; line-height: 1.4; word-wrap: break-word; }
.no-comments { font-size: 0.82rem; color: var(--muted); font-style: italic; }

.comment-form { display: flex; gap: 0.5rem; align-items: flex-start; }
.comment-form textarea {
  flex: 1; min-height: 50px; resize: vertical;
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  padding: 0.5rem 0.6rem; font: 400 0.85rem/1.4 "Inter", sans-serif;
  outline: 0;
}
.comment-form textarea:focus { border-color: var(--accent); }
.comment-form button {
  background: var(--accent); color: #fff; border: 0;
  padding: 0.55rem 0.9rem; border-radius: var(--radius);
  font: 600 0.82rem/1 "Inter", sans-serif; align-self: stretch;
}
.comment-form button:hover { background: var(--accent-deep); }
.signin-prompt {
  text-align: center; padding: 0.8rem;
  font-size: 0.85rem; color: var(--muted);
}
.signin-prompt button {
  background: none; border: 0; color: var(--accent);
  font-weight: 600; text-decoration: underline;
}

/* ===== SIDEBAR ===== */
.sidebar-col { display: flex; flex-direction: column; gap: 1.2rem; }
.sidebar-section {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.9rem;
}
.sidebar-title {
  font: 800 0.9rem/1.2 "Inter", sans-serif;
  margin-bottom: 0.7rem; padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--accent);
}

/* ===== SLIDER ===== */
.slider-section { padding: 0.9rem; }
.slider { position: relative; overflow: hidden; border-radius: var(--radius); }
.slider-track {
  display: flex; transition: transform 0.4s ease;
}
.slide {
  min-width: 100%; padding: 1.2rem 1rem 2.2rem;
  background: linear-gradient(135deg, var(--accent), #8a3fff);
  color: #fff; border-radius: var(--radius);
}
.slide.green { background: linear-gradient(135deg, #047857, #10b981); }
.slide.blue { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.slide.orange { background: linear-gradient(135deg, #b45309, #f59e0b); }
.slide-label {
  display: inline-block;
  font: 700 0.65rem/1 "Inter", sans-serif;
  background: rgba(255,255,255,0.2); padding: 0.25rem 0.5rem;
  border-radius: 3px; margin-bottom: 0.5rem;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.slide h4 { font: 800 1rem/1.25 "Inter", sans-serif; margin-bottom: 0.3rem; }
.slide p { font: 400 0.82rem/1.4 "Inter", sans-serif; opacity: 0.92; margin-bottom: 0.6rem; }
.slide a {
  display: inline-block; background: #fff; color: var(--text);
  padding: 0.4rem 0.8rem; border-radius: 999px;
  font: 600 0.78rem/1 "Inter", sans-serif;
}
.slider-btn {
  position: absolute; top: 38%; transform: translateY(-50%);
  background: rgba(255,255,255,0.85); border: 0;
  width: 28px; height: 28px; border-radius: 50%;
  font-size: 0.75rem; color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.slider-btn:hover { background: #fff; }
.slider-btn.prev { left: 6px; }
.slider-btn.next { right: 6px; }
.slider-dots {
  position: absolute; bottom: 8px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 5px;
}
.slider-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.5); cursor: pointer;
}
.slider-dots span.active { background: #fff; width: 18px; border-radius: 999px; }

/* ===== TRENDING ===== */
.trending-list { list-style: none; }
.trending-list li {
  display: flex; gap: 0.6rem; padding: 0.55rem 0;
  border-bottom: 1px solid #f3f4f6;
}
.trending-list li:last-child { border-bottom: 0; }
.trend-num {
  font: 800 0.85rem/1 "Inter", sans-serif;
  color: var(--accent); min-width: 1.2rem;
  text-align: center; flex-shrink: 0; margin-top: 0.1rem;
}
.trending-list a { font: 500 0.82rem/1.4 "Inter", sans-serif; color: var(--text); }
.trending-list a:hover { color: var(--accent); text-decoration: underline; }
.see-more { display: block; margin-top: 0.5rem; font: 600 0.78rem/1 "Inter", sans-serif; color: var(--accent); }
.see-more:hover { text-decoration: underline; }

/* ===== WEATHER ===== */
.weather-widget { display: flex; flex-direction: column; gap: 0.7rem; }
.weather-main { display: flex; justify-content: space-between; align-items: flex-start; }
.weather-info { display: flex; flex-direction: column; gap: 0.15rem; }
.weather-city { font: 700 1rem/1 "Inter", sans-serif; }
.weather-condition { font: 400 0.78rem/1 "Inter", sans-serif; color: var(--muted); }
.weather-temp { font: 800 2.2rem/1 "Inter", sans-serif; }
.weather-forecast {
  display: flex; justify-content: space-between; gap: 0.3rem;
  padding-top: 0.5rem; border-top: 1px solid var(--line);
}
.weather-forecast div { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.weather-forecast span { font: 400 0.7rem/1 "Inter", sans-serif; color: var(--muted); }
.weather-forecast strong { font: 600 0.8rem/1 "Inter", sans-serif; }

/* ===== MARKETS ===== */
.market-list { list-style: none; display: flex; flex-direction: column; }
.market-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0; border-bottom: 1px solid #f3f4f6;
  font: 500 0.85rem/1 "Inter", sans-serif;
}
.market-list li:last-child { border-bottom: 0; }
.market-symbol { font-weight: 700; }
.up { color: var(--success); font-weight: 700; margin-left: 0.4rem; }
.down { color: var(--danger); font-weight: 700; margin-left: 0.4rem; }

/* ===== FULLWIDTH SECTIONS ===== */
.fullwidth-section { grid-column: 1 / -1; padding: 1.8rem 0 0.5rem; border-top: 1px solid var(--line); }

/* ===== AD PLANS ===== */
.plans-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.plan-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.2rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  position: relative;
}
.plan-card.featured {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow); transform: translateY(-4px);
}
.plan-badge {
  position: absolute; top: -10px; right: 12px;
  background: var(--accent); color: #fff;
  padding: 0.25rem 0.55rem; border-radius: 999px;
  font: 700 0.65rem/1 "Inter", sans-serif;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.plan-card h3 { font: 800 1.1rem/1 "Inter", sans-serif; }
.plan-price { font: 800 1.8rem/1 "Inter", sans-serif; color: var(--accent); }
.plan-price span { font: 500 0.85rem/1 "Inter", sans-serif; color: var(--muted); }
.plan-card ul { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; margin: 0.5rem 0; }
.plan-card li { font-size: 0.85rem; color: var(--text); padding-left: 1.2rem; position: relative; }
.plan-card li::before {
  content: "✓"; position: absolute; left: 0;
  color: var(--accent); font-weight: 700;
}
.plan-buy {
  background: var(--accent); color: #fff; border: 0;
  padding: 0.65rem 1rem; border-radius: var(--radius);
  font: 600 0.85rem/1 "Inter", sans-serif; margin-top: auto;
}
.plan-buy:hover { background: var(--accent-deep); }

.my-ads-block { background: var(--surface-alt); padding: 1rem; border-radius: var(--radius); }
.my-ads-block h3 { font: 700 0.95rem/1 "Inter", sans-serif; margin-bottom: 0.7rem; }
.ad-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.6rem; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 0.4rem;
}
.ad-row-info strong { font-size: 0.88rem; display: block; }
.ad-row-info span { font-size: 0.78rem; color: var(--muted); }
.ad-row button {
  background: transparent; border: 1px solid var(--danger);
  color: var(--danger); padding: 0.35rem 0.7rem;
  border-radius: var(--radius); font: 600 0.75rem/1 "Inter", sans-serif;
}
.ad-row button:hover { background: var(--danger); color: #fff; }

/* ===== APP STORE ===== */
.app-categories {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-bottom: 1rem;
}
.app-cat {
  background: var(--surface-alt); border: 1px solid var(--line);
  padding: 0.5rem 0.9rem; border-radius: 999px;
  font: 600 0.78rem/1 "Inter", sans-serif; color: var(--text);
}
.app-cat:hover { background: var(--surface-hover); }
.app-cat.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.app-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}
.app-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.9rem;
  display: flex; gap: 0.7rem; align-items: flex-start;
}
.app-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem; flex-shrink: 0; color: #fff;
}
.app-info { flex: 1; min-width: 0; }
.app-info h4 { font: 700 0.92rem/1.2 "Inter", sans-serif; margin-bottom: 0.15rem; }
.app-info p { font: 400 0.78rem/1.4 "Inter", sans-serif; color: var(--muted); margin-bottom: 0.45rem; }
.app-meta { display: flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; color: var(--muted); }
.app-install {
  background: var(--accent); color: #fff; border: 0;
  padding: 0.4rem 0.85rem; border-radius: 999px;
  font: 700 0.75rem/1 "Inter", sans-serif;
}
.app-install:hover { background: var(--accent-deep); }
.app-install.installed { background: var(--success); }

/* ===== ARCHITECTURE ===== */
.diagram {
  margin: 0.8rem 0;
  white-space: pre; overflow-x: auto;
  background: #0f1726; color: #d5e8ff;
  border-radius: var(--radius); padding: 1rem;
  font: 500 0.75rem/1.5 Consolas, Monaco, monospace;
}

/* ===== MODALS ===== */
.modal {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 23, 38, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.modal-box {
  position: relative; background: #fff;
  border-radius: 0.8rem; padding: 1.5rem;
  width: 100%; max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  max-height: 90vh; overflow-y: auto;
}
.modal-close {
  position: absolute; top: 0.7rem; right: 0.9rem;
  background: none; border: 0; font-size: 1.5rem;
  color: var(--muted); line-height: 1;
}
.modal-box h2 {
  font: 800 1.2rem/1.2 "Inter", sans-serif;
  margin-bottom: 1rem;
}

.tabs {
  display: flex; gap: 0; margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.tab {
  flex: 1; background: none; border: 0;
  padding: 0.7rem; font: 600 0.85rem/1 "Inter", sans-serif;
  color: var(--muted); border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.auth-form { display: flex; flex-direction: column; gap: 0.7rem; }
.field { display: flex; flex-direction: column; gap: 0.25rem; }
.field span { font: 600 0.78rem/1 "Inter", sans-serif; color: var(--text); }
.field input, .field textarea {
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  padding: 0.6rem 0.7rem; font: 400 0.9rem/1.3 "Inter", sans-serif;
  outline: 0; font-family: inherit;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.primary-btn {
  background: var(--accent); color: #fff; border: 0;
  padding: 0.75rem; border-radius: var(--radius);
  font: 700 0.9rem/1 "Inter", sans-serif;
  margin-top: 0.4rem;
}
.primary-btn:hover { background: var(--accent-deep); }
.auth-error { font-size: 0.82rem; color: var(--danger); min-height: 1em; }

.profile-view { text-align: center; }
.profile-view h2 { margin-bottom: 0.25rem; }
.profile-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem; margin-top: 1rem;
  padding-top: 1rem; border-top: 1px solid var(--line);
}
.profile-stats div { display: flex; flex-direction: column; gap: 0.15rem; }
.profile-stats strong { font: 800 1.1rem/1 "Inter", sans-serif; color: var(--accent); }
.profile-stats span { font: 400 0.75rem/1 "Inter", sans-serif; color: var(--muted); }

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 1rem; text-align: center;
  color: var(--muted); font: 400 0.78rem/1.5 "Inter", sans-serif;
}
.footer-links { margin-top: 0.4rem; font-size: 0.75rem; }
.footer-links a { color: var(--accent); text-decoration: none; font-weight: 600; }
.footer-links a:hover { text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .hero-block { grid-template-columns: 240px minmax(0, 1fr); }
  .hero-right { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .hero-right > section { flex: 1 1 280px; }
}
@media (max-width: 900px) {
  .mobile-menu-btn { display: flex; }
  .mega-nav { 
    position: fixed; top: 0; left: -100%; width: 280px; height: 100vh; 
    background: var(--surface); border-right: 1px solid var(--line);
    z-index: 300; transition: left 0.3s ease; overflow-y: auto;
  }
  .mega-nav.active { left: 0; }
  .nav-inner { 
    flex-direction: column; padding: 4rem 1rem 1rem; 
    gap: 0; overflow-x: visible;
  }
  .nav-item { 
    padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: 0.9rem;
    border-bottom-color: var(--line); margin-bottom: 0;
  }
  .nav-item:last-child { border-bottom: none; }
  .nav-item:hover { background: var(--surface-alt); padding-left: 1rem; }
  .nav-item.active { 
    border-bottom: 1px solid var(--accent); background: var(--accent-light); 
    color: var(--accent); font-weight: 700; 
  }
  .mobile-nav-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); 
    z-index: 250; opacity: 0; visibility: hidden; 
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .mobile-nav-overlay.active { opacity: 1; visibility: visible; }
}
@media (max-width: 800px) {
  /* Stack the hero block into a single column and put the image slider first,
     so the main content isn't buried under the trending/weekend sidebars. */
  .hero-block { display: flex; flex-direction: column; gap: 1.2rem; }
  /* min-width:0 lets these flex items shrink to the viewport instead of being
     forced wider by their content (which caused headlines to be cut off). */
  .hero-center, .hero-left, .hero-right { min-width: 0; max-width: 100%; }
  .hero-center { order: 1; }
  .hero-left { order: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .hero-right { order: 3; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .header-inner { flex-wrap: wrap; }
  .header-search { order: 3; max-width: 100%; width: 100%; margin-top: 0.3rem; }
  .ad-banner { flex-wrap: wrap; }
  .hero-cards { grid-template-columns: 1fr 1fr; }
  .hero-slide-headline { font-size: 1.15rem; }
  .header-actions .btn-mail, .header-actions .btn-signin { display: none; }
}
@media (max-width: 560px) {
  /* On phones everything is a single full-width column. */
  .hero-block { gap: 1rem; }
  .hero-left, .hero-right { grid-template-columns: 1fr; }
  .hero-cards { grid-template-columns: 1fr; }
  .hero-slider { aspect-ratio: 16 / 11; }
  .hero-slide-body { padding: 1rem 1.1rem; }
  .hero-slide-headline { font-size: 1.05rem; }
  .hero-slide-tagline { font-size: 0.85rem; }
  .hero-arrow { width: 32px; height: 32px; bottom: 0.7rem; }
  .hero-arrow.prev { right: 52px; }
  .hero-arrow.next { right: 0.7rem; }
  .plan-card.featured { transform: none; }
  .weather-temp { font-size: 1.7rem; }
  .header-inner { padding: 0.5rem 0.75rem; }
  .logo { font-size: 1.4rem; }
  .main-layout { padding: 0.75rem 0.75rem 1.5rem; }
  .sidebar-section { padding: 0.8rem; }
}

/* ===== SCRAPED ARTICLES ===== */
#scraped-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}
.scraped-card {
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}
.scraped-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.1); transform: translateY(-2px); }
.scraped-media {
  width: 100%; height: 160px; overflow: hidden; background: var(--line);
  display: flex; align-items: center; justify-content: center;
}
.scraped-media img {
  width: 100%; height: 100%; object-fit: cover;
}
.scraped-media iframe {
  width: 100%; height: 100%; border: 0;
}
.scraped-body { padding: 1rem 1.1rem; }
.scraped-body .headline a {
  color: var(--text); text-decoration: none;
}
.scraped-body .headline a:hover { color: var(--accent); text-decoration: underline; }
.scraped-body .summary {
  font-size: 0.85rem; color: var(--muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; margin-top: 0.3rem;
}
.empty-text {
  text-align: center; color: var(--muted); padding: 2rem;
}
.empty-text a { color: var(--accent); text-decoration: underline; }

/* ===== SCRAPED DETAIL MODAL ===== */
.modal-box.wide { max-width: 780px; }
.scraped-detail-header {
  position: relative;
  width: 100%;
  height: 280px;
  background-size: cover;
  background-position: center;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}
.scraped-detail-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 30%, rgba(0,0,0,0.7));
}
.scraped-detail-header h2 {
  position: absolute;
  bottom: 1.2rem;
  left: 1.5rem;
  right: 1.5rem;
  color: white;
  font: 800 1.4rem/1.2 "Inter", sans-serif;
  z-index: 1;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.scraped-detail-body {
  padding: 1.5rem;
}
.scraped-detail-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.scraped-detail-body p {
  line-height: 1.7;
  margin-bottom: 0.8rem;
  white-space: pre-wrap;
}
.scraped-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}
.scraped-gallery img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.15s;
}
.scraped-gallery img:hover { transform: scale(1.03); }
.scraped-video-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}
.scraped-video-gallery iframe,
.scraped-video-gallery video {
  width: 100%;
  height: 180px;
  border-radius: 6px;
  border: 0;
}
.scraped-read-more {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}
.scraped-card { cursor: pointer; }

/* =====================================================
   CATEGORY PAGE
===================================================== */
.cat-page-main { max-width: 1180px; margin: 0 auto; padding: 0 1rem 3rem; }

/* Hero banner */
.cat-hero {
  position: relative;
  border-radius: 18px;
  padding: 3rem 2.5rem;
  margin: 1.4rem 0 2rem;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.cat-hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(135deg, var(--cat-color, #6001d2), var(--cat-color-deep, #3a0080));
}
.cat-hero::after {
  content: var(--cat-emoji, "📰");
  position: absolute; right: -1rem; bottom: -2.5rem; z-index: -1;
  font-size: 13rem; line-height: 1; opacity: 0.14;
  transform: rotate(-8deg);
}
.cat-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font: 700 0.72rem/1 "Inter", sans-serif;
  text-transform: uppercase; letter-spacing: 0.12em;
  background: rgba(255,255,255,0.18);
  padding: 0.4rem 0.8rem; border-radius: 999px;
  margin-bottom: 1rem; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.cat-hero h1 {
  font: 900 2.8rem/1.05 "Inter", sans-serif;
  letter-spacing: -0.03em; margin-bottom: 0.7rem;
}
.cat-hero p {
  font: 400 1.05rem/1.5 "Inter", sans-serif;
  max-width: 540px; opacity: 0.92;
}
.cat-hero-stats {
  display: flex; gap: 2rem; margin-top: 1.6rem;
}
.cat-hero-stats div { display: flex; flex-direction: column; }
.cat-hero-stats strong { font: 800 1.6rem/1 "Inter", sans-serif; }
.cat-hero-stats span { font-size: 0.78rem; opacity: 0.85; margin-top: 0.2rem; }

/* Category chips bar */
.cat-chips {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  margin-bottom: 2rem;
}
.cat-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.55rem 1rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font: 600 0.85rem/1 "Inter", sans-serif; color: var(--text);
  transition: all 0.15s; cursor: pointer; white-space: nowrap;
}
.cat-chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.cat-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Mobile improvements for category page */
@media (max-width: 768px) {
  .cat-hero {
    padding: 2rem 1.5rem;
    margin: 1rem 0 1.5rem;
    border-radius: 14px;
  }
  .cat-hero h1 {
    font: 900 clamp(1.8rem, 6vw, 2.4rem)/1.1 "Inter", sans-serif;
    margin-bottom: 0.6rem;
  }
  .cat-hero p {
    font: 400 1rem/1.5 "Inter", sans-serif;
    max-width: 100%;
  }
  .cat-hero-stats {
    gap: 1.5rem;
    margin-top: 1.2rem;
  }
  .cat-hero-stats strong {
    font: 800 1.4rem/1 "Inter", sans-serif;
  }
  .cat-hero-stats span {
    font-size: 0.75rem;
  }
  .cat-chips {
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }
  .cat-chip {
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
  }
  .cat-section-head {
    margin: 1.5rem 0 0.9rem;
  }
  .cat-section-head h2 {
    font: 800 1.2rem/1 "Inter", sans-serif;
  }
}

@media (max-width: 480px) {
  .cat-hero {
    padding: 1.5rem 1rem;
    margin: 0.8rem 0 1.2rem;
    border-radius: 12px;
  }
  .cat-hero::after {
    font-size: 8rem;
    right: -1rem;
    bottom: -2rem;
  }
  .cat-hero-eyebrow {
    font: 700 0.65rem/1 "Inter", sans-serif;
    padding: 0.3rem 0.6rem;
    margin-bottom: 0.8rem;
  }
  .cat-hero h1 {
    font: 900 clamp(1.5rem, 7vw, 2rem)/1.15 "Inter", sans-serif;
    margin-bottom: 0.5rem;
  }
  .cat-hero p {
    font: 400 0.95rem/1.5 "Inter", sans-serif;
  }
  .cat-hero-stats {
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
  }
  .cat-hero-stats strong {
    font: 800 1.2rem/1 "Inter", sans-serif;
  }
  .cat-hero-stats span {
    font-size: 0.7rem;
  }
  .cat-chips {
    gap: 0.4rem;
    margin-bottom: 1.2rem;
  }
  .cat-chip {
    padding: 0.45rem 0.8rem;
    font-size: 0.75rem;
  }
  .cat-section-head {
    margin: 1.2rem 0 0.8rem;
  }
  .cat-section-head h2 {
    font: 800 1.1rem/1 "Inter", sans-serif;
  }
}

/* Section heading */
.cat-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 2rem 0 1.1rem;
}
.cat-section-head h2 {
  font: 800 1.4rem/1 "Inter", sans-serif; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 0.6rem;
}
.cat-section-head h2::before {
  content: ""; width: 4px; height: 1.3rem; border-radius: 2px;
  background: var(--cat-color, var(--accent));
}

/* Article grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.4rem;
}
.cat-article {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  cursor: pointer; min-height: 220px;
}
.cat-article:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
  border-color: var(--cat-color, var(--accent));
}
.cat-article-media {
  height: 170px; background-size: cover; background-position: center;
  position: relative; background-color: var(--surface-alt);
}
.cat-article-media .play-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.cat-article-media.placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--cat-color, #6001d2), var(--cat-color-deep, #3a0080));
}
.cat-article-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; gap: 0.5rem; }
.cat-article-body h3 {
  font: 700 1.02rem/1.3 "Inter", sans-serif;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.cat-article:hover .cat-article-body h3 { color: var(--cat-color, var(--accent)); }
.cat-article-body .summary {
  font-size: 0.86rem; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cat-article-meta {
  margin-top: auto; display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.76rem; color: var(--muted);
}

/* Featured (first) article spans wider */
.cat-grid .cat-article.featured {
  grid-column: span 2; flex-direction: row; min-height: 280px;
}
.cat-grid .cat-article.featured .cat-article-media { height: auto; width: 48%; flex-shrink: 0; }
.cat-grid .cat-article.featured .cat-article-body { justify-content: center; }
.cat-grid .cat-article.featured h3 { font-size: 1.5rem; -webkit-line-clamp: 4; line-clamp: 4; }

/* Empty state */
.cat-empty {
  text-align: center; padding: 4rem 1rem; color: var(--muted);
  grid-column: 1 / -1;
}
.cat-empty .big-emoji { font-size: 3.5rem; display: block; margin-bottom: 1rem; opacity: 0.5; }
.cat-empty h3 { font: 700 1.2rem/1.3 "Inter", sans-serif; color: var(--text); margin-bottom: 0.5rem; }

@media (max-width: 720px) {
  .cat-hero { padding: 2rem 1.4rem; }
  .cat-hero h1 { font-size: 2rem; }
  .cat-grid .cat-article.featured { grid-column: span 1; flex-direction: column; }
  .cat-grid .cat-article.featured .cat-article-media { width: 100%; height: 170px; }
  .cat-grid .cat-article.featured h3 { font-size: 1.2rem; }
}

/* Mobile improvements for category grids */
@media (max-width: 768px) {
  .cat-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
  }
  .cat-article {
    min-height: 200px;
    border-radius: 12px;
  }
  .cat-article-media {
    height: 150px;
  }
  .cat-article-body {
    padding: 1rem;
  }
  .cat-article h3 {
    font: 700 0.95rem/1.3 "Inter", sans-serif;
  }
  .cat-article p {
    font: 400 0.8rem/1.4 "Inter", sans-serif;
  }
  .cat-article-meta {
    font: 500 0.7rem/1 "Inter", sans-serif;
  }
  .event-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
  }
  .event-card {
    min-height: 240px;
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  .cat-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .cat-article {
    min-height: 180px;
    border-radius: 10px;
  }
  .cat-article-media {
    height: 130px;
  }
  .cat-article-body {
    padding: 0.9rem;
  }
  .cat-article h3 {
    font: 700 0.9rem/1.3 "Inter", sans-serif;
    -webkit-line-clamp: 3; line-clamp: 3;
  }
  .cat-article p {
    font: 400 0.78rem/1.4 "Inter", sans-serif;
    -webkit-line-clamp: 2; line-clamp: 2;
  }
  .cat-article-meta {
    font: 500 0.68rem/1 "Inter", sans-serif;
  }
  .event-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .event-card {
    min-height: 200px;
    border-radius: 10px;
  }
  .cat-empty {
    padding: 3rem 0.8rem;
  }
  .cat-empty .big-emoji {
    font-size: 3rem;
  }
  .cat-empty h3 {
    font: 700 1.1rem/1.3 "Inter", sans-serif;
  }
}

/* =====================================================
   EVENTS (Lavi category)
===================================================== */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.4rem;
}

.event-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s;
  cursor: pointer; min-height: 260px;
}
.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
  border-color: var(--cat-color, var(--accent));
}
.event-card.featured {
  grid-column: span 2; flex-direction: row; min-height: 300px;
}
.event-card.featured .event-img { height: auto; width: 48%; flex-shrink: 0; }
.event-card.featured .event-body { justify-content: center; }
.event-card.featured h3 { font-size: 1.5rem; }

.event-img {
  height: 180px; background-size: cover; background-position: center;
  background-color: var(--surface-alt); position: relative;
}
.event-img.placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--cat-color, #db2777), var(--cat-color-deep, #9d174d));
}

.event-body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex; flex-direction: column; flex: 1; gap: 0.5rem;
}
.event-date-pill {
  display: inline-flex; align-self: flex-start;
  background: var(--cat-color, var(--accent)); color: #fff;
  padding: 0.3rem 0.7rem; border-radius: 999px;
  font: 700 0.75rem/1 "Inter", sans-serif;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.event-body h3 {
  font: 700 1.1rem/1.25 "Inter", sans-serif;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.event-card:hover .event-body h3 { color: var(--cat-color, var(--accent)); }
.event-desc {
  font-size: 0.86rem; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.event-meta-row {
  margin-top: auto; display: flex; align-items: center;
  justify-content: space-between; gap: 0.5rem;
  font-size: 0.78rem;
}
.event-venue {
  color: var(--muted); display: flex; align-items: center; gap: 0.25rem;
}

/* Event filter chips */
.event-chips {
  display: flex; flex-wrap: wrap; gap: 0.55rem;
  margin-bottom: 1.8rem;
}
.event-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font: 600 0.82rem/1 "Inter", sans-serif; color: var(--text);
  transition: all 0.15s; cursor: pointer; white-space: nowrap;
}
.event-chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.event-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

@media (max-width: 720px) {
  .event-grid { grid-template-columns: 1fr; }
  .event-card.featured { grid-column: span 1; flex-direction: column; }
  .event-card.featured .event-img { width: 100%; height: 180px; }
  .event-card.featured h3 { font-size: 1.15rem; }
}

/* =====================================================
   DEDICATED APP STORE PAGE — Microsoft Store Style
===================================================== */
.store-main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
}

/* Sidebar */
.store-sidebar {
  position: sticky;
  top: 1rem;
  align-self: start;
}
.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.sidebar-title {
  font: 800 0.7rem/1 "Inter", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.25rem;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  font: 600 0.85rem/1 "Inter", sans-serif;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}
.sidebar-item:hover { background: var(--surface-hover); }
.sidebar-item.active { background: var(--surface-hover); font-weight: 700; }
.sidebar-icon { font-size: 1.05rem; line-height: 1; }

/* Toolbar */
.store-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin: 1.2rem 0 1.2rem;
}
.store-search {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
}
.store-search span { color: var(--muted); font-size: 1rem; }
.store-search input {
  border: 0;
  outline: 0;
  flex: 1;
  font: 500 0.9rem/1 "Inter", sans-serif;
  background: transparent;
}
.store-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.store-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  font: 600 0.8rem/1 "Inter", sans-serif;
  transition: color 0.15s, background 0.15s;
}
.store-tab:hover { color: var(--text); background: var(--surface-hover); }
.store-tab.active { background: var(--surface-hover); color: var(--text); font-weight: 700; }

/* Hero Carousel */
.store-carousel-wrap {
  position: relative;
  margin: 0 0 2.5rem;
}
.store-carousel {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.25rem 0;
  scrollbar-width: none;
}
.store-carousel::-webkit-scrollbar { display: none; }
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-size: 1.3rem;
  color: var(--text);
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, transform 0.15s;
}
.carousel-arrow:hover { transform: translateY(-50%) scale(1.05); }
.store-carousel-wrap:hover .carousel-arrow { opacity: 1; }
.carousel-arrow.prev { left: -18px; }
.carousel-arrow.next { right: -18px; }

.store-hero-card {
  flex: 0 0 240px;
  height: 320px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.store-hero-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}
.store-hero-card .card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.store-hero-card .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.25) 40%, rgba(0,0,0,0.05) 70%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}
.store-hero-card .card-tag {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  font: 700 0.68rem/1 "Inter", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.store-hero-card .card-icon {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.2rem;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
}
.store-hero-card h3 {
  color: #fff;
  font: 800 1.05rem/1.2 "Inter", sans-serif;
  margin-bottom: 0.2rem;
}
.store-hero-card .card-dev {
  color: rgba(255,255,255,0.75);
  font-size: 0.78rem;
  margin-bottom: 0.4rem;
}
.store-hero-card .card-price {
  display: inline-block;
  background: rgba(255,255,255,0.95);
  color: var(--text);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font: 700 0.75rem/1 "Inter", sans-serif;
  width: fit-content;
}

/* Row Sections */
.store-row { margin-bottom: 2.5rem; }
.store-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.store-row-head h2 {
  font: 800 1.25rem/1 "Inter", sans-serif;
  letter-spacing: -0.02em;
}
.store-row-link {
  font: 600 0.85rem/1 "Inter", sans-serif;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.store-row-link:hover { text-decoration: underline; }

/* Compact App Grid */
.store-row-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.5rem;
}
.store-compact-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem;
  border-radius: 8px;
  transition: background 0.15s;
  cursor: pointer;
}
.store-compact-card:hover { background: var(--surface-hover); }
.store-compact-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.store-compact-info { min-width: 0; flex: 1; }
.store-compact-info h4 {
  font: 700 0.9rem/1.25 "Inter", sans-serif;
  margin-bottom: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.store-compact-info p {
  color: var(--muted);
  font-size: 0.76rem;
  margin: 0;
}
.store-compact-price {
  font: 700 0.8rem/1 "Inter", sans-serif;
  color: var(--text);
  white-space: nowrap;
}

/* Curated Row */
.store-curated {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.25rem 0;
  scrollbar-width: none;
}
.store-curated::-webkit-scrollbar { display: none; }
.store-curated-card {
  flex: 0 0 360px;
  height: 200px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.store-curated-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}
.store-curated-card .card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.store-curated-card .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 45%, transparent 70%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}
.store-curated-card .badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  background: rgba(0,0,0,0.65);
  color: #fff;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  font: 700 0.68rem/1 "Inter", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.store-curated-card h3 {
  color: #fff;
  font: 800 1.05rem/1.25 "Inter", sans-serif;
  margin-bottom: 0.25rem;
}
.store-curated-card p {
  color: rgba(255,255,255,0.85);
  font-size: 0.8rem;
  line-height: 1.4;
}

/* App install button inline */
.app-install {
  border: 0;
  border-radius: 4px;
  padding: 0.4rem 0.9rem;
  font: 700 0.78rem/1 "Inter", sans-serif;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.app-install:hover { background: var(--accent-deep); }
.app-install.installed {
  background: var(--surface-alt);
  color: var(--success);
  border: 1px solid var(--line);
}

@media (max-width: 820px) {
  .store-main { grid-template-columns: 1fr; padding: 0 1rem 2rem; }
  .store-sidebar { display: none; }
  .store-toolbar { grid-template-columns: 1fr; }
  .store-tabs { justify-content: flex-start; }
  .store-hero-card { flex: 0 0 180px; height: 260px; }
  .carousel-arrow { display: none; }
  .store-row-grid { grid-template-columns: 1fr; }
  .store-curated-card { flex: 0 0 280px; height: 160px; }
}

/* =====================================================
   CATEGORY PAGE — APP STORE STYLE REDESIGN
===================================================== */
.cat-page-main.app-style { max-width: 1180px; }
.cat-page-main.app-style .cat-hero {
  border-radius: 24px;
  padding: 3.2rem 2.5rem;
  margin: 1.4rem 0 1.5rem;
  background:
    radial-gradient(circle at 88% 15%, rgba(255,255,255,0.28), transparent 28%),
    linear-gradient(135deg, #111827, var(--cat-color, #6001d2) 55%, var(--cat-color-deep, #0ea5e9));
  box-shadow: 0 18px 50px rgba(0,0,0,0.12);
}
.cat-page-main.app-style .cat-hero::before { display: none; }
.cat-page-main.app-style .cat-hero::after {
  right: -1.5rem;
  bottom: -4rem;
  font-size: 17rem;
  opacity: 0.13;
}
.cat-page-main.app-style .cat-hero-eyebrow {
  background: rgba(255,255,255,0.18);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.cat-page-main.app-style .cat-hero h1 {
  max-width: 700px;
  font-size: 3rem;
}
.cat-page-main.app-style .cat-hero p {
  max-width: 650px;
}
.cat-page-main.app-style .cat-hero-stats {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 18px;
  padding: 1rem;
  width: fit-content;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.cat-page-main.app-style .cat-chips {
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}
.cat-page-main.app-style .cat-chip {
  padding: 0.72rem 1rem;
  border-radius: 999px;
  font-weight: 800;
}
.cat-page-main.app-style .cat-section-head {
  align-items: end;
  margin: 2rem 0 1rem;
}
.cat-page-main.app-style .cat-section-head h2 {
  font: 900 1.45rem/1 "Inter", sans-serif;
}
.cat-page-main.app-style .cat-section-head h2::before { display: none; }
.cat-featured-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.2rem;
  margin-bottom: 2rem;
}
.cat-feature-card {
  min-height: 280px;
  border-radius: 22px;
  padding: 1.5rem;
  color: #fff;
  background:
    radial-gradient(circle at 88% 18%, rgba(255,255,255,0.22), transparent 28%),
    linear-gradient(135deg, var(--cat-color, #6001d2), var(--cat-color-deep, #111827));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.cat-feature-card.secondary {
  background:
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.2), transparent 30%),
    linear-gradient(135deg, #111827, var(--cat-color, #6001d2));
}
.cat-feature-card::after {
  content: attr(data-icon);
  position: absolute;
  right: 1rem;
  bottom: -0.75rem;
  font-size: 9rem;
  opacity: 0.14;
}
.cat-feature-label {
  font: 800 0.68rem/1 "Inter", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.84;
}
.cat-feature-card h2 {
  max-width: 500px;
  font: 900 2rem/1.1 "Inter", sans-serif;
  letter-spacing: -0.025em;
}
.cat-feature-card p {
  max-width: 480px;
  line-height: 1.5;
  opacity: 0.9;
}
.cat-feature-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
}
.cat-feature-link {
  background: #fff;
  color: #111827;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font: 800 0.78rem/1 "Inter", sans-serif;
  white-space: nowrap;
}
.cat-page-main.app-style .cat-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.cat-page-main.app-style .cat-article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  min-height: unset;
  border-radius: 18px;
  padding: 1rem;
  overflow: visible;
}
.cat-page-main.app-style .cat-article-media {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
}
.cat-page-main.app-style .cat-article-media.placeholder {
  font-size: 1.8rem;
  color: #fff;
}
.cat-page-main.app-style .cat-article-media .play-badge {
  font-size: 1.2rem;
  background: rgba(0,0,0,0.24);
}
.cat-page-main.app-style .cat-article-body {
  padding: 0;
  min-width: 0;
}
.cat-page-main.app-style .cat-article-body h3 {
  font-size: 1rem;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.cat-page-main.app-style .cat-article-body .summary {
  margin: 0;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.cat-page-main.app-style .cat-grid .cat-article.featured {
  grid-column: span 1;
  flex-direction: unset;
  min-height: unset;
}
.cat-page-main.app-style .cat-grid .cat-article.featured .cat-article-media {
  width: 62px;
  height: 62px;
}
.cat-page-main.app-style .cat-grid .cat-article.featured h3 { font-size: 1rem; }

@media (max-width: 820px) {
  .cat-featured-grid { grid-template-columns: 1fr; }
  .cat-page-main.app-style .cat-hero { padding: 2.2rem 1.4rem; }
  .cat-page-main.app-style .cat-hero h1 { font-size: 2.2rem; }
  .cat-page-main.app-style .cat-hero-stats { width: 100%; flex-wrap: wrap; }
}

/* ===== MORE TOP STORIES ===== */
#top-stories .top-stories-header {
  border-bottom: 2px solid #1a73e8;
}
.top-stories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem 2.5rem;
}
.top-story {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.85rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.top-story:hover .ts-headline { color: var(--accent); }
.ts-thumb {
  width: 72px; height: 54px;
  border-radius: 4px; overflow: hidden;
  background: var(--surface-alt);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ts-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ts-thumb-icon { font-size: 1.5rem; opacity: 0.5; }
.ts-body { min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.ts-headline {
  font: 600 0.92rem/1.25 "Inter", sans-serif;
  color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.ts-cat {
  font: 700 0.68rem/1 "Inter", sans-serif;
  letter-spacing: 0.03em;
  color: var(--accent);
}
.ts-cat.health { color: #047857; }
.ts-cat.sports { color: #1e40af; }
.ts-cat.entertainment { color: #9d174d; }
.ts-cat.science { color: #1e3a5f; }
.ts-cat.politics, .ts-cat.politik { color: #7c3aed; }
.ts-cat.lifestyle { color: #b45309; }
.ts-cat.business { color: #6001d2; }
.ts-cat.tech { color: #1f2937; }
.ts-meta {
  display: flex; align-items: center; gap: 0.4rem;
  font: 500 0.72rem/1 "Inter", sans-serif; color: var(--muted);
  margin-top: 0.1rem;
}
.ts-meta .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--muted); opacity: 0.6; display: inline-block;
}
.ts-comments { white-space: nowrap; }

@media (max-width: 720px) {
  .top-stories-grid { grid-template-columns: 1fr; gap: 0; }
}

/* ===== INTERNAL ARTICLE PAGE ===== */
.article-page-main {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}
.article-detail-page {
  background: var(--surface);
}
.article-back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--accent);
  font-weight: 700;
}
.article-page-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
}
.article-detail-page h1 {
  font: 900 clamp(2rem, 5vw, 3.5rem)/1.05 "Inter", sans-serif;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}
.article-page-summary {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 1.4rem;
}
.article-page-hero,
.article-page-video {
  margin: 1.4rem 0;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--surface-alt);
}
.article-page-hero img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}
.article-page-video iframe,
.article-page-videos iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
}
.article-page-body {
  font: 400 1.05rem/1.8 "Inter", sans-serif;
  color: var(--text);
}
.article-page-body p {
  margin: 0 0 1.2rem;
}
.article-page-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin-top: 1.5rem;
}
.article-page-gallery img {
  width: 100%;
  border-radius: 0.7rem;
  object-fit: cover;
}
.article-page-videos {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}
.article-original-link {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.article-original-link a {
  color: var(--accent);
  font-weight: 800;
}

@media (max-width: 720px) {
  .article-page-gallery { grid-template-columns: 1fr; }
}

/* Mobile improvements for article page */
@media (max-width: 768px) {
  .article-page-main {
    padding: 1.5rem 0.75rem 2rem;
  }
  .article-detail-page h1 {
    font: 900 clamp(1.6rem, 6vw, 2.5rem)/1.1 "Inter", sans-serif;
    margin-bottom: 0.8rem;
  }
  .article-page-summary {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
  }
  .article-page-hero,
  .article-page-video {
    margin: 1.2rem 0;
    border-radius: 0.8rem;
  }
  .article-page-hero img {
    max-height: 400px;
  }
  .article-page-body {
    font: 400 1rem/1.7 "Inter", sans-serif;
  }
  .article-page-body p {
    margin-bottom: 1rem;
  }
  .article-page-meta {
    font-size: 0.8rem;
    gap: 0.4rem;
  }
}

@media (max-width: 480px) {
  .article-page-main {
    padding: 1rem 0.5rem 1.5rem;
  }
  .article-back-link {
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
  }
  .article-detail-page h1 {
    font: 900 clamp(1.4rem, 7vw, 2rem)/1.15 "Inter", sans-serif;
    margin-bottom: 0.6rem;
  }
  .article-page-summary {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
  }
  .article-page-hero,
  .article-page-video {
    margin: 1rem 0;
    border-radius: 0.6rem;
  }
  .article-page-hero img {
    max-height: 300px;
  }
  .article-page-video iframe,
  .article-page-videos iframe {
    aspect-ratio: 16 / 10;
    min-height: 200px;
  }
  .article-page-body {
    font: 400 0.95rem/1.6 "Inter", sans-serif;
  }
  .article-page-body p {
    margin-bottom: 0.9rem;
  }
  .article-page-gallery img {
    border-radius: 0.5rem;
  }
  .article-page-meta {
    font-size: 0.75rem;
    gap: 0.3rem;
    margin-bottom: 0.6rem;
  }
  .article-original-link {
    margin-top: 1.5rem;
    padding-top: 0.8rem;
  }
  .cat-badge {
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
  }
}
