.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  min-height: 64px;
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.42);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 22px;
  z-index: 1000;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.navbar-brand {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  color: #f5f5f5;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  white-space: nowrap;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.nav-link {
  color: rgba(245, 245, 245, 0.62);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 9px 13px;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.dropdown { position: relative; }

.dropdown-toggle {
  color: rgba(245, 245, 245, 0.62);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: block;
  padding: 9px 13px;
  transition: background 0.15s, color 0.15s;
  user-select: none;
}

.dropdown-toggle:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: rgba(8, 8, 8, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.28);
  min-width: 150px;
  padding: 0;
  z-index: 1001;
}

.dropdown-menu.open { display: block; }

.dropdown-menu a {
  display: block;
  padding: 9px 14px;
  color: rgba(245, 245, 245, 0.72);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  transition: background 0.15s, color 0.15s;
}

.dropdown-menu a:last-child { border-bottom: 0; }

.dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.navbar-search {
  flex: 1 1 420px;
  max-width: 560px;
  min-width: 190px;
}

.navbar-search .search-form {
  display: flex;
  width: 100%;
}

.navbar-search .search-input {
  flex: 1;
  min-width: 0;
  padding: 11px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-right: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.navbar-search .search-input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.navbar-search .search-input:focus {
  border-color: rgba(255, 255, 255, 0.82);
}

.navbar-search .search-btn {
  flex: 0 0 auto;
  padding: 11px 18px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-left: none;
  color: #f5f5f5;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.navbar-search .search-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

#game-frame {
  top: 64px !important;
  height: calc(100% - 64px) !important;
}

@media (max-width: 760px) {
  .navbar {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 10px;
    padding: 9px 12px;
  }

  .navbar-brand {
    display: flex;
    align-items: center;
  }

  .navbar-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }

  .navbar-links {
    margin-left: auto;
    overflow-x: auto;
    max-width: 100%;
  }

  .nav-link,
  .dropdown-toggle {
    padding: 8px 10px;
  }

  #game-frame {
    top: 112px !important;
    height: calc(100% - 112px) !important;
  }
}
