/* Root variables and base styles */
:root {
  --bg: #0a0a0a;
  --card: #111111;
  --elev-1: #141414;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #1f1f1f;
  --accent-2: #444444;
  --border: #262626;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --grid-size: 60px;
  --grid-color: rgba(148,163,184,.07);
   --theme-yellow-orange: linear-gradient(135deg, #fedf2c, #FF8C00);; /* simple yellow */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(0deg, var(--grid-color), var(--grid-color) 0.5px, transparent  0.5px, transparent var(--grid-size)),
    repeating-linear-gradient(90deg, var(--grid-color), var(--grid-color)  0.5px, transparent  0.5px, transparent var(--grid-size)),
    radial-gradient(1200px 600px at 20% -10%, #0f0f0f, transparent 60%),
    radial-gradient(1200px 600px at 120% -10%, #121212, transparent 60%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }
button { border: 0; background: transparent; color: inherit; cursor: pointer; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.2) blur(10px);
  background: linear-gradient(to bottom, rgba(0,0,0,.8), rgba(0,0,0,.55) 60%, transparent);
  border-bottom: 1px solid rgba(255,255,255,.06);
/* background-color: red; */
}

.header-top {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .2px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--theme-yellow-orange);
  color: #111;
  border: 1px solid rgba(0,0,0,.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}

.header-actions { display: none; }
.icon-btn { display: none; }

.search-row { display: none; }
.search {
  position: relative; display: flex; align-items: center;
  background: var(--elev-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  gap: 8px;
  width: 100%;
  max-width: 50%;
  justify-self: end;
  float: none;
}
.search input {
  flex: 1; background: transparent; border: 0; outline: none; color: var(--text);
  font-size: 16px;
}

/* Hide native clear (X) in search inputs */
/* .search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; } */
.search input::-ms-clear { display: none; width: 0; height: 0; }
.search input::-ms-reveal { display: none; width: 0; height: 0; }

.search-icon { color: var(--muted); opacity: .9; }
.clear-btn { color: #ef4444; font-size: 24px; line-height: 1; padding: 2px 8px; border-radius: 8px; background: transparent; border: 0; opacity: .0; pointer-events: none; transition: opacity .15s ease, background .15s ease, color .15s ease; }
.search.has-value .clear-btn { opacity: 1; pointer-events: auto; }
.clear-btn:hover { background: rgba(239,68,68,.12); color: #f87171; }

/* Categories */
.categories { overflow: hidden; }
.cat-scroller {
  display: grid; grid-auto-flow: column; grid-auto-columns: max-content;
  gap: 8px; padding: 12px 16px; overflow-x: auto;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
 
}
.cat-scroller::-webkit-scrollbar { height: 0; }
.pill {
  scroll-snap-align: start;
  padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 14px;
  color: #e5e7eb; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}
.pill:hover { transform: translateY(-1px); }
.pill.active { color: #111; background: var(--theme-yellow-orange); border-color: rgba(0,0,0,.2); }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 14px 16px 40px; }
.articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

/* Card */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-media { display: block; background: #0a0a0a; }
.card-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }
.card-body { padding: 12px 12px 14px; }
.card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-decoration: none; color: white; font-weight: 700; font-size: clamp(15px, 2.5vw, 18px); }
.card-title:hover { text-decoration: underline; }
.card-desc { margin: 8px 0 12px; color: var(--muted); font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; gap: 8px; color: #d1d5db; font-size: 12px; opacity: .9; }
.dot { opacity: .5; }

/* Buttons */
.btn { padding: 10px 14px; border-radius: 10px; font-weight: 700; font-size: medium; }
.btn.primary { background: var(--theme-yellow-orange); color: #111; border: 1px solid rgba(0,0,0,.2); }
.btn.ghost { background: rgba(255,255,255,.06); color: #e5e7eb; border: 1px solid rgba(255,255,255,.12); }

/* Skeletons */
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.skeleton .card-body { padding: 12px; }
.shimmer { position: relative; overflow: hidden; background: linear-gradient(90deg, rgba(255,255,255,.06) 25%, rgba(255,255,255,.12) 37%, rgba(255,255,255,.06) 63%); background-size: 400% 100%; animation: shimmer 1.6s infinite; }
.sk-line { height: 14px; border-radius: 6px; margin: 8px 0; }
.w-90 { width: 90%; } .w-70 { width: 70%; }
.sk-meta { display: flex; gap: 6px; margin-top: 8px; }
.sk-dot { width: 8px; height: 8px; border-radius: 999px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.visible { opacity: 1; transform: translateY(0); transition: opacity .5s ease, transform .5s ease; }

/* Dialog */
.settings-dialog { border: 1px solid var(--border); border-radius: 16px; padding: 0; background: var(--card); color: var(--text); max-width: 480px; width: calc(100% - 24px); }
.settings-dialog::backdrop { background: rgba(4,6,12,.6); backdrop-filter: blur(3px); }
.settings-form { padding: 18px; }
.settings-form h2 { margin: 0 0 12px; font-size: 18px; }
.field { display: grid; gap: 8px; margin: 12px 0; }
.field input, .field select { background: var(--elev-1); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.hint { margin: 8px 2px 0; color: var(--muted); font-size: 12px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; color: var(--text); box-shadow: var(--shadow);
}

.sentinel { width: 100%; height: 1px; }

.load-more-row { display: grid; place-items: center; margin-top: 30px; padding: 16px 0 24px; }

/* Responsive tweaks */
@media(max-width: 550px) {
  .header-top { grid-template-columns: max-content 1fr; padding: 16px 20px; }
  .search { max-width: 80%; }
  .container { padding: 16px 20px 48px; }

  .brand {
 
  font-size: 14px;
  border-radius: 8px;
}

}




