/* Registry Public Showcase Stylesheet */

:root {
  --bg-dark: #09090b;
  --bg-panel: #101014;
  --bg-card: #18181c;
  --bg-card-hover: #1e1e24;
  
  --border-color: #27272a;
  
  --text-primary: #fafafa;
  --text-secondary: #d4d4d8;
  --text-muted: #a1a1aa;
  
  --accent-yellow: #fbbf24;
  --accent-yellow-hover: #facc15;
  --accent-yellow-dim: rgba(251, 191, 36, 0.08);
  
  --font-main: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.3s ease;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.navbar {
  background-color: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
}

.logo-icon {
  color: var(--accent-yellow);
  width: 22px;
  height: 22px;
}

.highlight {
  color: var(--accent-yellow);
}

.catalog-badge {
  background-color: var(--accent-yellow-dim);
  border: 1px solid var(--accent-yellow);
  color: var(--accent-yellow);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Hero Section */
.hero-bar {
  padding: 60px 24px;
  border-bottom: 1px solid var(--border-color);
  background-image: radial-gradient(circle at top right, rgba(251, 191, 36, 0.03), transparent 50%);
}

.hero-bar h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-bar p {
  color: var(--text-secondary);
  max-width: 800px;
}

/* Main Content Area */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  min-height: 60vh;
}

.controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
  min-width: 250px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

#app-search {
  width: 100%;
  padding: 10px 12px 10px 40px;
  background-color: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

#app-search:focus {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.15);
}

.filter-group {
  display: flex;
  gap: 10px;
}

.filter-btn {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}

.filter-btn.active {
  background-color: var(--accent-yellow);
  border-color: var(--accent-yellow);
  color: #09090b;
}

/* App Grid & Cards */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.app-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.app-card:hover {
  border-color: var(--accent-yellow);
  transform: translateY(-4px);
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.04);
}

.app-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.app-icon-wrapper {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  width: 48px;
  height: 48px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-yellow);
}

.app-category-badge {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

.app-card-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.app-card-body p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 4.2em;
}

.app-card-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.app-meta-item i {
  width: 14px;
  height: 14px;
}

/* Spinner and loading */
.spinner-container {
  grid-column: 1/-1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  gap: 16px;
  color: var(--text-muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 30px 24px;
  text-align: center;
  margin-top: 40px;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  .controls-row {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-group {
    overflow-x: auto;
    padding-bottom: 4px;
  }
}

/* --- Publishing panel --- */
.publish-panel {
  margin: 4rem auto 0;
  padding: 2.5rem;
  max-width: 780px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color, #26262c);
  border-radius: 12px;
}

.publish-panel h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.publish-panel > p {
  color: var(--text-secondary, #a1a1aa);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.publish-steps {
  list-style: none;
  counter-reset: publish;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.publish-steps li {
  counter-increment: publish;
  position: relative;
  padding-left: 2.75rem;
  color: var(--text-secondary, #a1a1aa);
  line-height: 1.6;
}

.publish-steps li::before {
  content: counter(publish);
  position: absolute;
  left: 0;
  top: -2px;
  width: 1.85rem;
  height: 1.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-yellow-dim);
  color: var(--accent-yellow);
  font-weight: 700;
  font-size: 0.85rem;
}

.publish-steps strong { color: var(--text-primary, #fafafa); }

.publish-steps code,
.publish-note code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.85em;
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-yellow);
}

.publish-note {
  font-size: 0.9rem;
  color: var(--text-dim, #71717a);
  line-height: 1.6;
  padding: 1rem 1.15rem;
  border-left: 2px solid var(--accent-yellow);
  background: rgba(251, 191, 36, 0.04);
  border-radius: 0 6px 6px 0;
  margin-bottom: 1.75rem;
}

.publish-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-primary,
.btn-ghost {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--accent-yellow);
  color: #09090b;
}

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

.btn-ghost {
  border: 1px solid var(--border-color, #26262c);
  color: var(--text-secondary, #a1a1aa);
}

.btn-ghost:hover {
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}

.footer-container a { color: var(--accent-yellow); text-decoration: none; }
.footer-container a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .publish-panel { padding: 1.5rem; margin-top: 2.5rem; }
}
