/* ==========================================================================
   Repo Radar - Modern Developer Design System
   ========================================================================== */

:root {
  /* Color Palette - Dark Theme (Default) */
  --bg-base: #0a0d14;
  --bg-surface: #111520;
  --bg-surface-hover: #161c2b;
  --bg-card: #131826;
  --bg-card-border: #1f273d;
  --bg-card-highlight: #1b2236;
  --bg-input: #0d111c;
  --border-color: #242d45;
  --border-color-subtle: #1c2438;

  --text-primary: #f0f3f8;
  --text-secondary: #9aa5be;
  --text-muted: #64708d;
  --text-inverse: #0a0d14;

  --accent-primary: #3b82f6;
  --accent-primary-hover: #60a5fa;
  --accent-secondary: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-yellow: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #a855f7;

  --glow-primary: rgba(59, 130, 246, 0.25);
  --glow-radar: rgba(6, 182, 212, 0.35);

  --badge-bg: #1c2438;
  --badge-text: #9aa5be;

  --code-bg: #090c13;
  --code-border: #1d2538;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.2);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, 'Fira Code', Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-base: #f6f8fa;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f1f3f7;
  --bg-card: #ffffff;
  --bg-card-border: #d0d7de;
  --bg-card-highlight: #f6f8fa;
  --bg-input: #ffffff;
  --border-color: #d0d7de;
  --border-color-subtle: #eaeef2;

  --text-primary: #1f2328;
  --text-secondary: #59636e;
  --text-muted: #8c959f;
  --text-inverse: #ffffff;

  --accent-primary: #0969da;
  --accent-primary-hover: #1f883d;
  --accent-secondary: #8250df;
  --accent-cyan: #059669;
  --accent-green: #1a7f37;
  --accent-yellow: #9a6700;
  --accent-red: #cf222e;
  --accent-purple: #8250df;

  --glow-primary: rgba(9, 105, 218, 0.15);
  --glow-radar: rgba(5, 150, 105, 0.2);

  --badge-bg: #eff1f3;
  --badge-text: #424a53;

  --code-bg: #f6f8fa;
  --code-border: #d0d7de;

  --shadow-sm: 0 1px 3px rgba(31, 35, 40, 0.12);
  --shadow-md: 0 4px 12px rgba(31, 35, 40, 0.15);
  --shadow-lg: 0 12px 28px rgba(31, 35, 40, 0.18);
  --shadow-glow: 0 0 20px rgba(9, 105, 218, 0.15);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  scroll-behavior: smooth;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-base);
  color: var(--text-primary);
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  text-decoration: underline;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(17, 21, 32, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

[data-theme="light"] .app-header {
  background-color: rgba(255, 255, 255, 0.85);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  text-decoration: none;
}

.brand-radar-icon {
  width: 34px;
  height: 34px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  border-radius: var(--radius-md);
  box-shadow: 0 0 12px var(--glow-primary);
}

.brand-radar-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-tag {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
  text-transform: uppercase;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.rate-limit-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.rate-limit-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}

.rate-limit-dot.warning {
  background-color: var(--accent-yellow);
  box-shadow: 0 0 6px var(--accent-yellow);
}

.rate-limit-dot.danger {
  background-color: var(--accent-red);
  box-shadow: 0 0 6px var(--accent-red);
}

.theme-toggle-btn, .github-link-btn, .icon-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover, .github-link-btn:hover, .icon-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  padding: 4.5rem 1.5rem 3.5rem;
  text-align: center;
  position: relative;
  background: radial-gradient(circle at 50% 20%, rgba(59, 130, 246, 0.08), transparent 70%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.search-box-wrapper {
  max-width: 740px;
  margin: 0 auto;
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.45rem;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transition: all var(--transition-fast);
}

.search-form:focus-within {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-lg), 0 0 30px var(--glow-primary);
}

.search-icon-left {
  padding-left: 1rem;
  padding-right: 0.5rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.05rem;
  color: var(--text-primary);
  padding: 0.75rem 0.5rem;
  font-family: var(--font-sans);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  display: none;
  border-radius: 50%;
}

.search-clear-btn:hover {
  color: var(--text-primary);
}

.search-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.search-submit-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.search-submit-btn:active {
  transform: translateY(0);
}

.sample-repos-wrapper {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sample-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sample-chip:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: var(--bg-surface-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   Recent Repositories / History Section
   ========================================================================== */

.recent-repos-section {
  max-width: 1200px;
  margin: 2rem auto 4rem;
  padding: 0 1.5rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.clear-btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.clear-btn-link:hover {
  color: var(--accent-red);
  text-decoration: underline;
}

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

.recent-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.recent-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.recent-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.recent-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
}

.recent-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color-subtle);
  padding-top: 0.6rem;
}

.recent-stars {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent-yellow);
  font-weight: 500;
}

.recent-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.recent-remove-btn:hover {
  color: var(--accent-red);
}

/* ==========================================================================
   Feature Highlights Grid (Homepage)
   ========================================================================== */

.features-section {
  max-width: 1200px;
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.feature-box {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color var(--transition-fast);
}

.feature-box:hover {
  border-color: var(--border-color);
}

.feature-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.feature-box h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-box p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   Dashboard View
   ========================================================================== */

.dashboard-view {
  display: none;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
  width: 100%;
}

.dashboard-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.back-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-primary);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  color: #ffffff;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
}

/* Repository Header Banner */
.repo-header-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.repo-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.repo-ident-wrapper {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.repo-owner-avatar {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
}

.repo-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.repo-full-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.repo-owner-name {
  color: var(--text-secondary);
}

.repo-owner-name:hover {
  color: var(--accent-primary);
}

.repo-divider-slash {
  color: var(--text-muted);
}

.repo-name-text {
  color: var(--text-primary);
}

.repo-badges-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--border-color);
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-primary);
  border-color: rgba(59, 130, 246, 0.3);
}

.badge-purple {
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent-purple);
  border-color: rgba(168, 85, 247, 0.3);
}

.badge-yellow {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-yellow);
  border-color: rgba(245, 158, 11, 0.3);
}

.repo-desc-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  max-width: 900px;
}

.repo-topics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.topic-tag {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(59, 130, 246, 0.25);
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
}

.repo-meta-summary-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.meta-summary-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.meta-summary-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ==========================================================================
   Statistics Cards Grid
   ========================================================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--transition-fast);
}

.stat-card:hover {
  border-color: var(--border-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.stat-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stat-icon-stars { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.stat-icon-forks { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.stat-icon-watchers { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }
.stat-icon-issues { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.stat-icon-prs { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.stat-icon-contributors { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.stat-icon-size { background: rgba(236, 72, 153, 0.15); color: #ec4899; }

.stat-details {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-top: 0.15rem;
}

/* ==========================================================================
   Tabs Navigation & Content
   ========================================================================== */

.tabs-nav-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-nav-bar::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.tab-pill-count {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  background: var(--badge-bg);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-weight: 500;
}

.tab-btn.active .tab-pill-count {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-primary);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Overview Tab Content
   ========================================================================== */

.overview-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.overview-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.overview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.overview-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Language Bar */
.language-bar-container {
  margin-bottom: 1.25rem;
}

.language-progress-bar {
  display: flex;
  height: 10px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background-color: var(--badge-bg);
  margin-bottom: 1rem;
}

.language-segment {
  height: 100%;
  transition: width 0.4s ease;
}

.languages-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.language-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.language-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.language-name {
  font-weight: 600;
  color: var(--text-primary);
}

.language-percent {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-left: auto;
}

/* Metadata List */
.meta-table {
  width: 100%;
  border-collapse: collapse;
}

.meta-table tr {
  border-bottom: 1px solid var(--border-color-subtle);
}

.meta-table tr:last-child {
  border-bottom: none;
}

.meta-table td {
  padding: 0.75rem 0;
  font-size: 0.88rem;
}

.meta-table td.label-col {
  color: var(--text-muted);
  width: 40%;
  font-weight: 500;
}

.meta-table td.value-col {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

/* ==========================================================================
   File Explorer Tab
   ========================================================================== */

.explorer-container {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.explorer-header {
  padding: 0.85rem 1.25rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-family: var(--font-mono);
}

.breadcrumb-item {
  color: var(--accent-primary);
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.breadcrumb-item:hover {
  background: rgba(59, 130, 246, 0.15);
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--text-muted);
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

.explorer-table {
  width: 100%;
  border-collapse: collapse;
}

.explorer-table th {
  text-align: left;
  padding: 0.65rem 1.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface-hover);
}

.explorer-table td {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border-color-subtle);
  font-size: 0.9rem;
}

.explorer-row {
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.explorer-row:hover {
  background-color: var(--bg-surface-hover);
}

.file-name-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.file-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-icon.dir { color: #60a5fa; }
.file-icon.code { color: #34d399; }
.file-icon.doc { color: #f472b6; }
.file-icon.cfg { color: #fbbf24; }

.file-size-col {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: right;
  width: 120px;
}

/* Inline / Modal File Content Viewer */
.file-viewer-wrapper {
  margin-top: 1.5rem;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: none;
}

.file-viewer-header {
  padding: 0.75rem 1.25rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.file-viewer-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
}

.file-viewer-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.code-pre-block {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  background: var(--code-bg);
  color: #e2e8f0;
}

/* ==========================================================================
   README Tab Content
   ========================================================================== */

.readme-container {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.readme-header {
  padding: 0.85rem 1.5rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.readme-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.readme-body {
  padding: 2.5rem;
  line-height: 1.7;
}

/* Markdown Rendering Content Styles (GitHub Styled) */
.markdown-body {
  color: var(--text-primary);
  font-size: 1rem;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1.75rem;
  margin-bottom: 0.85rem;
  color: var(--text-primary);
}

.markdown-body h1 {
  font-size: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.markdown-body h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid var(--border-color-subtle);
  padding-bottom: 0.4rem;
}

.markdown-body h3 { font-size: 1.25rem; }
.markdown-body h4 { font-size: 1.1rem; }

.markdown-body p,
.markdown-body ul,
.markdown-body ol {
  margin-bottom: 1rem;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.75rem;
}

.markdown-body li {
  margin-bottom: 0.35rem;
}

.markdown-body blockquote {
  border-left: 4px solid var(--accent-primary);
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  background: rgba(59, 130, 246, 0.05);
  margin-bottom: 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.markdown-body pre {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.markdown-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--badge-bg);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--accent-cyan);
}

.markdown-body pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  display: block;
}

.markdown-body th,
.markdown-body td {
  padding: 0.65rem 1rem;
  border: 1px solid var(--border-color);
}

.markdown-body th {
  background: var(--bg-surface);
  font-weight: 600;
}

.markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 0.5rem 0;
}

/* ==========================================================================
   Commits, Issues, PRs, Contributors, Releases
   ========================================================================== */

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  transition: all var(--transition-fast);
}

.timeline-card:hover {
  border-color: var(--border-color);
  transform: translateX(2px);
}

.timeline-left {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  flex: 1;
}

.author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.timeline-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.timeline-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.sha-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--badge-bg);
  border: 1px solid var(--border-color);
  color: var(--accent-primary);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.sha-pill:hover {
  background: rgba(59, 130, 246, 0.15);
}

/* Contributors Grid */
.contributors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.contributor-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  transition: all var(--transition-fast);
}

.contributor-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.contributor-rank-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.contributor-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
}

.contributor-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.contributions-count {
  font-size: 0.82rem;
  color: var(--accent-primary);
  font-weight: 500;
}

/* Filter Controls Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-pills-group {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 3px;
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
}

/* ==========================================================================
   Loading Overlay & Progress Experience
   ========================================================================== */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 13, 20, 0.88);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

[data-theme="light"] .loading-overlay {
  background: rgba(246, 248, 250, 0.88);
}

.loading-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 3rem;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.loading-radar-spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--accent-primary);
  border-right-color: var(--accent-cyan);
  animation: spin 1s infinite linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.loading-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-align: left;
  margin-bottom: 1.5rem;
}

.loading-step-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.loading-step-item.active {
  color: var(--accent-primary);
  font-weight: 600;
}

.loading-step-item.completed {
  color: var(--accent-green);
}

.loading-step-item.completed .step-icon {
  color: var(--accent-green);
}

/* ==========================================================================
   Modals & Toasts
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalScale 0.2s ease;
}

@keyframes modalScale {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  color: var(--text-primary);
  animation: slideToast 0.25s ease;
  max-width: 400px;
}

@keyframes slideToast {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.toast-error {
  border-left: 4px solid var(--accent-red);
}

.toast-success {
  border-left: 4px solid var(--accent-green);
}

.toast-info {
  border-left: 4px solid var(--accent-primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 992px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  .search-form {
    flex-direction: column;
    padding: 0.75rem;
  }
  .search-input {
    width: 100%;
    padding: 0.5rem 0;
  }
  .search-submit-btn {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
  }
  .repo-header-top {
    flex-direction: column;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .modal-content-card {
    margin: 1rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .recent-grid {
    grid-template-columns: 1fr;
  }
}
