/* Addons Directory Styles */

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(8, 8, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 100;
}
.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 16px;
}
.header__logo:hover { color: var(--text-primary); }
.header__subtitle {
  color: var(--accent);
  font-weight: 600;
}
.logo-icon { display: flex; }
.header__right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header__link {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.header__link:hover { color: var(--text-primary); }
.header__link--gh { display: flex; }

/* Search bar */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  transition: border-color 0.2s;
}
.search-bar:focus-within { border-color: var(--accent); }
.search-bar__icon { color: var(--text-tertiary); flex-shrink: 0; }
.search-bar input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-sans);
  outline: none;
  width: 200px;
}
.search-bar input::placeholder { color: var(--text-tertiary); }

/* Main */
.main {
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 32px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 60px 0 32px;
}
.hero__title {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Filter pills */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 20px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
}
.filter-pill:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}
.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.pill-dot--http { background: var(--accent); }
.pill-dot--wasm { background: var(--green); }
.pill-dot--json { background: var(--orange); }
.filter-pill.active .pill-dot { background: white; }

/* Addon grid */
.addon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

/* Addon card */
.addon-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
  cursor: pointer;
}
.addon-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
.addon-card__header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}
.addon-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 24px;
}
.addon-card__meta {
  flex: 1;
  min-width: 0;
}
.addon-card__name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.addon-card__author {
  font-size: 12px;
  color: var(--text-tertiary);
}
.addon-card__desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.addon-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.addon-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.addon-card__version {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}
.addon-card__install {
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
  white-space: nowrap;
}
.addon-card__install:hover {
  background: var(--accent-bright);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}
.empty-state__icon {
  color: var(--text-tertiary);
  margin-bottom: 20px;
  opacity: 0.5;
}
.empty-state h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
}
.empty-state p, .no-results p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto 24px;
}
.empty-state__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* No results */
.no-results {
  text-align: center;
  padding: 60px 20px;
}
.no-results h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
}
.btn--primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn--primary:hover {
  background: var(--accent-bright);
  color: white;
}
.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Publish section */
.publish-section {
  margin: 32px 0 48px;
}
.publish-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px;
  align-items: center;
}
.publish-card__content h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}
.publish-card__content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}
.publish-card__actions {
  display: flex;
  gap: 12px;
}

/* Code preview */
.code-preview {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.code-preview__header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #1a1a2e;
  border-bottom: 1px solid var(--border);
}
.code-preview__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.code-preview__title {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}
.code-preview__body {
  margin: 0;
  border: none;
  border-radius: 0;
  padding: 16px 18px;
  font-size: 13px;
}

/* Stats */
.stats-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}
.stat {
  padding: 24px;
  text-align: center;
}
.stat__num {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent) 0%, var(--green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}
.stat__label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px;
  max-width: 1120px;
  margin: 0 auto;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer__inner p {
  font-size: 13px;
  color: var(--text-tertiary);
}
.footer__links {
  display: flex;
  gap: 20px;
}
.footer__links a {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
  .header { padding: 0 16px; }
  .main { padding: 0 16px; }
  .hero__title { font-size: 28px; }
  .hero { padding: 40px 0 24px; }
  .filters { gap: 6px; padding: 16px 0 24px; margin-bottom: 24px; }
  .filter-pill { padding: 5px 12px; font-size: 12px; }
  .addon-grid { grid-template-columns: 1fr; }
  .publish-card { grid-template-columns: 1fr; padding: 24px; }
  .publish-card__visual { display: none; }
  .stats-section { grid-template-columns: repeat(2, 1fr); }
  .search-bar input { width: 120px; }
  .empty-state__actions { flex-direction: column; align-items: center; }
}
