/* ==========================================================================
   Header & Navigation (Aywen / Developer Clean Style)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(9, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--text-highlight);
}

.brand-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
  flex-shrink: 0;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.brand-text span {
  color: var(--text-dim);
  font-weight: 600;
}

/* Nav Links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover {
  color: var(--text-highlight);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
  color: var(--text-highlight);
  background: rgba(255, 255, 255, 0.07);
  font-weight: 600;
}

.nav-link-wiki {
  color: var(--primary-light);
}

.nav-link-wiki.active {
  background: rgba(139, 92, 246, 0.12);
  color: #ffffff;
}

/* Header Socials & Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: transparent;
  transition: all var(--transition-fast);
}

.header-social-link:hover {
  color: var(--text-highlight);
  background: rgba(255, 255, 255, 0.06);
}

.header-social-link.youtube:hover {
  color: #ff334b;
}

.header-social-link.modrinth:hover {
  color: var(--modrinth-green);
}

/* Search Trigger Button */
.search-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-left: 0.5rem;
}

.search-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-medium);
  color: var(--text-highlight);
}

.search-trigger kbd {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* Mobile Hamburger */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.4rem;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(9, 10, 15, 0.98);
  backdrop-filter: blur(20px);
  padding: 1.5rem;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 99;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav .nav-link {
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  width: 100%;
}

/* ==========================================================================
   Buttons (Minimalist & Solid)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

/* Solid White Primary Button (Linear / Vercel style) */
.btn-primary {
  background: #ffffff;
  color: #090a0f;
  border-color: #ffffff;
}

.btn-primary:hover {
  background: #e2e8f0;
  border-color: #e2e8f0;
  transform: translateY(-1px);
}

/* Secondary Ghost Border Button */
.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.btn-violet {
  background: rgba(139, 92, 246, 0.12);
  color: var(--primary-light);
  border-color: rgba(139, 92, 246, 0.3);
}

.btn-violet:hover {
  background: rgba(139, 92, 246, 0.22);
  border-color: var(--primary-light);
  color: #ffffff;
}

.btn-modrinth {
  background: rgba(27, 217, 106, 0.1);
  color: var(--modrinth-green);
  border-color: rgba(27, 217, 106, 0.25);
}

.btn-modrinth:hover {
  background: rgba(27, 217, 106, 0.2);
  border-color: var(--modrinth-green);
  color: #ffffff;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.75rem 1.4rem;
  font-size: 0.9375rem;
}

/* ==========================================================================
   Badges & Tags (Minimalist Dots)
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  line-height: 1.3;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
}

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-dim);
}

.badge-loader {
  border-color: rgba(6, 182, 212, 0.2);
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
}
.badge-loader .badge-dot { background: var(--accent-cyan); }

.badge-status-released {
  border-color: rgba(16, 185, 129, 0.25);
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
}
.badge-status-released .badge-dot { background: var(--accent-emerald); }

.badge-status-beta {
  border-color: rgba(245, 158, 11, 0.25);
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}
.badge-status-beta .badge-dot { background: #f59e0b; }

/* ==========================================================================
   Search Modal (Ctrl+K)
   ========================================================================== */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 10, 0.8);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.search-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.search-modal {
  width: 90%;
  max-width: 580px;
  background: #0f1118;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(-12px) scale(0.99);
  transition: transform var(--transition-normal);
}

.search-modal-backdrop.open .search-modal {
  transform: translateY(0) scale(1);
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  gap: 0.75rem;
  color: var(--text-dim);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-highlight);
  font-size: 1rem;
  outline: none;
  font-family: inherit;
}

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

.search-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
}

.search-results-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-main);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.search-result-item:hover, .search-result-item.selected {
  background: rgba(255, 255, 255, 0.05);
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-highlight);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-result-snippet {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.875rem;
}

.search-modal-footer {
  padding: 0.65rem 1.15rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.search-modal-footer kbd {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: #151822;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-main);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8125rem;
}

.toast.success { border-color: rgba(16, 185, 129, 0.4); }
.toast.error { border-color: rgba(244, 63, 94, 0.4); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
  margin-top: auto;
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links-inline {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-links-inline a:hover {
  color: var(--text-main);
}

/* Responsive */
@media (max-width: 860px) {
  .nav-menu { display: none; }
  .mobile-toggle { display: block; }
}
