:root {
  --bg: #0b1021;
  --panel: #0f172a;
  --card: #111a32;
  --accent: #1ecbe1;
  --accent-2: #f8c630;
  --muted: #9fb3c8;
  --text: #e9eef5;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(30, 203, 225, 0.12), transparent 35%),
              radial-gradient(circle at 80% 0%, rgba(248, 198, 48, 0.08), transparent 40%),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
}

body.rtl {
  font-family: "Noto Nastaliq Urdu", "Manrope", system-ui, sans-serif;
}

body.rtl .feed {
  direction: rtl;
}

body.rtl .card,
body.rtl .card-body {
  text-align: right;
}

body.rtl .card-meta {
  flex-direction: row-reverse;
}

body.rtl .card-title,
body.rtl .card-text,
body.rtl .card-meta {
  font-family: "Noto Nastaliq Urdu", "Manrope", system-ui, sans-serif;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px clamp(20px, 4vw, 48px);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(11, 16, 33, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 96px;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { margin: 2px 0 0; font-size: clamp(22px, 3vw, 28px); line-height: 1.1; }
.brand .eyebrow { margin: 0; text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; color: var(--muted); }

.lang-switch { display: flex; gap: 10px; }
.lang-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.lang-btn:hover { border-color: var(--accent); color: #fff; }
.lang-btn.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0b1021; border-color: transparent; }

main { padding: 10px clamp(16px, 4vw, 40px) 48px; }

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 18px;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.control-group { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.control-group label { color: var(--muted); font-size: 14px; }
.control-group input, .control-group select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
}
.control-group input:focus, .control-group select:focus { outline: 1px solid var(--accent); }

#refreshBtn { padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.06); color: var(--text); cursor: pointer; }
#refreshBtn:hover { border-color: var(--accent); }

.status { justify-content: flex-end; font-size: 13px; color: var(--muted); text-align: right; }

.feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 240px;
}

.card-media { width: 100%; aspect-ratio: 16 / 9; background: linear-gradient(135deg, rgba(30,203,225,0.08), rgba(248,198,48,0.08)); display: none; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.card-meta { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; }
.card-title { margin: 0; font-size: 17px; }
.card-text { margin: 0; color: #cdd7e3; line-height: 1.5; font-size: 14px; }
.card-link { margin-top: auto; font-size: 14px; color: var(--accent); text-decoration: none; }
.card-link:hover { text-decoration: underline; }
.dot-sep { opacity: 0.6; }

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Footer */
.site-footer {
  text-align: center;
  padding: 24px 16px 32px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 40px;
  /* Always use English font for footer regardless of language */
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif !important;
  direction: ltr !important;
}

.site-footer p { margin: 4px 0; }

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .controls { grid-template-columns: 1fr 1fr; }
  .status { text-align: left; }
}
