:root {
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
}
[data-topnav] {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
[data-topnav] .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--foreground);
  text-decoration: none;
  flex-shrink: 0;
}
[data-topnav] .logo img { height: 28px; }
.search-container {
  flex: 1;
  max-width: 400px;
  position: relative;
}
.search-container input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  background: var(--background-alt);
}
.search-container input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
.search-container::before {
  content: "🔍";
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.875rem;
}
.nav-links {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}
.nav-links a {
  color: var(--foreground-light);
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--foreground); }
.nav-links a.active { color: var(--foreground); font-weight: 500; }
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--foreground);
}
.search-toggle-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
}
.account-menu { position: relative; }
.account-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
}
.account-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: block;
}
.account-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 102;
}
.account-dropdown a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--foreground);
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 0.25rem;
}
.account-dropdown a:hover { background: var(--border); }
.account-menu.open .account-dropdown { display: block; }
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 150;
}
.sidebar-overlay.active { display: block; }
.hero {
  text-align: center;
  padding: 2rem 1rem;
}
.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.hero p {
  color: var(--foreground-light);
  max-width: 500px;
  margin: 0 auto;
}
footer {
  background: #1a1a2e;
  color: #fff;
  padding: 2rem 1rem;
  margin-top: auto;
  width: 100%;
}
footer .footer-content {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
  flex-wrap: wrap;
}
footer .footer-brand { max-width: 280px; }
footer .footer-brand p {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  margin-top: 0.75rem;
}
footer .footer-links { display: flex; gap: 2rem; flex-wrap: wrap; }
footer .footer-links > div { min-width: 120px; }
footer .footer-links h5 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1rem;
}
footer .footer-links ul { list-style: none; padding: 0; margin: 0; }
footer .footer-links li { margin: 0.5rem 0; }
footer .footer-links a {
  color: rgba(255,255,255,0.8);
  font-size: 0.875rem;
}
footer .footer-links a:hover { color: #fff; }
footer .footer-bottom {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
}
footer .footer-bottom a { color: rgba(255,255,255,0.6); }

@media (max-width: 768px) {
  [data-topnav] { flex-wrap: wrap; gap: 0.5rem; padding: 0.5rem 1rem; }
  .search-toggle-btn { display: block; }
  .search-container { display: none; order: 5; max-width: 100%; width: 100%; flex-basis: 100%; }
  .search-container.search-open { display: block; }
  .search-container input { width: 100%; }
  .right-menu-btn { margin-left: auto; }
  .account-menu { margin-left: 0.5rem; }
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
    z-index: 101;
  }
  .sidebar-overlay.active { display: block; }
  .hero { padding: 1.5rem 0.5rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: 0.9375rem; }
  footer .footer-content { flex-direction: column; gap: 1.5rem; }
  footer .footer-brand { max-width: 100%; }
  footer .footer-links { gap: 1.5rem; }
}
@media (max-width: 480px) {
  [data-topnav] { padding: 0.5rem 0.75rem; }
  .hero h1 { font-size: 1.375rem; }
  footer .footer-links { flex-direction: column; gap: 1.25rem; }
  footer .footer-bottom { flex-direction: column; text-align: center; }
}
