/* Global Reset */
* {
  box-sizing: border-box;
}

/* Body */
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f8;
  color: #222;
}

/* Header */
.site-header {
  padding: 2rem 1.5rem;
  background: #1f2933;
  color: #f9fafb;
}

.site-header h1 {
  margin: 0 0 0.5rem;
}

.site-header p {
  margin: 0 0 1.5rem;
  opacity: 0.9;
}

/* Search Bar */
.search-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.search-filter input,
.search-filter select {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #cbd2e1;
  min-width: 220px;
}

/* Directory Layout */
main#directory {
  padding: 2rem 1.5rem 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* Categories */
.category {
  margin-bottom: 2.5rem;
}

.category-title {
  margin-bottom: 1rem;
  border-left: 4px solid #2563eb;
  padding-left: 0.5rem;
}

/* App Grid */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

/* App Card */
.app-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.app-name {
  margin: 0 0 0.25rem;
}

.app-description {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #4b5563;
}

.app-tags {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: #6b7280;
}

.app-tags span {
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  margin-right: 0.25rem;
}

/* Buttons */
.app-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.app-link {
  text-decoration: none;
  color: #ffffff;
  background: #2563eb;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.share-btn {
  border: 1px solid #d1d5db;
  background: #f9fafb;
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.share-btn:hover {
  background: #e5e7eb;
}

/* Toast */
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #2563eb;
  color: white;
  padding: 10px 16px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  font-size: 0.9rem;
}

/* Center header content */
.site-header {
  text-align: center;
}

/* Center search bar */
.search-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;  /* NEW */
  text-align: center;        /* NEW */
}

/* Center footer content */
footer {
  text-align: center;
}

