:root {
  --bg: #fafafa;
  --card: #ffffff;
  --card2: #f5f5f5;
  --border: #e0e0e0;
  --text: #1a1a1a;
  --muted: #666666;
  --accent: #e65100;
  --accent2: #ff6d00;
  --accent3: #f9c800;
  --accent4: #fdb813;
  --dark: #111111;
  --success: #43a047;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* TOP BAR */
.top-bar {
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  padding: 6px 0;
  text-align: center;
}
.top-bar span { color: var(--accent4); font-weight: 700; }
.live-section { border: 2px solid var(--accent); border-radius: 12px; overflow: hidden; }
.live-header { background: var(--accent); color: #fff; padding: 10px 16px; font-weight: 800; font-size: 0.85rem; }

/* NAV */
nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  gap: 20px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--dark);
  flex-shrink: 0;
}
.nav-logo span { color: var(--accent); }
.nav-logo img { height: 48px; width: auto; }
.nav-logo .tagline {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-left: 1px solid var(--border);
  padding-left: 10px;
  margin-left: 2px;
  line-height: 1.2;
}
.nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.nav-links a {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.15s;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--dark);
  color: var(--accent4);
}
.nav-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.nav-search {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.82rem;
  width: 180px;
  transition: border-color 0.2s;
}
.nav-search:focus { outline: none; border-color: var(--accent); }
.btn-sm {
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}
.btn-primary-sm { background: var(--accent); color: #fff; }
.btn-primary-sm:hover { background: var(--accent2); }

/* BREAKING NEWS TICKER */
.ticker-wrap {
  background: var(--accent);
  color: #fff;
  padding: 8px 0;
  overflow: hidden;
}
.ticker-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 20px;
  align-items: center;
}
.ticker-label {
  background: rgba(0,0,0,0.2);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-items { display: flex; gap: 30px; overflow: hidden; }
.ticker-item { font-size: 0.82rem; font-weight: 500; white-space: nowrap; }
.ticker-item a:hover { text-decoration: underline; }

/* MAIN LAYOUT */
.main { max-width: 1100px; margin: 0 auto; padding: 20px; display: grid; grid-template-columns: 1fr 300px; gap: 24px; }

/* ARTICLE GRID */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.article-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
}
.article-card:hover {
  border-color: var(--accent3);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.article-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--card2);
  display: block;
}
.article-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--dark) 0%, #2a2a2a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255,255,255,0.15);
  overflow: hidden;
}
.article-img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.article-body { padding: 14px 16px; }
.article-meta { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.article-cat {
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}
.article-time { font-size: 0.72rem; color: var(--muted); }
.article-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-title:hover { color: var(--accent); }
.article-excerpt {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}
.article-footer { display: flex; justify-content: space-between; align-items: center; }
.article-source { font-size: 0.72rem; color: var(--muted); }
.article-read {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* SIDEBAR */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.widget-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent4);
  display: flex;
  align-items: center;
  gap: 6px;
}
.widget-title .emoji { font-size: 1rem; }
.widget-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.widget-list li { display: flex; gap: 10px; align-items: flex-start; }
.widget-list .num {
  background: var(--dark);
  color: var(--accent4);
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
}
.widget-list a { font-size: 0.82rem; font-weight: 600; color: var(--text); line-height: 1.35; }
.widget-list a:hover { color: var(--accent); }
.widget-list .time { font-size: 0.7rem; color: var(--muted); margin-top: 2px; }

/* ADSENSE SLOT */
.ad-slot {
  background: var(--card2);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-label { font-size: 0.65rem; text-transform: uppercase; color: var(--muted); letter-spacing: 0.5px; }

/* ARTICLE DETAIL PAGE */
.article-detail { display: none; }
.article-detail.active { display: block; }
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.15s;
}
.article-back:hover { border-color: var(--accent); color: var(--accent); }
.article-hero {
  background: var(--dark);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
}
.article-hero-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
}
.article-hero-placeholder {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, var(--dark), #2a2a2a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255,255,255,0.1);
  overflow: hidden;
}
.article-hero-placeholder img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}
.article-hero-content { padding: 20px; }
.article-detail .article-cat { margin-bottom: 10px; display: inline-block; }
.article-detail .article-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 12px;
  -webkit-line-clamp: unset;
}
.article-detail .article-meta { margin-bottom: 16px; }
.article-detail .article-time { color: rgba(255,255,255,0.6); }
.article-body-detail { padding: 20px 0; }
.article-body-detail p {
  font-size: 1rem;
  line-height: 1.75;
  color: #333;
  margin-bottom: 16px;
}
.article-body-detail h2 { font-size: 1.2rem; font-weight: 800; color: var(--dark); margin: 24px 0 10px; }
.article-body-detail ul { margin: 10px 0 16px 20px; }
.article-body-detail li { font-size: 0.95rem; color: #444; margin-bottom: 6px; line-height: 1.6; }
.article-share {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 20px 0;
}
.article-share span { font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.share-btn {
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: opacity 0.15s;
}
.share-btn:hover { opacity: 0.85; }
.share-fb { background: #1877f2; }
.share-tw { background: #000; }
.share-wa { background: #25d366; }

/* RELATED ARTICLES */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}
.related-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; cursor: pointer; transition: all 0.15s; }
.related-card:hover { border-color: var(--accent3); transform: translateY(-1px); }
.related-card-img { width: 100%; aspect-ratio: 16/9; background: var(--card2); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: rgba(255,255,255,0.15); overflow: hidden; }
.related-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related-card-body { padding: 10px; }
.related-card-title { font-size: 0.82rem; font-weight: 700; color: var(--dark); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* LOADING */
.loading { text-align: center; padding: 40px; color: var(--muted); font-size: 0.9rem; }

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.empty-state p { font-size: 0.875rem; }

/* DELETED ARTICLE PAGE */
.deleted-page {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  margin: 40px auto;
  max-width: 500px;
}
.deleted-page .icon { font-size: 3rem; margin-bottom: 16px; }
.deleted-page h2 { font-size: 1.2rem; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.deleted-page p { color: var(--muted); font-size: 0.875rem; margin-bottom: 20px; }
.deleted-page .btn { padding: 10px 20px; background: var(--accent); color: #fff; border-radius: 8px; font-weight: 700; display: inline-block; }

/* FOOTER */
footer {
  background: var(--dark);
  border-top: 3px solid var(--accent);
  padding: 40px 0 20px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}
.footer-col h4 { color: var(--accent4); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; margin-bottom: 12px; }
.footer-col a { display: block; color: rgba(255,255,255,0.5); font-size: 0.82rem; margin-bottom: 8px; transition: color 0.15s; }
.footer-col a:hover { color: var(--accent4); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom p { color: rgba(255,255,255,0.35); font-size: 0.78rem; }
.footer-bottom a { color: rgba(255,255,255,0.5); font-size: 0.78rem; }
.footer-bottom a:hover { color: var(--accent4); }

/* RESPONSIVE */
@media (max-width: 860px) {
  .main { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .nav-search { width: 120px; }
  .articles-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .article-detail .article-title { font-size: 1.3rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}