/* GitHub OSS Radar - custom styles */

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background-image:
    radial-gradient(at 20% 0%, rgba(92,124,250,0.08) 0px, transparent 50%),
    radial-gradient(at 80% 100%, rgba(168,85,247,0.06) 0px, transparent 50%);
}

.tab-btn {
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  color: #94a3b8;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  margin-bottom: -1px;
}
.tab-btn:hover { color: #e2e8f0; }
.tab-btn.active {
  color: #fff;
  border-bottom-color: #5c7cfa;
}

.filter-chip {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: #161922;
  border: 1px solid #2a2f40;
  color: #94a3b8;
  font-size: 0.8rem;
  transition: all 0.15s;
}
.filter-chip:hover { color: #fff; border-color: #5c7cfa; }
.filter-chip.active {
  background: #4263eb;
  border-color: #4263eb;
  color: #fff;
}

.repo-card {
  background: #0f1117;
  border: 1px solid #1f2330;
  border-radius: 0.75rem;
  padding: 1rem;
  transition: all 0.15s;
  position: relative;
}
.repo-card:hover {
  border-color: #4263eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(66,99,235,0.15);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-ai { background: linear-gradient(90deg, #a855f7, #ec4899); color: #fff; }
.badge-new { background: #10b981; color: #fff; }
.badge-lang { background: #1f2330; color: #cbd5e1; }

.copy-cmd {
  background: #1f2330;
  border: 1px solid #2a2f40;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-family: ui-monospace, monospace;
  transition: all 0.15s;
}
.copy-cmd:hover { border-color: #5c7cfa; color: #fff; }

.follow-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #161922;
  border: 1px solid #2a2f40;
  border-radius: 999px;
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  font-size: 0.85rem;
}
.follow-chip img {
  width: 24px; height: 24px;
  border-radius: 50%;
}
.follow-chip button {
  color: #64748b;
  margin-left: 0.25rem;
  font-size: 1rem;
  line-height: 1;
}
.follow-chip button:hover { color: #ef4444; }

.topic-chip {
  padding: 0.4rem 0.85rem;
  border-radius: 0.5rem;
  background: #161922;
  border: 1px solid #2a2f40;
  font-size: 0.85rem;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s;
}
.topic-chip:hover { border-color: #5c7cfa; color: #fff; }
.topic-chip.active { background: #4263eb; border-color: #4263eb; color: #fff; }
.topic-chip { display: inline-flex; align-items: center; gap: 0.35rem; }
.topic-del { color: #64748b; font-size: 0.9rem; line-height: 1; background: transparent; border: none; cursor: pointer; padding: 0 0.15rem; }
.topic-del:hover { color: #ef4444; }
.topic-chip.active .topic-del { color: #cbd5e1; }

.skeleton {
  background: linear-gradient(90deg, #161922 0%, #1f2330 50%, #161922 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.5rem;
  height: 80px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

#toast.show {
  transform: translateY(0);
  opacity: 1;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a0b10; }
::-webkit-scrollbar-thumb { background: #2a2f40; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #4263eb; }

a { color: inherit; }
a.repo-link:hover { color: #7c9cff; }

.btn-icon {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.15s;
}
.btn-icon:hover { color: #fff; background: #1f2330; }
.btn-icon.saved { color: #fbbf24; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 1rem;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: #0f1117;
  border: 1px solid #2a2f40;
  border-radius: 1rem;
  padding: 1.5rem;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
.modal-box h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; }
.modal-box p.hint { font-size: 0.8rem; color: #64748b; margin-bottom: 1rem; }
.modal-box textarea, .modal-box input, .modal-box select {
  width: 100%;
  background: #161922;
  border: 1px solid #2a2f40;
  border-radius: 0.5rem;
  padding: 0.6rem 0.75rem;
  color: #e2e8f0;
  font-size: 0.9rem;
  font-family: inherit;
}
.modal-box textarea { font-family: ui-monospace, monospace; min-height: 140px; resize: vertical; }
.modal-box input:focus, .modal-box textarea:focus, .modal-box select:focus { outline: none; border-color: #5c7cfa; }
.modal-box label { display: block; font-size: 0.85rem; color: #94a3b8; margin-bottom: 0.35rem; margin-top: 0.85rem; }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1.25rem; }
.modal-actions button {
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.btn-primary { background: #4263eb; color: #fff; }
.btn-primary:hover { background: #5c7cfa; }
.btn-secondary { background: #1f2330; color: #cbd5e1; border: 1px solid #2a2f40; }
.btn-secondary:hover { background: #2a2f40; }

/* User card for Following */
.user-card {
  display: flex; align-items: center; gap: 0.75rem;
  background: #0f1117;
  border: 1px solid #1f2330;
  border-radius: 0.75rem;
  padding: 0.75rem;
  transition: all 0.15s;
}
.user-card:hover { border-color: #4263eb; }
.user-card img { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
.user-card .info { flex: 1; min-width: 0; }
.user-card .info .name { font-weight: 600; color: #fff; }
.user-card .info .handle { font-size: 0.8rem; color: #64748b; }
.user-card .info .bio { font-size: 0.8rem; color: #94a3b8; margin-top: 0.25rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.user-card .actions { flex-shrink: 0; }

/* Autocomplete dropdown */
.ac-dropdown {
  position: absolute;
  background: #0f1117;
  border: 1px solid #2a2f40;
  border-radius: 0.5rem;
  margin-top: 4px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 50;
  min-width: 280px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.ac-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid #1f2330;
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.selected { background: #1f2330; }
.ac-item img { width: 32px; height: 32px; border-radius: 50%; }
.ac-item .ac-name { font-weight: 500; color: #fff; font-size: 0.9rem; }
.ac-item .ac-login { font-size: 0.75rem; color: #64748b; }

/* Collection chips */
.coll-chip {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: #161922;
  border: 1px solid #2a2f40;
  font-size: 0.8rem;
  color: #cbd5e1;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.35rem;
}
.coll-chip:hover { border-color: #5c7cfa; color: #fff; }
.coll-chip.active { background: #4263eb; border-color: #4263eb; color: #fff; }
.coll-chip .count { opacity: 0.7; font-size: 0.7rem; }
.coll-chip .del { color: #64748b; margin-left: 0.25rem; }
.coll-chip .del:hover { color: #ef4444; }

/* Saved tag chips on cards */
.tag-chip {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  font-size: 0.7rem;
  background: #1e3a8a;
  color: #bfdbfe;
  border-radius: 999px;
  margin-right: 0.25rem;
}
