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

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --accent: #f97316;
  --accent2: #fb923c;
  --text: #e6edf3;
  --muted: #8b949e;
  --link: #58a6ff;
  --radius: 10px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* HEADER */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { font-size: 28px; }
.logo-title { display: block; font-size: 20px; font-weight: 700; color: var(--accent); }
.logo-sub { display: block; font-size: 11px; color: var(--muted); letter-spacing: 1px; }
nav { display: flex; gap: 20px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .2s; }
nav a:hover { color: var(--accent); }

/* HERO */
.hero {
  background: linear-gradient(135deg, #1a0a00 0%, #0d1117 50%, #001a33 100%);
  border-bottom: 1px solid var(--border);
  text-align: center; padding: 60px 24px 50px;
}
.hero h1 {
  font-size: clamp(26px, 5vw, 46px);
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), #facc15, var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 14px;
}
.hero p { color: var(--muted); font-size: 16px; max-width: 600px; margin: 0 auto; }

/* MAIN */
main { max-width: 1200px; margin: 0 auto; padding: 28px 24px 60px; }

.toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.count { font-weight: 600; color: var(--accent); }
.updated { color: var(--muted); font-size: 13px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* CARD */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .2s, transform .2s;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.card-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; gap: 8px; flex-wrap: wrap;
}
.source {
  background: rgba(249,115,22,.12);
  color: var(--accent);
  padding: 2px 8px; border-radius: 20px;
  font-weight: 600; white-space: nowrap;
}
.date { color: var(--muted); }

.card h2 { font-size: 15px; font-weight: 600; line-height: 1.4; }
.card h2 a { color: var(--text); text-decoration: none; }
.card h2 a:hover { color: var(--accent); }

.summary {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap;
}
.readmore {
  color: var(--accent); text-decoration: none;
  font-size: 13px; font-weight: 600;
  transition: opacity .2s;
}
.readmore:hover { opacity: .75; }
.copyright { color: var(--muted); font-size: 11px; }

/* FOOTER */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 30px 24px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .header-inner { gap: 10px; }
  nav { gap: 12px; }
}

/* COUNTER */
.counter-block {
  display: flex; justify-content: center; gap: 32px;
  margin-top: 28px; flex-wrap: wrap;
}
.counter-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 24px; min-width: 130px;
}
.counter-num {
  font-size: 32px; font-weight: 800;
  background: linear-gradient(90deg, var(--accent), #facc15);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.counter-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }

/* TABS */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 16px; border-radius: 20px;
  cursor: pointer; font-size: 14px; font-weight: 500;
  transition: all .2s;
  display: flex; align-items: center; gap: 6px;
}
.tab:hover { border-color: var(--accent); color: var(--text); }
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tab-cnt {
  background: rgba(255,255,255,.2);
  padding: 1px 7px; border-radius: 10px;
  font-size: 12px;
}
.tab.active .tab-cnt { background: rgba(0,0,0,.2); }

/* SEARCH */
.search-wrap {
  position: relative;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}
.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  padding: 12px 20px;
  outline: none;
  transition: border-color .2s;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--muted); }
.search-count {
  white-space: nowrap;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  display: none;
}
