:root {
  --bg: #ffffff;
  --bg-soft: #f4f5f7;
  --ink: #111318;
  --ink-soft: #4a4f5a;
  --muted: #7a8290;
  --line: #e2e4e9;
  --accent: #d42020;
  --accent-dark: #b01818;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 60px;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
a { color: inherit; text-decoration: none; }

/* ===== Masthead ===== */
.masthead {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.masthead-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px;
  background: var(--accent);
  color: #fff;
  font-family: var(--serif);
  font-size: 26px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
}
.brand h1 { font-family: var(--serif); font-size: 24px; font-weight: 700; letter-spacing: -0.5px; }
.tagline { color: var(--muted); font-size: 12px; margin-top: 1px; }

.masthead-right { display: flex; align-items: center; gap: 18px; }
.live-clock { font-family: var(--serif); font-size: 15px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.live-status { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--ink-soft); background: var(--bg-soft); padding: 5px 12px; border-radius: 999px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #1c9a54; position: relative; }
.pulse::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; background: rgba(28,154,84,0.4); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { transform: scale(0.6); opacity: 0.8; } 80%,100% { transform: scale(1.6); opacity: 0; } }

/* ===== Nav ===== */
.cat-nav { border-top: 1px solid var(--line); }
.cat-nav-inner { display: flex; gap: 2px; overflow-x: auto; }
.cat-btn {
  background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-size: 14px; font-weight: 700;
  color: var(--ink-soft);
  padding: 12px 18px;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.cat-btn:hover { color: var(--ink); }
.cat-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ===== Page layout ===== */
.page { padding-top: 28px; }

/* ===== Hero ===== */
.hero { display: grid; grid-template-columns: 1.9fr 1fr; gap: 22px; margin-bottom: 40px; }
.hero-main { position: relative; border-radius: 10px; overflow: hidden; background: #000; }
.hero-main img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; opacity: 0.82; display: block; }
.hero-noimg {
  width: 100%; min-height: 420px; display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 72px; color: #4a4f5a; background: var(--bg-soft);
}
.hero-main .hero-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 70px 26px 26px;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 40%, rgba(0,0,0,0) 100%);
  color: #fff;
}
.hero-main h2 { font-family: var(--serif); font-size: 30px; line-height: 1.25; margin: 10px 0 8px; }
.hero-main h2 a:hover { text-decoration: underline; text-decoration-color: rgba(255,255,255,0.6); text-underline-offset: 4px; }
.hero-main .hero-desc { color: rgba(255,255,255,0.85); font-size: 14px; }
.hero-badge { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; padding: 4px 10px; border-radius: 3px; background: var(--accent); color: #fff; }

.hero-side { display: flex; flex-direction: column; gap: 14px; }
.hero-side-item { display: grid; grid-template-columns: 118px 1fr; gap: 14px; align-items: start; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.hero-side-item:last-child { border-bottom: none; padding-bottom: 0; }
.hero-side-item img { width: 118px; height: 78px; object-fit: cover; border-radius: 6px; background: var(--bg-soft); }
.hero-side-item .hs-noimg { width: 118px; height: 78px; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 34px; color: var(--muted); background: var(--bg-soft); border-radius: 6px; }
.hero-side-item h3 { font-family: var(--serif); font-size: 15.5px; line-height: 1.35; font-weight: 600; }
.hero-side-item h3 a:hover { color: var(--accent); }
.hero-side-item .src { font-size: 11.5px; color: var(--muted); margin-top: 5px; font-weight: 600; }

/* ===== Section block ===== */
.section-block { margin-bottom: 44px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 18px; }
.section-head h2 { font-family: var(--serif); font-size: 22px; font-weight: 700; }
.section-head h2::before { content: ''; display: inline-block; width: 14px; height: 3px; background: var(--accent); margin-right: 10px; vertical-align: 4px; }
.last-update { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ===== Latest list ===== */
.latest-list { list-style: none; }
.latest-list li {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 18px;
  align-items: baseline;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
}
.latest-list .t { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.latest-list .tt { font-family: var(--serif); font-size: 17px; line-height: 1.4; font-weight: 600; }
.latest-list .tt a:hover { color: var(--accent); }
.latest-list .meta { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; margin-top: 4px; }
.latest-list .cat-flag { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 3px; color: #fff; }

/* ===== Category grid ===== */
.category-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.cat-section h3 { font-family: var(--serif); font-size: 20px; display: flex; align-items: center; gap: 8px; padding-bottom: 8px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.cat-section h3 .count { font-size: 12px; color: var(--muted); font-family: var(--sans); font-weight: 600; }
.cat-section ul { list-style: none; }
.cat-section li { display: flex; gap: 14px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.cat-section li img { width: 108px; height: 70px; object-fit: cover; border-radius: 5px; flex-shrink: 0; background: var(--bg-soft); }
.cat-section li .cn-noimg { width: 108px; height: 70px; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 26px; color: var(--muted); background: var(--bg-soft); border-radius: 5px; flex-shrink: 0; }
.cat-section li h4 { font-family: var(--serif); font-size: 15px; line-height: 1.35; font-weight: 600; }
.cat-section li h4 a:hover { color: var(--accent); }
.cat-section li .m { font-size: 11.5px; color: var(--muted); margin-top: 4px; font-weight: 600; }
.cat-section li .m em { font-style: normal; color: var(--accent-dark); font-weight: 700; }

/* ===== Category colors ===== */
.c-teknologi { background: #1a5fb4; }
.c-bola { background: #1c9a54; }
.c-makanan { background: #c07a12; }
.t-teknologi { color: #1a5fb4; }
.t-bola { color: #1c9a54; }
.t-makanan { color: #c07a12; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 28px 20px 34px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 30px;
}
.site-footer strong { color: var(--ink); font-family: var(--serif); }
.footer-sources { margin-top: 8px; line-height: 1.8; }
.disclaimer { margin-top: 8px; opacity: 0.75; }

/* ===== Refresh FAB ===== */
.refresh-fab {
  position: fixed; right: 22px; bottom: 22px;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  font-size: 22px; box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transition: transform 0.2s, background 0.2s;
  z-index: 60;
}
.refresh-fab:hover { background: var(--accent-dark); }
.refresh-fab.spinning { animation: spin 0.7s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-main img, .hero-noimg { min-height: 300px; }
  .category-grid { grid-template-columns: 1fr; }
  .masthead-right { display: none; }
}
@media (max-width: 560px) {
  .latest-list li { grid-template-columns: 40px 1fr; }
  .latest-list .t { grid-column: 1; }
  .latest-list .tt { grid-column: 2; }
  .latest-list .meta { margin-top: 2px; }
  .hero-main h2 { font-size: 23px; }
  .hero-side-item { grid-template-columns: 92px 1fr; gap: 12px; }
  .hero-side-item img, .hero-side-item .hs-noimg { width: 92px; height: 66px; }
}