/* Minimal Pro UI (light, clean, fast) */
:root{
  --bg: #f7f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: rgba(15,23,42,0.62);
  --border: rgba(15,23,42,0.10);
  --shadow: 0 10px 30px rgba(2,6,23,0.08);
  --radius: 16px;
  --radius-sm: 12px;
  --max: 1160px;
  --accent: #4f46e5;
  --accent-2: #22c55e;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

/* Dark mode */
html[data-rabt-theme="dark"]{
  --bg: #0b1220;
  --card: rgba(255,255,255,0.06);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.65);
  --border: rgba(255,255,255,0.12);
  --shadow: 0 18px 40px rgba(0,0,0,0.35);
  --accent: #7c3aed;
  --accent-2: #22c55e;
}

body{
  margin:0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

a{ color: inherit; }
a:hover{ color: var(--accent); }

.rabt-wrap{ max-width: var(--max); margin:0 auto; padding: 22px 18px; }

.rabt-header{
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247,247,251,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.rabt-header-inner{
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
}

.rabt-brand a{
  font-weight: 900;
  letter-spacing: -0.02em;
  text-decoration:none;
  display:flex;
  align-items:center;
  gap: 10px;
}

.rabt-brand a::before{
  content:"";
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(79,70,229,0.10);
}

.rabt-nav ul{ list-style:none; display:flex; gap:10px; margin:0; padding:0; flex-wrap: wrap; }
.rabt-nav a{
  text-decoration:none;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 999px;
}
.rabt-nav a:hover{
  color: var(--text);
  background: rgba(79,70,229,0.08);
}

.rabt-footer{
  border-top: 1px solid var(--border);
  margin-top: 34px;
  padding: 22px 0;
  color: var(--muted);
}

.rabt-hero{
  margin: 14px 0 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.rabt-hero h1{ margin:0 0 6px; font-size: 22px; letter-spacing: -0.03em; }
.rabt-hero p{ margin:0; color: var(--muted); }

.rabt-toolbar{
  display:flex;
  justify-content:flex-end;
  margin: 14px 0 10px;
}
.rabt-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight: 800;
  color: var(--muted);
  user-select: none;
}
.rabt-toggle input{ accent-color: var(--accent); }

.rabt-filters{
  margin: 0 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 12px;
}
.rabt-filter-row{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.rabt-filter{
  display:flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}
.rabt-filter-grow{ flex: 1 1 260px; min-width: 220px; }
.rabt-filter label{
  font-size: 12px;
  color: var(--muted);
  font-weight: 900;
  letter-spacing: 0.01em;
}
.rabt-filter select,
.rabt-filter input{
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.12);
  background: #fff;
  color: var(--text);
  padding: 10px 10px;
  outline: none;
}
.rabt-filter select:focus,
.rabt-filter input:focus{
  border-color: rgba(79,70,229,0.55);
  box-shadow: 0 0 0 4px rgba(79,70,229,0.12);
}

.rabt-btn{
  border-radius: 12px;
  border: 1px solid rgba(79,70,229,0.35);
  background: rgba(79,70,229,0.10);
  color: var(--text);
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 900;
}
.rabt-btn:hover{ background: rgba(79,70,229,0.16); }

.rabt-news-container{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(320px,1fr));
  gap:16px;
  margin: 0;
}

.rabt-card{
  position:relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow:hidden;
  box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .12s ease;
}
.rabt-card:hover{ transform: translateY(-2px); border-color: rgba(79,70,229,0.25); }

.rabt-img{ position: relative; aspect-ratio: 16/9; overflow:hidden; background: #eef2ff; }
.rabt-img img{ width:100%; height:100%; object-fit: cover; display:block; }

.rabt-body{ padding: 14px 14px 16px; }
.rabt-title{ margin: 0 0 8px; font-size: 16px; line-height: 1.35; letter-spacing: -0.01em; }
.rabt-title a{ text-decoration:none; color: var(--text); }
.rabt-title a:hover{ text-decoration: underline; text-underline-offset: 3px; }

.rabt-meta{ font-size: 12px; color: var(--muted); margin-bottom: 10px; display:flex; flex-wrap:wrap; gap: 8px; }
.rabt-pill{
  display:inline-flex;
  align-items:center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(15,23,42,0.03);
}

.rabt-desc{ margin:0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.rabt-bookmark-btn{
  position:absolute;
  top: 12px;
  right: 12px;
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.92);
  border-radius: 999px;
  padding: 8px 10px;
  cursor:pointer;
  box-shadow: 0 8px 18px rgba(2,6,23,0.10);
}
.rabt-bookmark-btn:hover{ border-color: rgba(79,70,229,0.28); }
.rabt-bookmark-icon{ font-size: 18px; line-height: 1; color: rgba(15,23,42,0.70); }

.rabt-card.rabt-saved .rabt-bookmark-btn{ border-color: rgba(34,197,94,0.45); }
.rabt-card.rabt-saved .rabt-bookmark-icon{ color: rgba(34,197,94,0.95); }

.rabt-actions{ display:flex; gap: 10px; align-items:center; margin-top: 12px; }
.rabt-save-btn{
  border-radius: 12px;
  border: 1px solid rgba(34,197,94,0.45);
  background: rgba(34,197,94,0.12);
  color: var(--text);
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 900;
}
.rabt-save-btn:hover{ background: rgba(34,197,94,0.18); }

.rabt-open{
  color: var(--muted);
  text-decoration:none;
  font-weight: 900;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(15,23,42,0.03);
}
.rabt-open:hover{ color: var(--text); border-color: rgba(79,70,229,0.25); }

.rabt-bookmarks-panel{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin: 18px 0;
  background: #fff;
  box-shadow: var(--shadow);
}
.rabt-bookmarks-panel h3{ margin: 0 0 10px; font-size: 16px; letter-spacing: -0.01em; }
.rabt-bookmarks-list{ display:flex; flex-direction:column; gap:10px; margin-top:10px; }
.rabt-bookmark-item{
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(15,23,42,0.02);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.rabt-bookmark-item a{ display:block; font-weight: 900; text-decoration:none; }
.rabt-bookmark-item a:hover{ text-decoration: underline; }
.rabt-bookmark-item small{ color: var(--muted); }
.rabt-note{ color: var(--muted); font-size: 13px; }

.rabt-infinite{ margin: 16px 0 0; text-align:center; color: var(--muted); }
.rabt-load-more{ height: 1px; }
.rabt-end{ margin: 10px 0 0; }

.rabt-auth-card{
  max-width: 520px;
  margin: 18px auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 16px;
}
.rabt-auth-card h2{ margin: 0 0 12px; letter-spacing: -0.02em; }
.rabt-auth-form{ display:flex; flex-direction: column; gap: 10px; }
.rabt-auth-form label{ font-size: 12px; color: var(--muted); font-weight: 900; }
.rabt-auth-form input{
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.12);
  background: #fff;
  color: var(--text);
  padding: 10px 10px;
  outline: none;
}
.rabt-auth-form input:focus{ border-color: rgba(79,70,229,0.55); box-shadow: 0 0 0 4px rgba(79,70,229,0.12); }
.rabt-auth-muted{ color: var(--muted); margin-top: 12px; }
.rabt-auth-errors{
  border: 1px solid rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.10);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.rabt-auth-errors ul{ margin: 0; padding-left: 18px; }

.rabt-loading [data-rabt-results]{ opacity: 0.65; pointer-events: none; }

@media (max-width: 520px){
  .rabt-header-inner{ flex-direction: column; align-items: flex-start; }
  .rabt-news-container{ grid-template-columns: 1fr; }
  .rabt-filter{ min-width: 100%; }
  .rabt-toolbar{ justify-content: flex-start; }
}


/* Theme toggle */
.rabt-theme-toggle{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15,23,42,0.03);
  padding: 8px 10px;
  font-weight: 900;
  color: var(--muted);
  cursor: pointer;
}
html[data-rabt-theme="dark"] .rabt-theme-toggle{
  background: rgba(255,255,255,0.06);
}
.rabt-theme-toggle:hover{
  color: var(--text);
  border-color: rgba(79,70,229,0.25);
}
.rabt-theme-dot{
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(79,70,229,0.12);
}
html[data-rabt-theme="dark"] .rabt-theme-dot{
  box-shadow: 0 0 0 6px rgba(124,58,237,0.16);
}


.rabt-bookmark-row{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 10px;
}
.rabt-bookmark-remove{
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}
.rabt-bookmark-remove:hover{
  color: var(--text);
  border-color: rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.08);
}


/* Spectre integration tweaks */
.btn{ border-radius: 12px; }
.form-input{ border-radius: 12px; }
